Last active
April 1, 2018 11:48
-
-
Save adrian-castravete/4e6d8de7509b70dca4d1898daa3d9209 to your computer and use it in GitHub Desktop.
Memory initialisation routine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SECTION "High Ram", HRAM | |
RSSET $FF80 | |
state RB 1 | |
speed RB 1 | |
score RW 1 | |
height RW 1 | |
SECTION "Code", ROM0 | |
ResetInitial: | |
xor a | |
ldh [state], a | |
ld c, 4 | |
ld hl, score | |
.loop: ld [hli], a | |
dec c | |
jr nz, .loop | |
ld a, 100 | |
ldh [speed], a | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment