2015-07-20 15:28:05 +00:00
|
|
|
GetPredefPointer:: ; 854b
|
2018-01-23 22:39:09 +00:00
|
|
|
; Return the bank and address of wPredefID in a and wPredefAddress.
|
2015-07-20 15:28:05 +00:00
|
|
|
|
|
|
|
; Save hl for later (back in Predef)
|
|
|
|
ld a, h
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wPredefTemp], a
|
2015-07-20 15:28:05 +00:00
|
|
|
ld a, l
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wPredefTemp + 1], a
|
2015-07-20 15:28:05 +00:00
|
|
|
|
|
|
|
push de
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wPredefID]
|
2015-07-20 15:28:05 +00:00
|
|
|
ld e, a
|
|
|
|
ld d, 0
|
|
|
|
ld hl, PredefPointers
|
2016-05-10 16:31:49 +00:00
|
|
|
add hl, de
|
|
|
|
add hl, de
|
|
|
|
add hl, de
|
2015-07-20 15:28:05 +00:00
|
|
|
pop de
|
|
|
|
|
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wPredefAddress + 1], a
|
2015-07-20 15:28:05 +00:00
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
ld [wPredefAddress], a
|
2015-07-20 15:28:05 +00:00
|
|
|
ld a, [hl]
|
|
|
|
|
|
|
|
ret
|
|
|
|
; 856b
|
|
|
|
|
2018-01-15 19:11:11 +00:00
|
|
|
INCLUDE "data/predef_pointers.asm"
|