Random Commodore Image
Commodore Header
🎵 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$80ENDControlTerminates program execution10 END
129$81FORControlStarts a FOR-NEXT loopFOR I=1 TO 10
130$82NEXTControlEnds a FOR-NEXT loopNEXT I
137$89GOTOControlJumps to specified lineGOTO 100
138$8ARUNControlStarts program executionRUN
139$8BIFControlConditional statementIF A=5 THEN 100
141$8DGOSUBControlCalls a subroutineGOSUB 1000
142$8ERETURNControlReturns from subroutineRETURN
143$8FREMCommentComment line (remark)10 REM THIS IS A COMMENT
144$90STOPControlHalts program executionSTOP
145$91ONControlMulti-way branchON X GOTO 10,20,30
146$92WAITSystemWait for memory conditionWAIT 198,1
DATA HANDLING
131$83DATADataDefines data for READDATA 1,2,3,"HELLO"
132$84INPUT#I/OReads from fileINPUT#1,A$
133$85INPUTI/OReads from keyboardINPUT A$
134$86DIMDataDeclares array dimensionsDIM A(10,10)
135$87READDataReads DATA statementsREAD A,B$
136$88LETDataAssigns value (optional)LET A=5
140$8CRESTOREDataResets DATA pointerRESTORE 100
FILE OPERATIONS
147$93LOADFileLoads program from deviceLOAD "GAME",8
148$94SAVEFileSaves program to deviceSAVE "PROG",8
149$95VERIFYFileVerifies saved programVERIFY "PROG",8
150$96DEFFunctionDefines user functionDEF FN A(X)=X*2
151$97POKEMemoryWrites byte to memoryPOKE 1024,65
152$98PRINT#I/OWrites to filePRINT#1,"DATA"
153$99PRINTI/ODisplays text/valuesPRINT "HELLO"
154$9ACONTControlContinues after STOPCONT
155$9BLISTProgramLists program linesLIST 10-100
156$9CCLRMemoryClears variablesCLR
157$9DCMDI/ORedirects outputCMD 4
158$9ESYSSystemCalls machine languageSYS 49152
159$9FOPENFileOpens file channelOPEN 1,8,2,"FILE"
160$A0CLOSEFileCloses file channelCLOSE 1
161$A1GETI/OGets single characterGET A$
162$A2NEWProgramClears program in memoryNEW
163$A3GET#I/OGet character from fileGET#1,A$
FUNCTIONS & OPERATORS
164$A4TAB(FunctionTab to column positionPRINT TAB(10)"HI"
165$A5TOOperatorUsed with FOR loopsFOR I=1 TO 10
166$A6FNFunctionUser-defined functionY=FN A(5)
167$A7SPC(FunctionPrint spacesPRINT SPC(5)"HI"
168$A8THENConditionalUsed with IF statementIF A=5 THEN PRINT "YES"
169$A9NOTOperatorLogical NOT operatorIF NOT A THEN 100
170$AASTEPOperatorFOR loop incrementFOR I=1 TO 10 STEP 2
171$AB+OperatorAddition operatorA = B + C
172$AC-OperatorSubtraction operatorA = B - C
173$AD*OperatorMultiplication operatorA = B * C
174$AE/OperatorDivision operatorA = B / C
175$AF^OperatorExponentiation operatorA = B ^ C
176$B0ANDOperatorLogical AND operatorIF A AND B THEN 100
177$B1OROperatorLogical OR operatorIF A OR B THEN 100
178$B2>OperatorGreater than operatorIF A > B THEN 100
179$B3=OperatorEqual to operatorIF A = B THEN 100
180$B4<OperatorLess than operatorIF A < B THEN 100
MATHEMATICAL FUNCTIONS
181$B5SGNFunctionSign functionA = SGN(B)
182$B6INTFunctionInteger functionA = INT(B)
183$B7ABSFunctionAbsolute value functionA = ABS(B)
184$B8USRFunctionUser-defined functionA = USR(B)
185$B9FREFunctionFree memory functionA = FRE(0)
186$BAPOSFunctionCursor position functionA = POS(0)
187$BBSQRFunctionSquare root functionA = SQR(B)
188$BCRNDFunctionRandom number functionA = RND(1)
189$BDLOGFunctionNatural logarithmA = LOG(B)
190$BEEXPFunctionExponential functionA = EXP(B)
191$BFCOSFunctionCosine functionA = COS(B)
192$C0SINFunctionSine functionA = SIN(B)
193$C1TANFunctionTangent functionA = TAN(B)
194$C2ATNFunctionArctangent functionA = ATN(B)
195$C3PEEKFunctionRead memory locationA = PEEK(1024)
STRING FUNCTIONS
196$C4LENFunctionString length functionA = LEN(A$)
197$C5STR$FunctionConvert number to stringA$ = STR$(123)
198$C6VALFunctionConvert string to numberA = VAL("123")
199$C7ASCFunctionASCII value of characterA = ASC("A")
200$C8CHR$FunctionCharacter from ASCII valueA$ = CHR$(65)
201$C9LEFT$FunctionLeft substringA$ = LEFT$(B$,3)
202$CARIGHT$FunctionRight substringA$ = RIGHT$(B$,3)
203$CBMID$FunctionMiddle substringA$ = MID$(B$,2,3)
SPECIAL TOKENS
204$CCGOReservedReserved tokenN/A
255$FFπConstantPi constant (3.14159...)A = π * R * R