Skip to content

Commit

Permalink
Add Stack section
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectroDeoxys committed Mar 19, 2024
1 parent 5d76ff7 commit d440dfe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/home/start.asm
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Init::
ldh [hDemoPowerUp], a
InitWithoutDemoPowerUpReset::
di
ld sp, $cfff
ld sp, wStackTop
ld hl, sp+$00
ld c, $00
ld c, 0 ; aka $100 bytes
xor a
.loop_clear_stack
ld [hld], a
Expand Down
2 changes: 2 additions & 0 deletions src/layout.link
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ WRAM0
"Level WRAM"
org $cc00
"Sprites WRAM"
org $cf00
"Stack"
WRAMX 1
"WRAM1"
org $d800
Expand Down
7 changes: 7 additions & 0 deletions src/wram.asm
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,13 @@ wcef1:: ; cef1
wNumMusicBoxes:: ; cef2
db

SECTION "Stack", WRAM0

wStackBottom:: ; cf00
ds $100 - 1
wStackTop:: ; cfff
db

SECTION "WRAM1", WRAMX

wObjects::
Expand Down

0 comments on commit d440dfe

Please sign in to comment.