Instruction Set Architecture—IP2022 User’s Manual 124 www.ubicom.com CMP W,fr Compare W,fr Operation: fr - W; result is discarded, STATUS is updated Bits affected: C, DC, Z Opcode: 0000 010f ffff ffff Description: This instruction subtracts the contents of W from
the   contents   of   the   specified   data   memory
location   and   discards   the   result.   The   data
memory location and W are left unchanged. Only
the STATUS register bits are updated.
If the result of subtraction is negative (W is larger
than fr), the C bit is cleared and the lower eight
bits of the result are written to W. Otherwise, the
C bit is set.
If there is a borrow from bit 3 to bit 4, the DC (digit
carry) bit is cleared. Otherwise, the bit is set.
If the result of subtraction is zero, the Z bit is set.
Otherwise, the Z bit is cleared.
Cycles: 1