Short: A BASIC implementation Author: Dave Ashley Uploader: mmartinka volny cz (Miloslav Martinka) Type: dev/lang Version: 1.0.2 Architecture: i386-aros This is an implementation of the language BASIC I made to expose my kids to programming. You should be able to build under linux if you have SDL installed, just do make ./basic There are a number of sample basic programs included. Within basic just do load cool run or load cool2 run etc. cool9 is an "asteroids" game. Arrow keys work for moving within the typed line, and through a line history. The page up and down keys, or shifted page up and down keys, scroll through a text history. **** BUILDING ON MAC OSX: If the SDL framework is installed in /Library/Frameworks/SDL.framework you should be able to build by just doing make -f Makefile.osx Basic interpreter commands. Commands can be shortened edit # = edit line, arrow keys, delete, backspace, always in insert mode ren [#[,#]] = renumber lines, first number is step count, 2nd start # save filename = save out program to file (appends .bas automatically) load filename = load program from file (appends .bas automatically) run = Initialize everything run program exit = Exit the program = Can execute any statement list [#[-#]] = list program or parts of it new = Delete program + all variables scr = same as new info = Print out info on current program parse = Parse the basic program and dump the virtual machine code help --- prints out help, more detail than this file Multiple statements can be on a line, separated by ':'. Variables are any string starting with a-z. Case is not sensitive. Can contain numbers. Up to 16 characters. Might not be able to start with a keyword. [let] variable = expression goto # gosub # return on expr goto #, ... ;one based rem dim variable(#[,...]) ; arrays are one based for variable = expression to espression [step expression] next [variable] print string|expression[,|;][...][,|;] color ,,[,] ; range 0-255 each cls ; clear screen to black fill ; fill screen with current pen color pen ; always circular for now, defaults to '1' move , spot line , NOT IMPLEMENTED:flood , ; does flood fill NOT IMPLEMENTED:arc ,, ; in radians NOT IMPLEMENTED: curve ,,, ; bezier curve rectangle ,,, box ,,<1/2 width>,<1/2 height> rect ,,<1/2 width>,<1/2 height> circle ,, disc ,, NOT IMPLEMENTED:text ,, NOT IMPLEMENTED:randomize input variable|string sleep