LOAD a (Tiny8 opcode 1) copies the word at address a into the accumulator: ACC ← M[a]. The memory word is unchanged; the ACC's old value is gone.
Its execute steps:
- E1
MDR ← M[MAR]: read the operand. The MAR already holds a, from the decode step. - E2
ACC ← MDR: copy it into the ACC.
With fetch and decode, that's 6 cycles.
Because the ACC loads, the zero flag loads too: Z = 1 if the loaded word is 0. That makes LOAD useful for testing a value: LOAD it, then JZ.
LOAD is how almost every Tiny8 calculation starts, since ADD and SUB need a value already in the ACC. Its partner, STORE, goes the other way.