PIC17CXX Instruction Set


SUBWF


Syntax : SUBWF f,d

Description : Subtracts (2's complement method) the W register from register 'f'.
              If 'd' is 0 the result is stored in the W register.
              If 'd' is 1 the result is stored back in register 'f'.

Function : (f) - (W) → d

Hex code : 04ff

Bit field:
0000 010d ffff ffff

Words : 1

Cycles : 1

Affected flags : Zero, Carry, Digit Carry, OVerflow

See also :   ADDWF,   ADDWFC,   MULWF,   SUBWFB
Previous    Upper level    Next