The ADI instruction

The ADI (Add Immediate) instruction is used to add an immediate value. This means that you can specify an 8-bit number directly in the instruction itself.

The ADI instruction format

InstructionDescription
ADI imm8 This format is used to add an immediate value to the 8-bit value in register A.

Usage example

; Author: Evgeny Sergeevich Dovgopolov

main:
    mvi     a, 10h  ; Load the hexadecimal value 10h into register A
    adi     20h     ; Add 20h to the value in register A

    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
Yes