I was playing around with zexdoc/zexall the other days and I noticed that the <inc,dec> iyh and the <inc,dec> iyl tests are in fact executing the INC/DEC IXH and INC/DEC IXL opcodes instead of INC/DEC IYH and INC/DEC IYL, although with different test data than the <inc,dec> ixh and the <inc,dec> ixl tests, if I am not mistaken. At a first glance it would seem that the INC/DEC IYH and INC/DEC IYL instructions are not tested at all even though the test name would suggest they are.
This seems to be the same for all versions downloaded from https://mdfs.net/Software/Z80/Exerciser/, including the original from YAZE.
Now, I am pretty new to the Z80 ASM and I can't say from looking at the source code, if this is the correct behavior or not.
Is this a bug in zexdoc/zexall? Or some ASM "magic" is going on there?
It would be awesome if somebody more knowledgeable could shed some light on this .
Below is the source code for the mentioned tests from zexdoc. You can notice that instead of FD they are DD prefixed.
Cheers!
Code: Select all
; <inc,dec> iyh (3072 cycles)
incyh: db 0d7h ; flag mask
tstr 0ddh,024h,0,0,02836h,09f6fh,09116h,061b9h,082cbh,0e219h,092h,073h,0a98ch
tstr 0,1,0,0,0ff00h,0,0,0,0,0,0,0,0 ; (512 cycles)
tstr 0,0,0,0,0,0,0,0,0,0,0d7h,0,0 ; (6 cycles)
db 02dh,096h,06ch,0f3h ; expected crc
tmsg '<inc,dec> iyh.................'
; <inc,dec> iyl (3072 cycles)
incyl: db 0d7h ; flag mask
tstr 0ddh,02ch,0,0,0d7c6h,062d5h,0a09eh,07039h,03e7eh,09f12h,090h,0d9h,0220fh
tstr 0,1,0,0,0ffh,0,0,0,0,0,0,0,0 ; (512 cycles)
tstr 0,0,0,0,0,0,0,0,0,0,0d7h,0,0 ; (6 cycles)
db 0fbh,0cbh,0bah,095h ; expected crc
tmsg '<inc,dec> iyl.................'