r/BASICAnywhereMachine • • Aug 21 '23

DOC Port of C64 "10 PRINT CHR$(205.5+RND(1)); : GOTO 10" to demonstrate BAM's vertical text scrolling

5 Upvotes

BAM's interpreter is a modified version of wwwBASIC embedded in the BAM single file. (So that BAM does not have external dependencies, i.e. fully self-contained.)

One of the many enhancements to wwwBASIC in BAM: vertical upward scrolling of the screen when PRINTING has reached the bottom of the screen. (As of this writing, I'm in the midst of some technical reorganization of the documentation, so this archived version, might be useful.)


r/BASICAnywhereMachine • • Jan 19 '25

Program πŸ–₯ Fractals in Focus : A classic BASIC program with some new twists

Thumbnail
basicanywheremachine-news.blogspot.com
4 Upvotes

r/BASICAnywhereMachine • • Sep 12 '23

DOC BASIC Anywhere Machine: The Origin Story

Thumbnail docs.google.com
4 Upvotes

r/BASICAnywhereMachine • • Aug 22 '23

Program Prototyping an "RgbaPset" subroutine

4 Upvotes

I want "alpha-blending" (is that the right word?), but I don't want to modify everything in the interpreter to handle "rgba" colors.

So I'm thinking I should instead put together an "Alpha-Blending" include library with BASIC subroutines and functions.

To test the idea, I've got this "RgbaPset" subroutine, and I think it is working correctly. This test program draws a blue square, and two smaller yellow squares on top, both yellow, but one with no opacity at all (i.e. opaque = 255), the other with semi-opacity (full opacity = 0).

I think I've got this right. Might need to sleep on it:


r/BASICAnywhereMachine • • Aug 12 '23

DOC Metaprogramming in BAM: a code generation example.

4 Upvotes

BASIC Anywhere Machine being a TiddlyWiki instance, we have available to us TiddlyWiki scripting as a metaprogramming/macro language.

Before the text for our BASIC program gets bound to the interpreter into an HTML page fed to an iframe which displays the running program, the BASIC program gets processed by TiddlyWiki (TiddlyWiki acting as a preprocessor). Any TiddlyWiki scripting is rendered into text.

Further below, you'll find an image of the resulting BASIC code, followed by the TiddlyWiki scripting code.

Note that if we were to use the scripting in a BASIC program, we'd only need to add lines like:

<<AREA "...">> ("..." being the string of coordinates.)

The scripting that does the work, it would be TiddlyWiki stuff hidden way behind the scenes, triggered to do the magic when that <<AREA "...">> macro reference is encountered during "preprocessing" when we RUN the program.

The code in dark red is what we would have in our program, and the in black is what would be generated, replacing the code in red.

And the TiddlyWiki scripting going on behind the scenes (stuff you never need to know about, and only look at if you are interested):

\define AREA(string)

<$let points="$string$"

count={{{ [[$string$]split[ - ]] +[count[]] }}}>

<$list variable="element" filter="[range[1],<count>]">

<$text text={{{ [<element>match[1]then<points>split[ - ]nth[1]addprefix[PSET ]] +[addsuffix[ : AreaStartX = POINT(0) : AreaStartY = POINT(1)]] }}}/>

<$text text={{{ [<element>!match[1]then<points>split[ - ]nth<element>addprefix[LINE - ]] }}}/><br>

</$list>

LINE - (AreaStartX, AreaStartY)

</$let>

\end


r/BASICAnywhereMachine • • Aug 11 '23

DOC One or BAM's highest priorities: retro-programming (BASIC, of course)

4 Upvotes

My greatest goal with BAM is to easily give good old BASIC programs from the 70's, 80's, and early 90's a new lease on life, to celebrate the good stuff folk created back in the day.

I love the ideas of getting these old programs running again in the web browser (offline as well as online), so that pretty much anybody with any kind of device with a standards compliant web browser can run these BASIC programs without having to install any software of any kind, or have any special hardware requirements or particular operating system.

So multi-platform to the max.

Although this reddit is about anything BAM including retro-programming, retro-programming stuff specific to BAM I also share programs and discuss over at the RetroCoders Community.

If you are interested in BAM-specific retro-programming or anything else retro-programming, come over and visit the RetroCoders Community. I think a little bit of community "cross-pollination" would be a cool and great thing.


r/BASICAnywhereMachine • • Feb 05 '24

DOC πŸŽ‰ New version of BASIC Anywhere Machine

Thumbnail basicanywheremachine-news.blogspot.com
3 Upvotes

r/BASICAnywhereMachine • • Dec 08 '23

BASIC In Your Browser (Short article over at Hackaday)

Thumbnail
hackaday.com
3 Upvotes

r/BASICAnywhereMachine • • Sep 22 '23

Program βš— RgbaCircle Biaxial Mosaic

Thumbnail
basicanywheremachine-news.blogspot.com
3 Upvotes

r/BASICAnywhereMachine • • Sep 19 '23

Program πŸ–₯ Ever-Changing Mandala: a GW-BASIC program ported to BAM

Thumbnail
basicanywheremachine-news.blogspot.com
3 Upvotes

r/BASICAnywhereMachine • • Sep 17 '23

Program Speed difference of old CIRCLE versus new CIRCLE in the works

3 Upvotes

Compare the speed difference of the "Trigonometric parrot":

The BAM program is based on trigonometric functions designed by Hamid Naderi Yeganeh. See the source code for details.


r/BASICAnywhereMachine • • Aug 17 '23

Program Spheres (port of a QB64 program by b+, it a port of a ray tracing SpecBAS program by Paul Dunn)

3 Upvotes

r/BASICAnywhereMachine • • Aug 17 '23

Program QUEST-A, by Graham J. Percy (An ATARI 2600 SpectraVideo CompuMate BASIC program ported to QB, then ported to BAM)

3 Upvotes

Original source code and copyright here. The QB port by James D Jarvis here. And at the Internet Archive: SpectraVideo CompuMate User’s Manual

Please make sure to view the BAM source code for some notes regarding how I've altered the code a bit, one to address something to keep in mind regarding BAM (there are certain TiddlyWiki markup symbols that our BAM programs should never use, documentation pending), and I changed a couple of RND statements that I think need to also be done to the QB port. (PENDING SOME TESTING !!!)

How cool is that? A program written for the ATARI 2600 SpectraVideo CompuMate, ported without too much futzing to QB, and then from QB to BAM with even less futzing. Resurrecting old code like that, what awesome fun!


r/BASICAnywhereMachine • • Aug 16 '23

DOC File I/O

3 Upvotes

I see that BAM can write a file - i.e. download one - but can it read a file either locally or from the web?


r/BASICAnywhereMachine • • Aug 15 '23

DOC BAM's enhancements to wwwBASIC

3 Upvotes

Although I'm no javascript programmer, I've managed to make a large number of enhancements to the copy of wwwBASIC embedded in BAM: see the list.


r/BASICAnywhereMachine • • Aug 15 '23

DOC BAM Documentation

3 Upvotes

The BAM Programming Reference and User Guide.

This has a long way to go before it gets to where I want it. Also, I'm reviewing the bits I had done and making some changes, so you might find some bits and pieces a little bit broken .

However, the following topics in the "BAM Language Reference" subject are stable (these are direct links to the pages):

You might also like to check out the following:


r/BASICAnywhereMachine • • Aug 11 '23

Program "Quick Conway Life" program

3 Upvotes

My BAM port of a QB64 program by b+ :

Wikipedia Aritcle: Conway's Game of Life


r/BASICAnywhereMachine • • Aug 07 '23

DOC Why call it BASIC Anywhere Machine?

3 Upvotes

BASIC, because it is for programming in that programming language. The "why BASIC", I'll tackle that in a separate post.

Anywhere, because of simple requirements:

  • An instance of BASIC Anywhere Machine is just one HTML file (a "quine"), so everything that makes BASIC Anywhere Machine work and any program you create with it: they are all in that one file; every time you save your program(s), you are saving your program(s) along with everything that makes BASIC Anywhere Machine work to new HTML file, or overwriting the original file; all of that to say, it is an easy-peasy no-install-required file.

  • you only need a standards-compliant web browser

  • you can use it offline if you download it and store it locally (thumbdrive, SD card, hard drive ...)

  • you can use it online, the latest version, where I'm hosting it

  • you can use it online where you want it hosted, after downloading it and uploading it to your online site/host

Machine, because it is much like a "virtual machine" in the sense that, once loaded in a window/tab in your web browser, it has all it needs to:

  • create, edit, run, export BASIC programs

  • manage those programs like one would do with a file manager on an operating system

  • host in-built tools in the same way one would have software tools and/or tools provided by an operating system

  • handle, sometimes in minimalist ways, occasionally in robust ways, software development lifecycle activities

One could also think of a BASIC Anywhere Machine instance as a "bottle garden", in the sense that it is a self-sustaining BASIC programming ecosystem.


r/BASICAnywhereMachine • • Aug 04 '23

Welcome

3 Upvotes

Hello,

This reddit is for anything at all related to BASIC Anywhere Machine (short name: "BAM").

If you are the kind of person who excitedly celebrates BASIC (anything and everything BASIC, without any judgement and any discrimination), you will definitely fit in here.

Links:

And:


r/BASICAnywhereMachine • • Feb 14 '26

Program πŸ–₯ DRAW to generate a conical shape

Thumbnail
basicanywheremachine-news.blogspot.com
2 Upvotes

r/BASICAnywhereMachine • • Jul 27 '25

DOC πŸ“š Goals/benefits of BASIC Anywhere Machine

Thumbnail basicanywheremachine-news.blogspot.com
2 Upvotes

r/BASICAnywhereMachine • • Feb 23 '25

Program πŸ–₯ Rotating Icosahedron

Thumbnail
basicanywheremachine-news.blogspot.com
2 Upvotes

r/BASICAnywhereMachine • • Jan 04 '25

Program πŸ–₯ Bubbly Wonderment

Thumbnail
basicanywheremachine-news.blogspot.com
2 Upvotes

r/BASICAnywhereMachine • • Jan 03 '25

βš— Experiment in the Works: Editor toolbar buttons for inserting "whatever" into a program

Thumbnail
basicanywheremachine-news.blogspot.com
2 Upvotes

r/BASICAnywhereMachine • • Dec 24 '24

Merry Christmas / Happy Holidays !

2 Upvotes

Best wishes to you and yours !