© 2000 Scenix Semiconductor, Inc. All rights reserved.
69
SX Users Manual Rev. 3.1
www.scenix.com
Chapter 3 Instruction Set
3.6.3
AND fr,W
AND of fr and W into fr
Operation:
fr = fr & W
Bits affected:
Z
Opcode:
0001 011f ffff
Description:
This instruction performs a bitwise logical AND of the contents of the specified file
register and W, and writes the 8-bit result into the same file register. W is left un-
changed. If the result is 00h, the Z bit is set.
Cycles:
1
Example:
and
$10,W
;perform logical AND and overwrite fr
This example performs a bitwise logical AND of the working register W with a
value stored in file register 10h. The result is written back to the file register 10h.
For example, suppose that the file register 10h is loaded with the value 0Fh and W
contains the value 13h. The instruction takes the logical AND of 0Fh and 13h and
writes the result, 03h, into the same file register. The result is nonzero, so the Z bit
is cleared.