mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
30 lines
443 B
NASM
30 lines
443 B
NASM
GetPredefPointer:: ; 854b
|
|
; Return the bank and address of PredefID in a and PredefAddress.
|
|
|
|
; Save hl for later (back in Predef)
|
|
ld a, h
|
|
ld [PredefTemp], a
|
|
ld a, l
|
|
ld [PredefTemp + 1], a
|
|
|
|
push de
|
|
ld a, [PredefID]
|
|
ld e, a
|
|
ld d, 0
|
|
ld hl, PredefPointers
|
|
add hl, de
|
|
add hl, de
|
|
add hl, de
|
|
pop de
|
|
|
|
ld a, [hli]
|
|
ld [PredefAddress + 1], a
|
|
ld a, [hli]
|
|
ld [PredefAddress], a
|
|
ld a, [hl]
|
|
|
|
ret
|
|
; 856b
|
|
|
|
INCLUDE "data/predef_pointers.asm"
|