INR R:
- This instruction increments the contents of specified register by 1.
- The result is stored in the same register.
- Register R can be any general purpose register like A, B, C, D, E, H and L.
- All flags are modified except carry flag.
- It is a one byte instruction.
- Register addressing mode is used.
Example:
If B = 50H
If B = 50H
INR B ; This instruction increments the contents of B (50H) by one and the result (51H) is stored in B.
INR M:
- This instruction increments the contents of the memory location pointed by HL register pair by 1.
- The result is stored in the same memory location.
- All flags are modified except carry flag.
- It is a one byte instruction.
- Register indirect addressing mode is used.
Example:
If HL = 1000H and (1000H) = 20H
If HL = 1000H and (1000H) = 20H
INR M ; This instruction increments the contents of location 1000H i.e. 20H by one and the result (21H) is stored in location 1000H.
INX Rp:
- This instruction increments the contents of the specified register pair by 1.
- The result is stored in the same register pair.
- Rp is 16-bit register pair like BC, DE, HL or SP.
- Only higher order register is specified for register pair.
- No flags are modified.
- It is a one byte instruction.
- Register addressing mode is used.
Example:
If HL = 2000H
INX H ; This instruction increments the contents of HL register pair (2000H) by one and the result (2001H) is stored in HL.
Comments
Post a Comment