Compare commits
4
Commits
main
...
de9ac7fe72
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de9ac7fe72 | ||
|
|
1fc4515f6b | ||
|
|
f4ae43bbc1 | ||
|
|
f27715b5b3 |
@@ -0,0 +1,21 @@
|
|||||||
|
# Memory Map
|
||||||
|
|
||||||
|
To not have to allocate a ton of things at run time the Standard Library uses a static memory map for some purposes
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
| Start | Use |
|
||||||
|
| ---- | ---- |
|
||||||
|
| `0x0` | Reset Vector |
|
||||||
|
| `0x16` | Zero Page |
|
||||||
|
| `0x100` | User Code |
|
||||||
|
| `?` | Library Code |
|
||||||
|
| `0x1_0000` | LUTs |
|
||||||
|
| `?` | heap |
|
||||||
|
| `0xXXF0_0000` | Stack |
|
||||||
|
| `0xXXFF_0000` | quick access |
|
||||||
|
|
||||||
|
## Zero Page
|
||||||
|
Some values are needed not often enough to get their own special register, but often enough that it makes sense to keep them at a quickly accessible location.
|
||||||
|
This is what the zero page is for. its position in memory allows us to load them into a register with a single instruction.
|
||||||
|
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
jmp 0x100
|
||||||
|
|
||||||
|
@0x10
|
||||||
|
screen:
|
||||||
|
frambuffer_ptr: U32 0x0
|
||||||
|
size: U32 0x0
|
||||||
|
position_xy: U32 0x0
|
||||||
|
mode: U32 0x0
|
||||||
|
|
||||||
|
@0x100
|
||||||
Reference in New Issue
Block a user