The LDA instruction
The LDA (Load Accumulator) instruction loads an 8-bit data value from the specified memory location into the accumulator register.
The LDA instruction format
| Instruction | Description |
|---|---|
| LDA addr16 | This format is used to load an 8-bit data value into accumulator register A from the specified memory location. |
Usage example
; Author: Evgeny Sergeevich Dovgopolov data1: db 10h data2: db 20h main: lda data1 ; Load the value at the address of the variable data1 into register A mov b, a ; Copy the value of register A into register B lda data2 ; Load the value at the address of the variable data2 into register A mov c, a ; Copy the value of register A into register C hlt ; Stop program execution
Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".
Processor status flags
S
NoZ
NoAC
NoP
NoCY
No