TAOCP 1.3.2 Exercise 1
The symbol defined by `X EQU 1000` does not reserve storage; it only equates the symbol `X` with the number $1000$ during assembly.
Section 1.3.2: The MIX Assembly Language
Exercise 1. ▶ [00] The text remarked that X EQU 1000 does not assemble any instruction that sets the value of a variable. Suppose that you are writing a MIX program in which the algorithm is supposed to set the value contained in a certain memory cell (whose symbolic name is X) equal to 1000. How could you express this in MIXAL?
Verified: yes
Solve time: 1m22s
The symbol defined by X EQU 1000 does not reserve storage; it only equates the symbol X with the number $1000$ during assembly. To assign the value $1000$ to the memory cell named X during execution, a store instruction must be used.
One correct formulation is to load the constant and then store it:
$\text{LDA } =1000=$ followed by $\text{STA } X$.
The literal $=1000=$ causes the assembler to place the constant $1000$ in memory and load it into register A, and STA X writes the magnitude of register A into location X, thereby setting the contents of X to $1000$. An equivalent form is $\text{ENTA } 1000$ followed by $\text{STA } X$, since ENTA 1000 places $1000$ directly into register A before the store operation.