CMPS/CMPSX versus SUBS/SUBSX
ericball
Posts: 774
Is there any reason CMPS/CMPSX have·different opcodes than SUBS/SUBX instead of just having R=0?
(I love the Prop's ISA.· JMPRET especially.)
·
(I love the Prop's ISA.· JMPRET especially.)
·
Comments
For example (using eight bits instead of 32),
····00000001 (1) compared to
····10000000 (-128) yields C = 0, since 1 > -128
But,
····00000001 (1) minus
····10000000 (-128) yields 129, which is too big for a signed byte to hold, so C = 1, representing the overflow.
-Phil