Commit b939c39
committed
Fix GlobalBase: $0106 to account for entry code at $0100
The entry code (cl + hl = 6 bytes) occupies $0100-$0105.
Globals start at $0106. GlobalBase was $0100, causing global
variable writes to overwrite the entry code.
Programs now halt cleanly after execution (exit 0 instead of
crashing on underflow after return from init).
https://claude.ai/code/session_01GjUB9bjxa8QP7xoSqqGJWz1 parent ef1f2f7 commit b939c39
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1054 | 1054 | | |
1055 | 1055 | | |
1056 | 1056 | | |
1057 | | - | |
| 1057 | + | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
| |||
0 commit comments