Category:Z80 Assembly: Difference between revisions
m
changed tags to display code correctly, corrected align 8 to 256
m (changed tags to display code correctly) |
m (changed tags to display code correctly, corrected align 8 to 256) |
||
Line 172:
Some programmers have taken this to its logical extreme by filling several kilobytes' worth of memory with <code>LDI</code> instructions, then pick how many they want to execute by offsetting a pointer to that section of memory. If you have plenty of bytes to burn and the need for speed, it can be a viable option.
<syntaxhighlight lang="Z80">
rept &7FF
LDI ;LDI takes up two bytes each, so by storing &7FF of them we fill up &0FFE bytes, nearly 4k!
endr
RET
</syntaxhighlight>
==References==
|