Dear Mainteiners,
The attached code adds bytes 0x3e and 0xd7. I think it should not set the OV bit of the STATUS, but it does after the addwf.
It sets STATUS to 0x0b and it should be 0x03. Am I wrong?
Thank you,
Alvaro
PS: gpsim version:
gpsim -v
gpsim-0.31.0 # (Aug 17 2021)
Anonymous
Current operation looks correct to me,
0x3e + 0xd7 = 0x115 so bit 7 has overflowed and therefor I would expect the OV bit to be set.
Can anyone check on the real hardware what the processor does?
Hi Roy,
I think C bit should be set, but not OV bit since it does not overflow in signed arithmetic. I could not try on hardware, but used MPLAB and it does not set it.
See attached shot.
Regards,
Alvaro