Skip to content

Instantly share code, notes, and snippets.

@adrian-castravete
Last active April 1, 2018 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrian-castravete/4e6d8de7509b70dca4d1898daa3d9209 to your computer and use it in GitHub Desktop.
Save adrian-castravete/4e6d8de7509b70dca4d1898daa3d9209 to your computer and use it in GitHub Desktop.
Memory initialisation routine
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