eblc1388
Active Member
For two 8-bit numbers, 0-255.
Let says 20 & 10.
If you add 20 & 10, you get 30 with no carry.
However, if you subtract 10 from 20, you get 10 and also set the carry flag. Why would the PIC designer choose to do that? I don't know.
This setting of carry flag is easy to get wrong especially when one is used to other processors like 8051.
Let says 20 & 10.
If you add 20 & 10, you get 30 with no carry.
However, if you subtract 10 from 20, you get 10 and also set the carry flag. Why would the PIC designer choose to do that? I don't know.
This setting of carry flag is easy to get wrong especially when one is used to other processors like 8051.