ADI 8-bit data:
- This instruction adds the 8-bit data given within the instruction itself to the contents of the accumulator.
- The result is stored in the accumulator.
- All flags are modified.
- It is a two byte instruction.
- Immediate addressing mode is used.
Example:
If A = 20H
ADI 56H ; This instruction adds the contents of A (20H) to 56H and result 76H is stored in A.If A = 20H
ACI 8-bit data:
- This instruction adds the 8-bit data given within the instruction itself and the carry flag to the contents of the accumulator.
- The result is stored in the accumulator.
- All flags are modified.
- It is a two byte instruction.
- Immediate addressing mode is used.
Example:
If A = 30H and CY = 1
ACI 20H ; This instruction adds the contents of A (30H) to 20H with carry (1) and result 51H is stored in A.
DAD Rp:
- This instruction adds the contents of specified register pair to the contents of HL register pair.
- The result is stored in HL register pair.
- Rp is 16-bit register pair like BC, DE, HL or SP.
- Only higher order register is specified for the register pair.
- Only carry flag is modified.
- It is a one byte instruction.
- Register addressing mode is used.
Example:
If DE = 1000H and HL = 2000H
If DE = 1000H and HL = 2000H
DAD D ; This instruction adds the contents of DE (1000H) with HL (2000H) and result (3000H) is stored in HL.
Comments
Post a Comment