IP2022 User’s Manual—Instruction Set Architecture www.ubicom.com 221 SUBC W,fr Subtract Carry,W from fr into W Operation: W = fr - C - W Bits affected: C, DC, Z Opcode: 0100 100f ffff ffff Description: This instruction subtracts the contents of W and
the  complement  of  the  C  bit  (which  indicates
borrow)  from  the  contents  of  the  specified  data
memory location and writes the 8-bit result into W.
The data memory location is left unchanged. The
register contents are treated as unsigned values.
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