X is a letter (A-Z), Y is a letter or number (0-9). Variable names
can be more than 2 characters, but only the first two are recognized.
Arrays of up to eleven elements (subscripts 0-10) can be used
where needed. Arrays with more than eleven elements need to be
DIMensioned.
LOAD"NAME" | Loads a program from tape |
SAVE"NAME" | Saves a program on tape |
LOAD"NAME",8 | Loads a program from disk |
SAVE"NAME",8 | Saves a program to disk |
VERIFY"NAME" | Verifies that program was SAVEd without errors |
RUN | Executes a program |
RUN xxx | Executes program starting at line xxx |
STOP | Halts execution |
END | Ends execution |
CONT | Continues program execution from line where program was halted |
PEEK(X) | Returns contents of memory location X |
POKE X,Y | Changes contents of location X to value Y |
SYS xxxxx | Jumps to execute a machine language program, starting at xxxxx |
WAIT X,Y,Z | Program waits until contents of location X, when EORed with Z and ANDed with Y, is nonzero. |
USR(X) | Passes value of X to a machine language subroutine. |
LIST | Lists entire program
|
LIST A-B | Lists from line A to line B
|
REM Message | Comment message can be listed but is ignored during program execution |
TAB(X) | Used in PRINT statement. Spaces X positions on screen |
SPC(X) | PRINTs X blanks on line |
POS(X) | Returns current cursor position |
CLR/HOME | Positions cursor to left corner of screen |
SHIFT+CLR/HOME | Clears screen and places cursor in "Home" position |
SHIFT+INST/DEL | Inserts space at current cursor position |
INST/DEL | Deletes character at current cursor position |
CTRL | When used with numeric color key, selects text color. May be used in PRINT statement. |
CRSR keys | Moves cursor up, down, left, right on screen |
Commodore Key | When used with SHIFT selects between upper/lower case and graphic display mode. When used with numeric color key, selects optional text color |
DIM A(X,Y,Z) | Sets maximum subscripts for A; reserves space for (X+1)*(Y+1)*(Z+1) elements starting at A(0,0,0) |
LEN(X$) | Returns number of characters in X$ |
STR$(X) | Returns numeric value of X, converted to a string |
VAL(X$) | Returns numeric value of X$, up to first non-numeric character |
CHR$(X) | Returns ASCII character whose code is X |
ASC(X$) | Returns ASCII code for first character of X$ |
LEFT$(A$,X) | Returns leftmost X characters of A$ |
RIGHT$(A$,X) | Returns rightmost X characters of A$ |
MID$(A$,X,Y) | Returns Y characters of A$ starting at character X |
GOTO X | Branches to line X |
IF A=1 TO 10 | IF assertion is true THEN execute following part of statement. IF false, execute next line number |
FOR A=1 TO 10 STEP 2 | Executes all statements between FOR and corresponding NEXT, with A going from 1 to 10 by 2. Step size is 1 unless specified |
NEXT A | Defines end of loop. A is optional |
GOSUB 2000 | Branches to subtoutine starting at line 2000 |
RETURN | Marks end of subroutine. Returns to statement following most recent GOSUB |
ON X GOTO A,B | Branches to Xth line number on list. If X=1 branches to A, etc. |
ON X GOSUB A,B | Branches to subroutine at Xth line number in list |