The INR instruction

The INR (Increment) instruction is used to increase the value of the specified register or memory location by 1.

The INR instruction format

InstructionDescription
INR reg8 This format is used to increment the 8-bit value in a register.
INR mem8 This format is used to increment the 8-bit value in a memory location.

Usage example

; Author: Evgeny Sergeevich Dovgopolov

num: db 10h

main:
    mvi     a, 10h  ; Load the hexadecimal value 10h into register A
    inr     a       ; Increase the value in register A by 1
    lxi     h, num  ; Load the address of the variable num into the HL register pair
    inr     m       ; Increase the value of the variable num in memory by 1

    hlt             ; Stop program execution

Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".

Processor status flags

S
Yes
Z
Yes
AC
Yes
P
Yes
CY
No