RosettaCodeData/Task/Pointers-and-references/Z80-Assembly/pointers-and-references-5.z80
2023-07-01 13:44:08 -04:00

11 lines
301 B
Z80 Assembly

ld hl,PointerTable
ld a,(hl)
ld (SMC+1),a ;SMC+1 points to low byte of the operand
inc hl ;increment HL so we can fetch the high byte
ld a,(hl)
ld (SMC+2),a ;SMC+2 points to high byte of the operand
SMC:
ld a,&BEEF ;gets overwritten with the pointer stored in entry 0 of PointerTable.