Format |
Syntax: |
Operation: |
Operands: |
Architecture revision |
Opcode | ||||||||||
|
1 |
cp.b Rd, Rs |
Rd[7:0] - Rs[7:0]; |
{d, s} ∈ {0, 1, …, 15} |
Rev1+ |
|
Performs a compare between the lowermost bytes in the two operands specified. The operation is implemented by doing a subtraction without writeback of the difference. The operation sets the status flags according to the result of the subtraction, but does not affect the operand registers.
|
Q: |
Not affected |
|
V: |
V = (Rd[7] AND ~Rs[7] AND ~RES[7]) OR (~Rd[7] AND Rs[7] AND RES[7]) |
|
N: |
N = RES[7] |
|
Z: |
Z = (RES[7:0] == 0) |
|
C: |
C = ~Rd[7] AND Rs[7] OR Rs[7] AND RES[7] OR ~Rd[7] AND RES[7] |