Commodore BASIC is the dialect of BASIC used in Commodore International's 8-bit home computer line, stretching from the PET of 1977 to the C128 of 1985. The core part was based on 6502 Microsoft BASIC, licensed from the young Microsoft on a "pay once, no royalties" basis.

A very convenient feature of Commodore's ROM-resident BASIC interpreter and KERNAL was the brilliantly implemented full screen editor, which allowed users to input, edit, and enter direct commands as well as program lines anywhere on the screen – simply by pressing the RETURN key whenever the cursor happened to be on a line containing a valid BASIC statement. This marked a huge leap forward in program entry interfaces compared to other common home computer BASICs at the time, which typically used a separate EDIT command for line editing.

Versions (in chronological order, with successively added features)

  • V1.0: PET 2001 with chiclet keyboard and built-in Datassette (original PET)
    • bug: arrays limited to 256 elements
    • bug: PEEK command won't work above memory location $C000

  • V2.0: PET 2001 with full-size keyboard & upgrade ROMs; VIC-20; C64
    • most 1.0 bugs squashed
    • PET easter egg – enter WAIT 6502, and see what happens...

  • V4.0: PET4000, 8000 series (and late version PET 2001's); CBM; CBM-II
    • disk operations: DLOAD,DSAVE,COPY,SCRATCH, etc (15 in all)
    • disk error-channel variables: DS,DS$

  • V3.5: C16, Plus/4
    • sound and graphics commands
    • joystick input: JOY
    • hexadecimal conversion: DEC(),HEX$()
    • flexible data read: RESTORE [linenumber]
    • string search function: INSTR
    • formatted printing: PRINT USING,PUDEF
    • alternative branching: ELSE
    • structured looping: DO,LOOP,WHILE,UNTIL,EXIT
    • function key assignment: KEY
    • program entry/editing: AUTO,DELETE,RENUMBER
    • dynamic error handling: TRAP,RESUME,ERR$()
    • debugging: TRON,TROFF

  • V7.0: C128
    • more sound and graphics commands, incl sprite handling
    • paddle, lightpen input: POT,PEN
    • exclusive or function: XOR
    • get variable address: POINTER
    • text mode windowing: WINDOW
    • controlled time delay: SLEEP
    • memory management: BANK,STASH,FETCH,SWAP
    • more disk operations: BOOT,BLOAD,BSAVE,DVERIFY,DCLEAR
    • undocumented, working: RREG (read CPU registers after a SYS)
    • undocumented, non-w.: OFF,QUIT