![]() |
|
| << Previous | Next >> | |
| | |
CP JKHL,BCDE Compare Rabbit 4000/5000 Instruction
ED 58 CP JKHL,BCDE JKHL - BCDE
Description
Compares JKHL with BCDE. These compares are accomplished by subtracting BCDE from JKHL. The result is:
BCDE > JKHL : S=1, C=1, Z=0, L/V=V
BCDE = JKHL : S=0, C=0, Z=1, L/V=V
BCDE < JKHL : S=0, C=0, Z=0, L/V=Vwhere "V" indicates that the overflow flag is set on an arithmetic overflow result. That is, the overflow flag is set when the operands have different signs and the sign of the result is different from the argument you are subtracting from (JKHL in this case). For example, the overflow flag will be set after the compare instruction if JKHL contains 0x80000000 and BCDE contains 0x00000001. The result of the subtraction is 0x7FFFFFFF, which has a different sign than 0x80000000.
| Rabbit Instructions | << Previous | Next >> | rabbit.com |