I try run code: ld bc,00130h ini after this operation BC=00030h, AF=00002h. Zero flag is not set!!! I check it in the simulator. As I see, in ZEXDOC/ZEXALL tests for ini/inir and outi/otir are not present. So it is possible that all of them are buggy.
I just tested your code (on the FPGA implemenated test machine provided in the NextZ80 package), and the flags are correctly set. After the INI instruction the F register contains 42h. Indeed the ZEXDOC do not test the in/out instructions, but I manually checked them all and they seem correct. I mention I am using XILINX ISE (v13.4) and a Spartan3AN board.
Very strange. I test using Altera Cyclone 3 and ZF does not set.
<p>Can you try other code:</p> <pre> ld bc,0030h inc b ini</pre>I retest and found, that INI does not change ZF. If ZF before INI were 1 then after it also contains 1, same with 0.
Yes, there is a problem. If ZF is 0 before INI, it will be 0 after INI. If ZF is 1 before INI, it will be correctly set after INI. I will provide a fix for this issue. Thank you for your help.
Yes, there is a problem. If ZF is 0 before INI, it will be 0 after INI. If ZF is 1 before INI, it will be correctly set after INI. I will provide a fix for this issue. Thank you for your help.
The bug is fixed on SVN.