4 ms·
I think this is true for memcpy from a constant to target- you can use "ld rr,nn" to load immediate constant then push to the destination: 21 cycles for two byt
by jhallenworld 6y ago
I think this is true for memcpy from a constant to target- you can use "ld rr,nn" to load immediate constant then push to the destination: 21 cycles for two bytes- 10.5 cycles per byte. But not the fastest for generic copy from one memory area to another, unless I'm missing something..
ld d,(hl) 7 cycles
inc hl 6 cycles
ld e,(hl) 7 cycles
inc hl 6 cycles
push de 11
18.5 cycles per byte, vs. 16 cycles per byte using ldi
- kayamon 6y agoZ80 has lots of registers; you POP from one stack, fill up as many registers as you can, then switch to the other stack and PUSH them all back. Use EXX etc to fill up the alternate registers too.