HYUNDAI MicroElectonics
20
AND
( Logical AND )
Function
: A
( A )
( M ) or A
( A )
#imm
Description : Logical AND of the accumulator and the contents of memory( or immediate data).
The result is left in the accumulator.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
AND #imm
84
2
2
AND dp
85
2
3
AND dp + X
86
2
4
AND !abs
87
3
4
AND !abs + Y
95
3
5
AND [ dp + X ]
96
2
6
AND [ dp ] + Y
97
2
6
AND { X }
94
1
3
Example
:
85 F6D1 C531
LDA
OMODE
;
86 F6D3 84FB
AND
#11111011B
;
87 F6D5 E531
STA
OMODE
;
AND1
( Bit logical AND )
Function
: C
( C )
( M.bit )
Description : Logical AND of the carry flag and the specified bit of memory.
The results is left in the carry flag.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
AND1 M.bit
8B
3
4
* The bit4 of 3rd byte is set to "0".
Example
:
64
KEYONF
EQU
1,23H
65
;
66
;
67 F046 FF
NOP
68 F047 FF
NOP
69 F048 8B2320
AND1
KEYONF
; C ^ 23H.1 -> C