LDAX Rp:
- This instruction copies the contents of memory location to the accumulator.
- The address of the memory location is not given in the instruction directly.
- The address of the memory location is given by Rp register pair.
- The register pair can be BC or DE only.
- Only high order register is specified for register pair.
- No flags are affected.
- It is a one byte instruction.
- Indirect addressing mode is used.
Example:
If BC = 2000H and (2000H) = 30H
LDAX B ; This instruction loads the contents of memory location 2000H i.e. 30H into A.
If DE = 4200H and (4200H) = A4H
LDAX D ; This instruction loads the contents of memory location 4200H i.e. A4H into A.
STAX Rp:
- This instruction copies the contents of accumulator to the memory location.
- The address of the memory location is not given in the instruction directly.
- The address of the memory location is given by Rp register pair.
- The register pair can be BC or DE only.
- Only high order register is specified for register pair.
- No flags are affected.
- It is a one byte instruction.
- Indirect addressing mode is used.
Example:
If BC = 3000H and A = 80H
STAX B ; This instruction copies the contents of A i.e. 80H to the memory location 3000H.
If DE = 2100H and A = 54H
STAX D ; This instruction copies the contents of A i.e. 54H to the memory location 2100H.
XCHG:
- This instruction exchanges the contents of H register with D register and L register with E register.
- No flags are affected.
- It is a one byte instruction.
- Register addressing mode is used.
Example:
If DE = 2040H and HL = 2141H
XCHG ; This instruction loads the data as follows: H = 20H, L= 40H, D = 21H and E = 41H.
Comments
Post a Comment