Open ecm-pushbx opened 2 years ago
interesting !
Note that I'm not the author of this design, only a user of it in the past.. And indeed I had noticed some CF issues when trying to run some legacy code Perhaps you pinpointed the rootcause(s) of it..
I should really set up a serious usecase showing the issue I had, and try and debug it with your suggestion
Unfortunately, I lack the free time for that... :-(
https://github.com/nsauzede/cpu86/blob/2f77646c7964f2da55c872cdfd33ec94ad82dd01/cpu86_rtl/alu_rtl.vhd#L714
Here and in the following lines we have a separate entry for ALU_DEC noting that it doesn't modify the Carry Flag. ALU_INC is grouped with the ALU_ADD operations though. Perhaps this means
inc
instructions modify Carry when they shouldn't.