Comment by reidrac
5 days ago
The Z80 example in https://github.com/oisee/zvdb-z80/blob/master/ZVDB-Z80-ABAP.... doesn't look correct.
That:
ld ix, 0 ; accumulator
Is bugging me because 1. ix is not used in the function and 2. operations on ix are limited (and slow), can't be used as "accumulator". It is a 16-bit register to access memory as an index (and as extra two 8-bit limited registers if you use undocumented Z80 opcodes).
Besides, why use b register as counter in the loop and use dec and jr when there's djnz for that?
I haven't checked anything else, but that has a bad smell.
Using IX instead of HL or B even isn't going to break the bank. This code will still beat e.g. the output of SDCC on some normal C code.