The ACI instruction
The ACI (Add with Carry Immediate) instruction is used to perform addition operations that take into account both the immediate 8-bit value and the state of the carry flag after the previous operation.
The ACI instruction format
| Instruction | Description |
|---|---|
| ACI imm8 | This format is used to add an immediate value with carry to register A. |
Usage example
; Author: Evgeny Sergeevich Dovgopolov main: mvi a, 50h ; Load the hexadecimal value 50h into register A stc ; Set the carry flag CY aci 20h ; Add 20h + the carry flag CY to the value in 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