Joystick: (Arrow keys + Space = Fire)

Type commands on your keyboard. Press Escape (RUN/STOP) to break loops.

Load BASIC Sample:

Commodore 64 BASIC Quick Start

The Commodore 64 uses BASIC (Beginner's All-purpose Symbolic Instruction Code). You can interact in two ways:

System Commands

NEWErases program from memory.
RUNExecutes the current program.
LISTDisplays program lines on screen.

Variables

Only the first two characters of a variable name are significant.

  • Floats: A = 5.5
  • Integers: A% = 10
  • Strings: A$ = "HELLO"

Input & Output

  • PRINT — Output to screen
    10 PRINT "HELLO"
  • INPUT — Get user input
    20 INPUT "NAME"; N$
  • GET — Read single keypress
    30 GET K$

Program Flow

  • GOTO — Jump to a line
    50 GOTO 10
  • GOSUB / RETURN — Call subroutine
    60 GOSUB 200
  • IF...THEN — Conditional
    40 IF A > 10 THEN PRINT "BIG"

Loops

  • FOR...NEXT — Counted loop
    10 FOR I = 1 TO 5
    20 PRINT I
    30 NEXT I

Graphics & Sound

  • POKE — Write to memory
    POKE 53280, 0 (border black)
  • PEEK — Read from memory
    X = PEEK(53280)