Memory model

The following addresses are subject to change. Visit this page for updates.

Zeropage

PET VIC-20 C64 C16 Plus/4 C128

$02-$14 18 bytes XC=BASIC Virtual Registers
$16-$3B 38 bytes Floating point workspace
$3C-$69 45 bytes Free space for FAST variables

X16

$22-$34 18 bytes XC=BASIC Virtual Registers
$35-$7F 74 bytes Free space for FAST variables
$A9-$CE 38 bytes Floating point workspace

Other reserved areas

VIC-20 C64 C16 Plus/4 C128

$033C-$03FB 192 bytes Temporary storage during string operations

PET

$033A-$03F9 192 bytes Temporary storage during string operations

X16

$0400-$04BF 192 bytes Temporary storage during string operations

Program code and data

Commodore-64

$0801 - $080C 12 bytes BASIC Loader (can be disabled)
$080D - ???? Program code
???? - ???? Library
???? - ???? Variables
???? - $CEFF Function stack (growing downwards)
$CF00 - $CFFF 256 bytes String stack

Commodore VIC-20 (Unexpanded)

$1001 - $100C 12 bytes BASIC Loader (can be disabled)
$100D - ???? Program code
???? - ???? Library
???? - ???? Variables
???? - $1CFF Function stack (growing downwards)
$1D00 - $1DFF String stack

Commodore VIC-20 (3K Expansion)

$0401 - $040C 12 bytes BASIC Loader (can be disabled)
$040D - ???? Program code
???? - ???? Library
???? - $1CFF Function stack (growing downwards)
$1D00 - $1DFF String stack

Commodore VIC-20 (8K expansion)

$1201 - $120C 12 bytes BASIC Loader (can be disabled)
$120D - ???? Program code
???? - ???? Library
???? - ???? Variables
???? - $3EFF Function stack (growing downwards)
$3F00 - $3FFF String stack

Commodore-16

$1001 - $100C 12 bytes BASIC Loader (can be disabled)
$100D - ???? Program code
???? - ???? Library
???? - ???? Variables
???? - $3EFF Function stack (growing downwards)
$3F00 - $3FFF String stack (growing downwards)

Commodore Plus/4

$1001 - $100C 12 bytes BASIC Loader (can be disabled)
$100D - ???? Program code
???? - ???? Library
???? - ???? Variables
???? - $7EFF Function stack (growing downwards)
$7F00 - $7FFF String stack

Commodore-128

$1001 - $100C 12 bytes BASIC Loader (can be disabled)
$100D - ???? Program code
???? - ???? Library
???? - ???? Variables
???? - $BEFF Function stack (growing downwards)
$BF00 - $BFFF 256 bytes String stack

Commander X16

???? - $06FF Function stack (growing downwards)
$0700 - $07FF 256 bytes String stack
$0801 - $080C 12 bytes BASIC Loader (can be disabled)
$080D - ???? Program code
???? - ???? Library
???? - ???? Variables