🎵 In a world of fun and fantasy
myc64.com myvic20 myc128 | Founded 1981 - 2025
System Online load"*",8,1 ready
Commodore C64 BASIC Tokens
Token Range
$80-$FF
Total Tokens
128
BASIC Version
V2.0
Start Address
$A000
| Dec | Hex | Keyword | Category | Description | Example |
|---|---|---|---|---|---|
| PROGRAM CONTROL | |||||
| 128 | $80 | END | Control | Terminates program execution | 10 END |
| 129 | $81 | FOR | Control | Starts a FOR-NEXT loop | FOR I=1 TO 10 |
| 130 | $82 | NEXT | Control | Ends a FOR-NEXT loop | NEXT I |
| 137 | $89 | GOTO | Control | Jumps to specified line | GOTO 100 |
| 138 | $8A | RUN | Control | Starts program execution | RUN |
| 139 | $8B | IF | Control | Conditional statement | IF A=5 THEN 100 |
| 141 | $8D | GOSUB | Control | Calls a subroutine | GOSUB 1000 |
| 142 | $8E | RETURN | Control | Returns from subroutine | RETURN |
| 143 | $8F | REM | Comment | Comment line (remark) | 10 REM THIS IS A COMMENT |
| 144 | $90 | STOP | Control | Halts program execution | STOP |
| 145 | $91 | ON | Control | Multi-way branch | ON X GOTO 10,20,30 |
| 146 | $92 | WAIT | System | Wait for memory condition | WAIT 198,1 |
| DATA HANDLING | |||||
| 131 | $83 | DATA | Data | Defines data for READ | DATA 1,2,3,"HELLO" |
| 132 | $84 | INPUT# | I/O | Reads from file | INPUT#1,A$ |
| 133 | $85 | INPUT | I/O | Reads from keyboard | INPUT A$ |
| 134 | $86 | DIM | Data | Declares array dimensions | DIM A(10,10) |
| 135 | $87 | READ | Data | Reads DATA statements | READ A,B$ |
| 136 | $88 | LET | Data | Assigns value (optional) | LET A=5 |
| 140 | $8C | RESTORE | Data | Resets DATA pointer | RESTORE 100 |
| FILE OPERATIONS | |||||
| 147 | $93 | LOAD | File | Loads program from device | LOAD "GAME",8 |
| 148 | $94 | SAVE | File | Saves program to device | SAVE "PROG",8 |
| 149 | $95 | VERIFY | File | Verifies saved program | VERIFY "PROG",8 |
| 150 | $96 | DEF | Function | Defines user function | DEF FN A(X)=X*2 |
| 151 | $97 | POKE | Memory | Writes byte to memory | POKE 1024,65 |
| 152 | $98 | PRINT# | I/O | Writes to file | PRINT#1,"DATA" |
| 153 | $99 | I/O | Displays text/values | PRINT "HELLO" | |
| 154 | $9A | CONT | Control | Continues after STOP | CONT |
| 155 | $9B | LIST | Program | Lists program lines | LIST 10-100 |
| 156 | $9C | CLR | Memory | Clears variables | CLR |
| 157 | $9D | CMD | I/O | Redirects output | CMD 4 |
| 158 | $9E | SYS | System | Calls machine language | SYS 49152 |
| 159 | $9F | OPEN | File | Opens file channel | OPEN 1,8,2,"FILE" |
| 160 | $A0 | CLOSE | File | Closes file channel | CLOSE 1 |
| 161 | $A1 | GET | I/O | Gets single character | GET A$ |
| 162 | $A2 | NEW | Program | Clears program in memory | NEW |
| 163 | $A3 | GET# | I/O | Get character from file | GET#1,A$ |
| FUNCTIONS & OPERATORS | |||||
| 164 | $A4 | TAB( | Function | Tab to column position | PRINT TAB(10)"HI" |
| 165 | $A5 | TO | Operator | Used with FOR loops | FOR I=1 TO 10 |
| 166 | $A6 | FN | Function | User-defined function | Y=FN A(5) |
| 167 | $A7 | SPC( | Function | Print spaces | PRINT SPC(5)"HI" |
| 168 | $A8 | THEN | Conditional | Used with IF statement | IF A=5 THEN PRINT "YES" |
| 169 | $A9 | NOT | Operator | Logical NOT operator | IF NOT A THEN 100 |
| 170 | $AA | STEP | Operator | FOR loop increment | FOR I=1 TO 10 STEP 2 |
| 171 | $AB | + | Operator | Addition operator | A = B + C |
| 172 | $AC | - | Operator | Subtraction operator | A = B - C |
| 173 | $AD | * | Operator | Multiplication operator | A = B * C |
| 174 | $AE | / | Operator | Division operator | A = B / C |
| 175 | $AF | ^ | Operator | Exponentiation operator | A = B ^ C |
| 176 | $B0 | AND | Operator | Logical AND operator | IF A AND B THEN 100 |
| 177 | $B1 | OR | Operator | Logical OR operator | IF A OR B THEN 100 |
| 178 | $B2 | > | Operator | Greater than operator | IF A > B THEN 100 |
| 179 | $B3 | = | Operator | Equal to operator | IF A = B THEN 100 |
| 180 | $B4 | < | Operator | Less than operator | IF A < B THEN 100 |
| MATHEMATICAL FUNCTIONS | |||||
| 181 | $B5 | SGN | Function | Sign function | A = SGN(B) |
| 182 | $B6 | INT | Function | Integer function | A = INT(B) |
| 183 | $B7 | ABS | Function | Absolute value function | A = ABS(B) |
| 184 | $B8 | USR | Function | User-defined function | A = USR(B) |
| 185 | $B9 | FRE | Function | Free memory function | A = FRE(0) |
| 186 | $BA | POS | Function | Cursor position function | A = POS(0) |
| 187 | $BB | SQR | Function | Square root function | A = SQR(B) |
| 188 | $BC | RND | Function | Random number function | A = RND(1) |
| 189 | $BD | LOG | Function | Natural logarithm | A = LOG(B) |
| 190 | $BE | EXP | Function | Exponential function | A = EXP(B) |
| 191 | $BF | COS | Function | Cosine function | A = COS(B) |
| 192 | $C0 | SIN | Function | Sine function | A = SIN(B) |
| 193 | $C1 | TAN | Function | Tangent function | A = TAN(B) |
| 194 | $C2 | ATN | Function | Arctangent function | A = ATN(B) |
| 195 | $C3 | PEEK | Function | Read memory location | A = PEEK(1024) |
| STRING FUNCTIONS | |||||
| 196 | $C4 | LEN | Function | String length function | A = LEN(A$) |
| 197 | $C5 | STR$ | Function | Convert number to string | A$ = STR$(123) |
| 198 | $C6 | VAL | Function | Convert string to number | A = VAL("123") |
| 199 | $C7 | ASC | Function | ASCII value of character | A = ASC("A") |
| 200 | $C8 | CHR$ | Function | Character from ASCII value | A$ = CHR$(65) |
| 201 | $C9 | LEFT$ | Function | Left substring | A$ = LEFT$(B$,3) |
| 202 | $CA | RIGHT$ | Function | Right substring | A$ = RIGHT$(B$,3) |
| 203 | $CB | MID$ | Function | Middle substring | A$ = MID$(B$,2,3) |
| SPECIAL TOKENS | |||||
| 204 | $CC | GO | Reserved | Reserved token | N/A |
| 255 | $FF | π | Constant | Pi constant (3.14159...) | A = π * R * R |