user manual

8XC251SA, SB, SP, SQ USER’S MANUAL
A-40
Flags:
Example: Set the CY flag if, and only if, P1.0 = 1, ACC. 7 = 1, and OV = 0:
MOV CY,P1.0 ;Load carry with input pin state
ANL CY,ACC.7 ;AND carry with accumulator bit 7
ANL CY,/OV ;AND with inverse of overflow flag
ANL CY,bit51
Binary Mode Source Mode
Bytes: 22
States: 1† 1†
†If this instruction addresses a port (P
x
,
x
= 0–3), add 1 state.
Hex Code in: Binary Mode = [Encoding]
Source Mode = [Encoding]
Operation: ANL
(CY) (CY) Λ (bit51)
ANL CY,/bit51
Binary Mode Source Mode
Bytes: 22
States: 1† 1†
†If this instruction addresses a port (P
x
,
x
= 0–3), add 1 state.
Hex Code in: Binary Mode = [Encoding]
Source Mode = [Encoding]
Operation: ANL
(CY) (CY) Λ Ø (bit51)
ANL CY,bit
Binary Mode Source Mode
Bytes: 43
States: 3† 2†
†If this instruction addresses a port (P
x
,
x
= 0–3), add 1 state.
[Encoding]
Hex Code in: Binary Mode = [A5][Encoding]
Source Mode = [Encoding]
CY AC OV N Z
————
[Encoding] 1 0 0 0 0 0 1 0 bit addr
[Encoding] 1 0 1 1 0 0 0 0 bit addr
1 0 1 0 1 0 0 1 1 0 0 0 0 y y y dir addr