Repeat: Difference between revisions
m
fix markup
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Thundergnat (talk | contribs) 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
|