Repeat: Difference between revisions

m
fix markup
m (syntax highlighting fixup automation)
m (fix markup)
Line 2,224:
===Using self-modifying code===
This method assumes the routine doesn't use the B register, or restores it before returning. Also, the actual "wrapper" used to repeat the passed function must be in RAM so that its instructions can be modified at runtime.
<syntaxhighlight lang="z80">
 
LD HL,myFunc
LD (repeatproc+1),HL
10,333

edits