User Tools

Site Tools


sd:appendix_3_memory_map

This is an old revision of the document!


Appendix 3. Memory Map

This is Appendix 3 of the SD-8516 Programmer's Reference Guide.

Memory Map

BANK 0 - User RAM & System Variables ($00,0000–$00,FFFF)

Address Range Size Name / Area Description / Notes
$000000–$00FFFF 61,184 B User RAM General purpose free RAM
$000100–$00FF00 ~64 KB BASIC Program Area Main BASIC program storage (see int0x05h.sda)

Total free in Bank 0: ≈65,280 bytes

BANK 1 - KERNAL ROM & HARDWARE ($010000–$01FFFF)

Address Range Size Name / Symbol Description / Notes
$010000–$0100FF 256 bytes Kernal Bootstrap Reserved for boot code
$010100–$013FFF ~16 KB Kernal Code Main KERNAL routines + limited expansion space
$014000–$01DBFF 40,960 bytes RESERVED Reserved for future KERNAL expansion
$01DB00–$01DBFF 256 bytes PATB_TBUF ROM BASIC tokenizer scratch space (currently underused?)
$01DC00–$01DFFF 1,024 bytes Stack Space Hardware stack (grows down from $01DFFF; overflow if SP < $01DC00)
$01E000–$01E7FF 2,048 bytes VM1_CHAR_ROM PETSCII font data (copied from character ROM at initialization)
$01E800–$01E8FF 256 bytes Kernal Workspace Reserved for KERNAL internal use
$01E900–$01EBFF 768 bytes INT_VECTOR_TABLE Interrupt vector table (256 vectors × 3 bytes = 24-bit addresses, little-endian)
$01EC00–$01ECFF 256 bytes SCRATCH_BUFFER General-purpose scratch space (used by INPUT, expression eval, parsing, etc.)
$01ED00–$01EDFF 256 bytes INPUT_BUFFER Input line buffer (also used as part of PATB system variables)
$01EE00–$01EEFF 256 bytes PATB_VARIABLES + stacks etc. PATB_BASIC variables, expression stack, GOSUB/FOR stacks, program pointers…
$01EF00–$01EF0B 12 bytes Video System Registers VIDEO_MODE, VIDEO_COLUMNS, VIDEO_ROWS, VIDEO_CHAR_WIDTH/HEIGHT, VIDEO_CLOCK…
$01EF0C–$01EF0F 4 bytes Cursor System CURSOR_BLINK, CURSOR_STATE, CURSOR_X, CURSOR_Y
$01EF10–$01EF31 34 bytes Keyboard System KBD_STATUS_FLAGS, KEYBOARD_COUNT, KEYBOARD_BUFFER (32 bytes)
$01EF32–$01EF3A 9 bytes Input/Syscall System INPUT_MODE, INPUT_LENGTH, SYSCALL_STATUS/ADDR, KBPC (BASIC program counter)
$01EF3B–$01EF42 8 bytes FREE Reserved for future use
$01EF43–$01EF49 7 bytes Extended Video System VIDEO_COLOR_MODE, VIDEO_TEXT_BASE, VIDEO_COLOR_BASE
$01EF4A–$01EF7F 54 bytes FREE Reserved for hardware expansion
$01EF80–$01EFBF 64 bytes Sound System (4 voices) 4 × SID-like voices (frequency, gate, ADSR, volume, etc.)
$01EFC0–$01EFFF 64 bytes FREE Reserved for sound system expansion
$01F000–$01F3E7 1,000 bytes VM1_TEXT_BASE Video Mode 1 – 40×25 text character map
$01F3E8–$01F7FF 1,048 bytes FREE (text area)
$01F800–$01FBE7 1,000 bytes VM1_COLOR_BASE Video Mode 1 – 40×25 color attribute map
$01FBE8–$01FFFF 1,048 bytes FREE (color area)

BANK 2 – USER RAM ($020000–$02FFFF)

Address Range Size Name / Area Description
$020000–$02FFFF 65,536 B User RAM Completely free

BANK 3 – USER RAM ($030000–$03FFFF)

Address Range Size Name / Area Description
$030000–$03FFFF 65,536 B User RAM Completely free

Quick Free Space Summary

Bank Free Bytes Notes
0 65,280 Mostly user RAM + small BASIC area
1 ~40,960 Reserved for future KERNAL expansion
2 65,536 Completely free
3 65,536 Completely free
Total 237,312 Available for user programs & data
sd/appendix_3_memory_map.1771987844.txt.gz · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki