mirror of
https://github.com/pret/pokegold-spaceworld.git
synced 2026-03-21 17:45:52 -05:00
Some checks failed
CI / build (push) Has been cancelled
* Fully labelled bank09.asm, started bank03.asm * Finished labelling bank03.asm and bank0b.asm * Tying up loose ends, splitting most of the completely labelled bank dumps * Moved pokedex letter graphics out of charmap
45 lines
597 B
NASM
45 lines
597 B
NASM
INCLUDE "constants.asm"
|
|
|
|
SECTION "home/jumptable.asm", ROM0
|
|
|
|
CallJumptable::
|
|
; CallJumptable
|
|
; Call function whose pointer is
|
|
; at index a in 2-byte pointer table
|
|
; pointed to by hl.
|
|
; Clobbers: a, hl
|
|
;
|
|
; This became rst $28 in final GSC.
|
|
push de
|
|
ld d, 0
|
|
ld e, a
|
|
add hl, de
|
|
add hl, de
|
|
pop de
|
|
ld a, [hli]
|
|
ld h, [hl]
|
|
ld l, a
|
|
jp hl
|
|
|
|
; Call the function pointed to by the 3-byte pointer at hl.
|
|
; Clobbers: a, hl.
|
|
CallPointerAt::
|
|
ldh a, [hROMBank]
|
|
push af
|
|
ld a, [hli]
|
|
call Bankswitch
|
|
|
|
ld a, [hli]
|
|
ld h, [hl]
|
|
ld l, a
|
|
|
|
call ._hl_
|
|
|
|
pop hl
|
|
ld a, h
|
|
call Bankswitch
|
|
ret
|
|
|
|
._hl_:
|
|
jp hl
|