15 lines
332 B
Z80 Assembly
15 lines
332 B
Z80 Assembly
ld hl,PointerTable
|
|
ld a,(index)
|
|
add a ;this is a table of 16-bit values so double our index
|
|
add L
|
|
ld L,a
|
|
ld a,H
|
|
adc 0
|
|
ld H,a ;offset HL by our index
|
|
|
|
|
|
ld e,(hl)
|
|
inc hl
|
|
ld d,(hl) ;get the Ath entry of PointerTable and store it into DE.
|
|
|
|
ld (referenceStorage),DE ;store DE into ram for later use as a reference.
|