AND Literal and W
The contents of W register are AND’ed with the eight-bit literal ‘k’. The result is placed in the W register.
Syntax:
[ label ] ANDLW k
Operation:
(W) .AND. (k) → (W)
Operands:
- k is from 0 to 255 (decimal)
Status Affected: Z
Example:
ANDLW 0x05
Before instruction:
W = 0x01
After instruction:
W = 0x01
Example:
ANDLW b'00010001'
Before instruction:
W = b'11110000'
After instruction:
W = b'00010000'