The STA instruction

The STA (Store Accumulator) instruction stores the 8-bit contents of the accumulator (A) in the specified memory location.

The STA instruction format

InstructionDescription
STA addr16 This format is used to store the 8-bit data value in the accumulator register A into the specified memory location.

Usage example

; Author: Evgeny Sergeevich Dovgopolov

data1: db 00h
data2: db 00h

main:
    mvi     a, 3Dh  ; Load the hexadecimal value 3Dh into register A
    sta     data1   ; Store the value of register A in memory (data1)
    mvi     a, 45h  ; Load the hexadecimal value 45h into register A
    sta     data2   ; Store the value of register A in memory (data2)

    hlt             ; Stop program execution

Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".

Processor status flags

S
No
Z
No
AC
No
P
No
CY
No