Maxim Integrated DS4830A Optical Microcontroller User Manual
Page 205
DS4830A User’s Guide
205
AND src
Logical AND
Description:
Performs a logical-AND between the active accumulator (Acc) and the specified src data.
For the complete list of src specifiers, reference the MOVE instruction. Because the source
field is limited to 8 bits, the PFX[n] register is used to supply the high-byte of data for 16
bit sources.
Status Flags:
S, Z
Operation:
Acc
Acc AND src
Encoding:
15
0
f001
1010
ssss
ssss
Example(s):
; Acc = 2345h for each example
AND A[3]
; A[3]=0F0Fh
;
Acc = 0305h, S=0, Z=0
AND #33h
;
Acc = 0001h
AND #2233h
; generates object code below
; MOVE PFX[0], #22h (smart-prefixing)
; AND #33h
;
Acc = 2201h
MOVE PFX[0], #0Fh
AND M0[8]
; M0[8]=0Fh (assume M0[8] is an 8-bit register)
;
Acc = 0305h
Special Notes:
The active accumulator (Acc) is not allowed as the src for this operation.
AND Acc. Logical AND Carry Flag with Accumulator Bit
Description:
Performs a logical-AND between the Carry (C) status flag and a specified bit of the active
accumulator (Acc.) and returns the result to the Carry.
Status Flags:
C
Operation:
C
C AND Acc.
Encoding:
15
0
1001
1010
bbbb
1010
Example(s):
; Acc = 2345h, C=1 at start
AND Acc.0
; Acc.0=1
C=1
AND Acc.1
; Acc.1=0
C=0
AND C, Acc.8
; Acc.8=1
C=0