File: memory-layout.md | Updated: 11/18/2025
Detailed documentation of bootOS memory organization.
``` āāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā Address Range ā Size ā Purpose ā āāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāā⤠ā 0x0000:0x0000 ā 4 bytes ā INT 0x00 (Divide by zero) ā ā 0x0000:0x0004 ā 4 bytes ā INT 0x01 (Single step) ā ā ... ā ... ā ... ā ā 0x0000:0x0080 ā 4 bytes ā INT 0x20 (Exit to OS) ā ā 0x0000:0x0084 ā 4 bytes ā INT 0x21 (Input key) ā ā 0x0000:0x0088 ā 4 bytes ā INT 0x22 (Output char) ā ā 0x0000:0x008C ā 4 bytes ā INT 0x23 (Load file) ā ā 0x0000:0x0090 ā 4 bytes ā INT 0x24 (Save file) ā ā 0x0000:0x0094 ā 4 bytes ā INT 0x25 (Delete file) ā ā ... ā ... ā ... ā ā 0x0000:0x03FF ā ā End of IVT ā āāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāā⤠ā 0x0000:0x0400 ā 256 B ā BIOS Data Area ā āāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāā⤠ā 0x0000:0x0500 ā ~29 KB ā Free/Available Memory ā āāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāā⤠ā 0x0000:0x7700 ā 128 B ā Stack (grows downward) ā ā ā ā SP starts at 0x7700 ā āāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāā⤠ā 0x0000:0x7780 ā 128 B ā Line Input Buffer ā ā ā ā Used by input_line ā āāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāā⤠ā 0x0000:0x7800 ā 512 B ā Directory Sector Cache ā ā ā ā Track 0, Sector 2 ā āāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāā⤠ā 0x0000:0x7A00 ā 512 B ā bootOS Code ā ā ā ā Runtime location ā āāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāā⤠ā 0x0000:0x7C00 ā 512 B ā Boot Sector / Program Area ā ā ā ā Initial load, execution ā āāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāā⤠ā 0x0000:0x7E00 ā ~480 KB ā Available / Video Memory ā āāāāāāāāāāāāāāāāāāāāāāāāāāā“āāāāāāāāāāā“āāāāāāāāāāāāāāāāāāāāāāāāāāāāā ```
Defined in os.asm:158-162:
```nasm stack: equ 0x7700 ; Stack pointer (grows to lower addresses) line: equ 0x7780 ; Buffer for line input sector: equ 0x7800 ; Sector data for directory osbase: equ 0x7a00 ; bootOS location boot: equ 0x7c00 ; Boot sector location ```