SUBLW

Subtract Literal with W

The W register is subtracted (2’s complement method) from the eight-bit literal ‘k’. The result is placed in the W register.

[the_ad id=”3059″]

Syntax:

[ label ] SUBLW k

Operation:

k – (W) → (W)

Operands:

  • k is from 0 to 255

Status Affected: None

Example:

Before instruction:
After instruction:
[the_ad id=”3059″]

Example:

Before instruction:
After instruction: