Commands ======== Step to next line Step to next character, checking for line cont. char != 32-bit indirection " error # error $$= null-terminated string indirection $= cr-terminated string indirection % error & error ' error ( declare a label ) error * Pass on as operating system command + error , error - error . error / error 0-9 error : Step to next statement ; error < error = Return from function > error ?= 8-bit indirection @ Assign variable A..Z Assign variable a..z Assign variable [ Enter assembler \ error ] error ^ error _ Assign variable ` Assign variable { error |= Real indirection } error ~ error ABS error ACS error ADVAL error AND error APPEND Appends the file to the current program ASC error ASN error ATN error AUTO Generate line numbers AUTO Generate line numbers AUTO , Generate line numbers BEAT error BEATS Sets number of beats/bar BGET error BPUT#, Write least-significant byte of to output stream. BPUT#, Write to output stream followed by BPUT#,; Write to output stream. BY error CALL [,arg list] Call assembly language routine. CALL Call a BASIC program CASE OF Start of CASE structure CHAIN Load and run a program. CIRCLE [FILL] ,, Sends MOVE x,y:PLOT 145,r,0 [153,r,0] CLEAR Clear dynamic variables. CLG Sends VDU 16 to the output stream. CLOSE# Closes the specified channel. CLS Sends VDU 12 to the output stream. COLOUR Sends VDU 17,n to the output stream COLOUR , Sends VDU 19,l,p,0,0,0 to the output stream. COLOUR ,,, Sends VDU 19,l,16,r,g,b if l>=0 COLOUR ,,, Sends VDU 19,l,24,r,g,b if l<0 COLOUR OFF ... COLOUR ON ... COS error COUNT error CRUNCH Crunches the current program DATA Data for READ statement. DEF FNname[(arg list)] Define a function. DEF PROCname[(arg list)] Define a procedure. DEG error DELETE , Delete program lines. DIM struct{} Define a structure DIM struct{}=struct{} Define with a prototype DIM var [LOCAL] [,var ...] Reserve space in heap [on stack] DIM var(sub1[,sub2...])[,..] Dimension one or more arrays. DIV error DRAW [BY] , Sends PLOT 5,x,y [PLOT 1,x,y]. EDIT Calls the editor ELLIPSE [FILL] ,,, ELLIPSE [FILL] ,,,, ELSE Part of IF/THEN/ELSE and IF/THEN/ELSE/ENDIF END Terminate program. END= Sets top of BASIC workspace ENDCASE End of CASE structure ENDIF End of IF structure ENDPROC Return from a procedure. ENDWHILE End if WHILE structure ENVELOPE a,b,c,d,e,f,g,h,i,j,k,l,m,n Defines an envelope EOR error ERL error ERR error ERROR [EXT] , Generate an [external] error with error number and text . EVAL error EXIT FOR Exit current FOR loop EXIT FOR Exit specified FOR loop EXIT REPEAT Exit current REPEAT loop EXIT WHILE Exit current WHILE loop EXP error EXT#= Sets the extent of an open file. FILL [BY] , Sends to VDU FN error FOR var= TO Begin a FOR...NEXT loop. FOR var= TO STEP Begin a FOR...NEXT loop. GCOL Sends VDU 18,0,c to the VDU. GCOL , Sends VDU 18,m,c to the VDU. GCOL TINT Sends VDU 18,0,c to the VDU. GCOL , TINT Sends VDU 18,m,c to the VDU. GET error GET$ error GOSUB Call a BASIC subroutine. GOTO Branch to specified line. HELP Displays help HIMEM= Set top of memory used by BASIC. IF GOTO [ELSE ] IF THEN Start of block IF structure IF THEN [ELSE ] Branch if non-zero. IF THEN [ELSE ] Do statement(s) if non-zero. INKEY error INPUT [LINE][[,]]var[,var] Request input from user. INPUT#,var[,var...] Reads data from an opened file with multiple calls to BGET. INSTALL Installs library file at top of memory INSTR( error INT error LEFT$()= Overwrites leftmost characters of . LEFT$(,)= Overwrites leftmost characters of . LEN error LET var = Assignment. LIBRARY Loads library file to BASIC heap LINE ,,, Sends MOVE x1,y1:DRAW x2,y2 line number GOTO line number LIST List all or part of program. LIST List all or part of program. LIST , List all or part of program. LISTO Control indentation in LIST. LN error LOAD Load a program into memory. LOAD , Load data into memory. LOCAL DATA Save DATA pointer on stack LOCAL ERROR Save error handler on stack. LOCAL struct[,struct...] Declare structures local to function or procedure. LOCAL var[,var...] Declare variables local to function or procedure. LOG error LOMEM= Set start address of dynamic variable storage. LVAR Lists currently defines variables MID$(,)= Overwrites middle characters of MID$(>strvar>,,)= Overwrites middle characters of MOD error MODE Sends VDU 22,n to the output stream. MOUSE COLOUR ,,, MOUSE OFF MOUSE ON MOUSE ON MOUSE RECTANGLE ,,, MOUSE RECTANGLE OFF MOUSE STEP MOUSE STEP , MOUSE TO , MOUSE var,var,var MOUSE var,var,var,var MOVE [BY] , Sends PLOT 4,x,y [PLOT 0,x,y]. NEW Delete current program & variables. NEXT [var[,var...]] End FOR...NEXT loop. NOT error OF Part of CASE structure OFF Sends VDU 23,1,0,0,0,0,0,0,0,0 to the output stream. OLD Recover a program deleted by NEW. ON Sends VDU 23,1,1,0,0,0,0,0,0,0 to the output stream. ON GOSUB line,line.. [ELSE line] Computed GOSUB. ON GOTO line,line.. [ELSE line] Computed GOTO. ON PROCname.. [ELSE PROCname] Computed PROC call. ON CLOSE [LOCAL] OFF ON CLOSE [LOCAL] stmts RETURN ON ERROR OFF Restore default error handling. ON ERROR [LOCAL] stmts Do statement(s) on error. ON MOUSE [LOCAL] OFF ON MOUSE [LOCAL] stmts RETURN ON MOVE [LOCAL] OFF ON MOVE [LOCAL] stmts RETURN ON SYS [LOCAL] OFF ON SYS [LOCAL] stmts RETURN ON TIME [LOCAL] OFF ON TIME [LOCAL] stmts RETURN OPENIN error OPENOUT error OPENUP error OR error ORIGIN , Sends VDU 29,x;y; OSCLI Pass to operating system to execute a command. OTHERWISE Part of CASE structure OVERLAY array() PAGE= Set memory address of current user's program. PI error PLOT , Sends VDU 25,69,x;y; PLOT ,, Sends VDU 25,k,x;y; PLOT BY , Sends VDU 25,65,x;y; POINT( error POS error PRINT [TAB(x[,y])][SPC(n)]['][;][~][#][/][[,...][;] Print data to output stream. PRINT#,[,...] Writes data to an opened file with multiple calls to BPUT. PRIVATE struct[,struct...] Declare structures private to function or procedure. PRIVATE var[,var...] Declare variables private to function or procedure. PROC()[(parameter list)] Call a procedure indirectly. PROCname[(parameter list)] Call a procedure. PTR#= Sets the current pointer for an open file. PUT , Output to port QUIT Exits BASIC QUIT Exits BASIC, returning return value RAD error READ var[,var...] Read data from DATA statement(s). READ#,var[,var...] Reads data from an opened file with multiple calls to BGET. RECTANGLE SWAP ,, TO , RECTANGLE SWAP ,,, TO , RECTANGLE [FILL] ,, RECTANGLE [FILL] ,,, RECTANGLE [FILL] ,,, TO , REM any text Remark RENUMBER Renumber the program lines. RENUMBER , Renumber the program lines. RENUMBER Renumber the program lines. REPEAT Begin a REPEAT...UNTIL loop. REPORT Print error message for last error. RESTORE Reset data pointer to start of program RESTORE + Reset data pointer to relative line RESTORE Reset data pointer to specified line. RESTORE DATA Restore data pointer RESTORE ERROR Restore error handler RETURN Return from subroutine. RIGHT$()= Overwrites rightmost characters of . RIGHT$(,)= Overwrites rightmost characters of . RND error RUN Run the current program. RUN Load and run the specified file SAVE Save program using name in REM > SAVE Save program SAVE ,,[,[,]] Save data from memory SGN error SIN error SOUND ,,, Generates sounds. SOUND OFF Turns off sound output. SOUND ON Turns on sound output. SPC error SQR error STEP error STEREO , Set stereo position STOP Stop program and print message. SUM error SWAP , Swap two variables SYS [,...] [TO ...[;]] TAB( error TAN error TEMPO TEXTLOAD TEXTSAVE THEN Part of IF structure TIME$= Sets the system real-time clock. TIME= Sets system elapsed time counter. TINT , TO error TRACE CLOSE Close trace file TRACE TO Open output to trace file TRACE [STEP] Trace lines less than . TRACE [STEP] OFF End trace mode. TRACE [STEP] ON Start trace mode. TRACE [STEP] PROC Trace PROC/FN calls TRUE error TWIN Calls TWIN TWINO Calls TWIN UNTIL Terminate loop if is non-zero. USR error VAL error VDU [,|;[...]][|] Sends a list of numeric arguments to the VDU. A 16-bit value can be sent VOICE error VOICES VPOS error WAIT Wait for VSync WAIT Wait for centisecond period WHEN ... Part of CASE WHILE Start of WHILE structure WIDTH Set print output width. Functions ========= Step to next character ! 32-bit indirection " constant string # error, print operator $$ null-terminated string indirection $ cr-terminated string indirection % binary number & hex number &o octal number ' error, print operator ( Bracketed expression ) error * error + unary plus , error, print operator - Unary minus . decimal number / error, print operator 0..9 decimal number : error, statement terminator ; error, print operator < error = error > error ? 8-bit indirection @ variable A..Z variable a..z variable [ error \ error, line continuation ] error ^ Address of identifier _ variable ` variable { error | Real indirection } error ~ error, print operator ABS Absolute value of . ACS Arc-cosine of , in radians. ADVAL Returns information about devices or buffers AND error APPEND error ASC Returns ASCII value of first character of or -1 ASN Arc-sine of , in radians. ATN Arc-tangent of , in radians. AUTO error BEAT Current beat number BEATS error BGET# Reads a byte from a channel BPUT error CALL error CASE error CHAIN error CHR$ Returns one-character string with ASCII value of . CIRCLE error CLEAR error CLG error CLOSE error CLS error COLOUR error - though check extensions COS Cosine of radian . COUNT Returns number of characters printed since last new line. CRUNCH error DATA error - though check extensions DEF error DEG Value in degrees of radian . DELETE error DIM(array()) Returns size of array. DIM(array(),element) Returns size of array element. DIM(struct{}) Returns size of structure DIV error DRAW error EDIT error EDITO error ELLIPSE error ELSE error END Returns end of BASIC's variable heap. ENDCASE error ENDIF error ENDPROC error ENDWHILE error ENVELOPE error EOF# Returns TRUE if at the end of the opened file specified by the handle. EOR error ERL Returns line number of last error. ERR Returns error number of last error. ERROR error EVAL Evaluates as an expression. EXIT error EXP e raised to the power of . EXT# Returns the length of the opened file. FALSE Returns zero. FILL error FNname[(parameter list)] User-defined numeric or string function. FOR error GCOL error - though check extensions GET Waits for keypress and returns ASCII value. GET$ Waits for keypress and returns one-character string. GET$# Read a - or -terminated string from open file. GET$(,) Reads a character from the specified character position. GET() Reads a value from the specified I/O port. GET(,) Reads a character from the specified character position. GOSUB error GOTO error HELP error HIMEM Returns top of memory used by BASIC. IF error INKEY Waits for keypress or scans keyboard INKEY$ Waits for keypress or scans keyboard INPUT error INSTALL error INSTR(,) Returns position of string INSTR(,,) Returns position of string, starting at position. INT Largest integer less than . LEFT$() Returns leftmost LEN()-1 characters of . LEFT$(,) Returns leftmost characters of . LEN Returns length of . LET error LIBRARY error LINE line number line number line number LIST error LISTO error LN Natural logarithm of . LOAD error LOCAL error LOG Base-ten logarithm of . LOMEM Returns start address of dynamic variable storage. LVAR error MANDEL error MID$(,) Returns sub-string from position to end. MID$(,,) Returns sub-string from position of length. MOD array Modulus of array MODE Returns current screen mode. MOUSE error MOVE error NEW error NEXT error NOT Bitwise inversion OF error OFF error OLD error ON error OPENIN Opens a file for reading and returns handle. OPENOUT Opens a file for writing and returns handle. OPENUP Opens a file for update and handle. OR error ORIGIN error OSCLI Passes to operating system, returns return value OTHERWISE error OVERLAY error PAGE Returns address of program. PI Returns 3.14159265. PLOT error POINT(,) Returns colour of the screen at the coordinates. POS Returns horizontal text cursor position. PRINT error PROC error PTR# Returns current pointer for an open file. QUIT Returns FALSE if program run from BASIC editing mode RAD Radian value of in degrees. READ error RECTANGLE error REM error RENUMBER error REPEAT error REPORT error REPORT$ Returns error message for last error. RESTORE error RETURN error RIGHT$() Returns rightmost one character of . RIGHT$(,) Returns rightmost characters of . RND Returns random 32-bit integer RND () RND(-n) seeds sequence. RND () RND(0) repeats last value in RND(1) form. RND () RND(1) returns number between 0 and 0.999999999 RND () RND(n) returns random integer between 1 and n. RUN error SAVE error SGN 1 if >0, 0 if =0, -1 if <0. SIN Sine of radian . SOUND error SPC error, print operator SQR Square root of . STEP error STEREO error STOP error STR$# Returns string representation in oct STR$/ Returns string representation in binary STR$ Returns string representation in decimal STR$~ Returns string representation in hex STRING$(,) Returns a string consisting of copies of . SUM Sum of all elements in an array SUMLEN Sum of length of all strings in an array SWAP error SYS error TAB( error, print operator TAN Tangent of radian . TEMPO Current microbeat tempo TEXTLOAD error TEXTSAVE error THEN error TIME Reads the elapsed 100Hz time clock. TIME$ Reads the system real-time clock TINT(,) Reads tint at point TO error TOP Returns first address after end of user's program. TRACE Handle of current TRACE file TRUE Returns -1. TWIN error TWINO error UNTIL error USR Calls a machine code routine and returns integer. VAL Returns numeric value of or zero VDU Returns the VDU variable at offset . VOICE error VOICES error VPOS Returns the vertical position of the text cursor. WAIT error WHEN error WHILE error WIDTH Returns print output width. Operators - = ================================== * Multiplication. + Addition or string concatenation. - Negation or subtraction. / Division. < Less than. << Shift left <= Less than or equal. <> Inequality. = Equality. > Greater than. >= Greater than or equal. >> Shift right signed >>> Shift right unsigned AND Bitwise AND. DIV Integer division. EOR Bitwise exclusive-OR. MOD Modulus. OR Bitwise OR. ^ Raise to power. Is there anything strictly stopping !, ? being operators? fred=1!2:jim=3?4:PRINT 5!6,7?8 Compound Operators - = ====================================== *= Multiplication. += Addition or string concatenation. -= Negation or subtraction. /= Division. AND= Bitwise AND. DIV= Integer division. EOR= Bitwise exclusive-OR. MOD= Modulus. OR= Bitwise OR. Binary Indirection - = ================================================== ! 32-bit indirection ? 8-bit indirection SkipSpace subroutine deals with line continuation character BBFW: Shouldn't =QUIT return TRUE if compiled, FALSE if IDE?