The STAX instruction
The STAX (Store Accumulator Extended) instruction stores the contents of the accumulator into the memory location pointed to by the BC or DE register pair.
The STAX instruction format
| Instruction | Description |
|---|---|
| STAX RP16 | This format is used to store the contents of the accumulator into the memory location pointed to by the BC or DE register pair. |
Usage example
; Author: Evgeny Sergeevich Dovgopolov data: db 00h main: mvi a, 12h ; Load the hexadecimal value 12h into register A lxi b, data ; Load the address of the data variable into the BC register pair stax b ; Store the value in accumulator A at the memory address (data) hlt ; Stop program execution
Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".
Processor status flags
S
NoZ
NoAC
NoP
NoCY
No