AND W with F
AND the W register with 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’
[the_ad id=”3059″]Syntax:
[label] ANDWF f,d
Operands:
- f is from 0 to 127
- d is either 0 or 1
Operation:
Status Affected: Z
Example:
ANDWF REG,0
Before instruction:
REG = b’10101010’ W = b’01010101’
After instruction:
REG = b’10101010’ W = b’00000000’[the_ad id=”3059″]
Example:
ANDWF REG,1
Before instruction:
REG = b’10101010’ W = b’01010101
After instruction:
REG = b’00000000’ W = b’01010101