RosettaCodeData/Task/Repeat/Z80-Assembly/repeat-3.z80
2023-07-01 13:44:08 -04:00

10 lines
191 B
Z80 Assembly

LD HL,myFunc
LD (repeatproc+1),HL
LD B,5 ;repeat count
CALL repeatProc
;somewhere far away from here:
repeatProc:
call &0000 ;gets overwritten with the address of MyFunc
djnz repeatProc
ret