The SUI instruction
The SUI (Subtract Immediate) instruction is used to subtract an immediate value. This means that you can specify an 8-bit number directly in the instruction itself.
The SUI instruction format
| Instruction | Description |
|---|---|
| SUI imm8 | This format is used to subtract an immediate value from register A. |
Usage example
; Author: Evgeny Sergeevich Dovgopolov main: mvi a, 25h ; Load the hexadecimal value 25h into register A sui 05h ; Subtract the value 05h from register A hlt ; Stop program execution
Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".
Processor status flags
S
YesZ
YesAC
YesP
YesCY
Yes