The SBI instruction
The SBI (Subtract with Borrow Immediate) instruction is used for subtraction operations in which an immediate 8-bit value and the value of the carry flag (which represents a borrow from the previous operation) are subtracted from the accumulator.
The SBI instruction format
| Instruction | Description |
|---|---|
| SBI imm8 | This format is used to subtract an immediate value from register A with borrow. |
Usage example
; Author: Evgeny Sergeevich Dovgopolov main: mvi a, 80h ; Load the hexadecimal value 80h into register A stc ; Set the carry flag CY sbi 20h ; Perform subtraction with borrow of 20h from 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