UPI-41A/41AH/42/42AH USER’S MANUAL
ANL A,
Ý
data
Logical AND Accumulator With Immediate Mask
Opcode:
0 1 0 1
0 0 1 1
#
d
7
d
6
d
5
d
4
d
3
d
2
d
1
d
0
This is a 2-cycle instruction. Data in the accumulator is logically ANDed with an immediate-
ly-specified mask.
(A)
w
(A) AND data
Example:
ANDID: ANL A,
Ý
0AFH
;‘AND’ ACC CONTENTS
;WITH MASK 10101111
ANL A,
Ý
3
a
X/Y
;‘AND’ ACC CONTENTS
;WITH VALUE OF EXP
‘3
a
X/Y’
ANL PP,
Ý
data
Logical AND PORT 1 – 2 With Immediate Mask
Opcode:
1 0 0 1
1 0 p
1
p
0
#
d
7
d
6
d
5
d
4
d
3
d
2
d
1
d
0
This is a 2-cycle instruction. Data on the port ‘p’ is logically ANDed with an immediately-
specified mask.
(Pp)
w
(Pp) AND data
p
e
1 – 2
Note:
Bits 0 – 1 of the opcode are used to represent PORT 1 and PORT 2. If you are coding in binary
rather than assembly language, the mapping is as follows:
Bits
p1
p0
Port
0
0
X
0
1
1
1
0
2
1
1
X
Example:
ANDP2: ANL P2,
Ý
OF0H
;‘AND’ PORT 2 CONTENTS
;WITH MASK‘F0’ HEX
;(CLEAR P20 – 23)
ANLD Pp,A Logical AND Port 4 – 7 With Accumulator Mask
Opcode:
1 0 0 1
1 1 p
1
p
0
This is a 2-cycle instruction. Data on port ‘p’ on the 8243 expander is logically ANDed with
the digit mask contained in accumulator bits 0 – 3.
(Pp)
w
(Pp) AND (A0 – 3)
p
e
4 – 7
Note:
The mapping of Port ‘p’ to opcode bits p
1
, p
0
is as follows:
P1
P0
Port
0
0
4
0
1
5
1
0
6
1
1
7
Example:
ANDP4: ANLD P4,A
;‘AND’ PORT 4 CONTENTS
;WITH ACC BITS 0 – 3
32