i) ANA
- Syntax: ANA reg./M
- e.g. ANA B ;A<=A/\B
ii) ANI
- Syntax: ANI 8-bit data
- e.g. ANI 23H ;A<=A/\23H
iii) ORA
- Syntax: ORA Reg./M
- e.g. ORA B ;A<=A\/B
iv) ORI
- Syntax: ORI 8-bit data
- e.g. ORI 23H ;A<=A\/23H
v) XRA
- Syntax: XRA Reg./M
- e.g. XRA B ;A<=A⊕B
vi) XRI
- Syntax: XRI 8-bit data
- e.g. XRI 23H ;A<=A⊕23H
vii) CMA
- e.g. CMA ;complements the content of accumulator
viii) CMP
Syntax: CMP Reg./M
The contents of the operand (register/memory) are compared with the content of accumulator and both contents are preserved and the comparison is shown by setting the flags.
If A>Reg./M, CY=0, Z=0
If A=Reg./M, CY=0, Z=1
If A<Reg./M, CY=1, Z=0
ix) CPI
Syntax: CPI 8-bit data
If A>data, CY=0, Z=0
If A=data, CY=0, Z=1
If A<data, CY=1, Z=0
x) RLC
Each binary bit of the accumulator is rotated left by one position. Bit D7 is placed in the position of D0 as well as in the carry flag (CY). Other flags are not affected.
Syntax: RLC
Before RLC: 10100111, CY=0
After RLC: 01001111; CY=1
xi) RRC
Syntax: RRC
Before RLC: 10100111, CY=0
After RLC: 11010011; CY=1
xii) RAL
Each binary bit of the accumulator is rotated left by one position through the carry flag (CY). Other flags are not affected.
Syntax: RAL
Before RAL: 10100111, CY=0
After RAL: 01001110; CY=1
xiii) RAR
Each binary bit of the accumulator is rotated right by one position through the carry flag. Other flags are not affected.
Syntax: RAL
Before RAL: 10100111, CY=0
After RAL: 01010011; CY=1
xiv) DAA
Decimal Adjust Accumulator
The contents of accumulator are changed from binary value to two binary-coded decimal (BCD) digits. This is the only instruction that uses the AC flag to perform binary to BCD conversion. All flags are affected.
No comments:
Post a Comment