SuperBASIC Memory Map: Difference between revisions

From F256 Foenix
Jump to navigationJump to search
Line 25: Line 25:
| $00B0||$00EF|| Available Zero Page || 64
| $00B0||$00EF|| Available Zero Page || 64
|-
|-
| $00F0|| $00FF|| Kernel Arguments in Zero Page || 16
| $00F0|| $00FF|| Kernel Arguments in Zero Page* || 16
|-
|-
| $0100|| $01FF|| Hardware Stack of 6502 || 256
| $0100|| $01FF|| Hardware Stack of 6502 || 256
Line 31: Line 31:
| $0200|| $0228|| Basic mini-Kernel memory || 40
| $0200|| $0228|| Basic mini-Kernel memory || 40
|-
|-
| $0229|| $03FF|| Available Low Memory | Also used by Sound Command in BASIC || 470
| $0229|| $03FF|| Available Low Memory | Buffer area by Sound Command in BASIC (available if not using this command) || 470
|-
|-
| $0400|| $041F|| Control Storage first 8 bytes control syntax highlighting || 32
| $0400|| $041F|| Control Storage first 8 bytes control syntax highlighting || 32
Line 70: Line 70:
|-
|-
| $14:0000|| $1F:FFFF|| Future Expansions? || 768kb
| $14:0000|| $1F:FFFF|| Future Expansions? || 768kb
|}
=== *Detail of Kernel Arguments in Zero Page (TBC!) ===
{| class="wikitable"
|+
!Initial Address
!End Address
!Description
!bytes
|-
|$F0
|$F1
|Kernel Event Struct Pointer - points to an 8 byte buffer with a "kernel event" structure 
|2 bytes
|-
|$F3
|
|Kernel File stream number (Read or Write)
|1 byte
|-
|$F4
|
|Kernel File buffer length (Read or Write)
|1 byte
|-
|$F5
|$FA
|???
|6 bytes
|-
|$FB
|$FC
|Kernel Buffer Address Pointer - Multiple purpouse buffer area for recv/send data from Kernel Events
|2 bytes
|-
|$FD
|
|Kernel Buffer Length
|1 byte
|-
|$FE
|$FF
|Unknown
|2 bytes
|}
|}

Revision as of 09:53, 17 March 2024

Memory Map under BASIC

Caption text
Initial Address End Address Description Bytes
$0000 - MMU Control Register 1
$0001 - I/O Control Register 1
$0002 $0007 Free Zero Page Addresses 6
$0008 $000F MMU Control Addresses 8
$0010 $002F Free Zero Page Addresses 32
$0030 $003F Used Zero Page Addresses for (xx),Y Addressing 16
$0040 $0041 Current Address on screen of start of line 2
$0042 $004F Avaliable Zero Page Addresses 14
$0050 $00AF Number / Floating Point Stack for 16 numbers 96
$00B0 $00EF Available Zero Page 64
$00F0 $00FF Kernel Arguments in Zero Page* 16
$0100 $01FF Hardware Stack of 6502 256
$0200 $0228 Basic mini-Kernel memory 40
$0229 $03FF Buffer area by Sound Command in BASIC (available if not using this command) 470
$0400 $041F Control Storage first 8 bytes control syntax highlighting 32
$0420 $0814 Memory Storage 1012
$0814 $0FFF Available Low Memory 2027
$1000 $1FFF SuperBASIC Identifier Tables, allocated memory, string vars, stack 4kb
$2000 $77FF SuperBASIC Program Tokenized Code (grows Upward) 22kb
$7800 $7FFF Top 2k of SuperBASIC Program tokenize code or used for ML routines in low memory 2kb
$8000 $BFFF SUPERBASIC CODE 16kb
$C000 $DFFF I/O Memory Pages / Underlying Kernel Code (Selectable with I/O control Register) 8kb
$E000 $FFEF KERNEL CODE 8176
$FFF0 $FFFF Reset Vectors and NMI / IRQ / BRK Vectors 16
$01:0000 $02:2BFF Default Memory used by BASIC bitmap graphics 75kb
$02:2C00 $02:7FFF Available High Memory 21kb
$02:8000 $02:F000 Used for BASIC Cross Development w/PC or MAC (or Available High Memory) 32k
$03:0000 $03:7FFF Used for Sprite Data in BASIC 32kb
$03:8000 $03:FFFF Unless not running from Flash, Used for ROM Images 32k
$04:0000 $07:DFFF Available High Memory 248kb
$07:E000 $07:FFFF Being considered to be Reserved for Environmental Variables 8Kb
$10:0000 $13:FFFF Cartridge Expanded Memory (addresable only by CPU) 256kb
$14:0000 $1F:FFFF Future Expansions? 768kb

*Detail of Kernel Arguments in Zero Page (TBC!)

Initial Address End Address Description bytes
$F0 $F1 Kernel Event Struct Pointer - points to an 8 byte buffer with a "kernel event" structure 2 bytes
$F3 Kernel File stream number (Read or Write) 1 byte
$F4 Kernel File buffer length (Read or Write) 1 byte
$F5 $FA ??? 6 bytes
$FB $FC Kernel Buffer Address Pointer - Multiple purpouse buffer area for recv/send data from Kernel Events 2 bytes
$FD Kernel Buffer Length 1 byte
$FE $FF Unknown 2 bytes