cpu86 icon indicating copy to clipboard operation
cpu86 copied to clipboard

ALU_INC probably should not modify Carry Flag

Open ecm-pushbx opened this issue 4 years ago • 1 comments

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.

ecm-pushbx avatar Aug 05 '21 14:08 ecm-pushbx

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... :-(

nsauzede avatar Aug 05 '21 20:08 nsauzede