📚 REDCODE-94 INSTRUCTION REFERENCE (2/19)
MOV - Move
MOV: Move (Copy Data or Instruction)
MOV copies data or an entire instruction from the source (operand A) to the destination (operand B). It is the fundamental instruction for self-replication (Imps and Papers) and memory bombardment (Stones and Scanners).
Syntax
MOV.I source, destination ; Copy whole cell from source to destination
MOV.AB #value, destination ; Copy immediate number into destination B-fieldCore Examples
MOV.I $0, $1— The Imp: Copies its own instruction at relative address0to the next cell ($1), advancing endlessly through memory.MOV.I bomb, @ptr— Indirect Bombing: Copies aDATbomb to the memory address pointed to byptr.MOV.AB #10, count— Variable Initialization: Writes the literal number10into the B-field ofcount.
Modifiers
The modifier controls exactly which parts of the source cell are copied into the destination cell:
.I(Instruction): Copies the entire cell—opcode, modifier, A-mode/A-value, and B-mode/B-value (default when source is not#)..AB: Copies source A-value into destination B-value (default when source is immediate#)..A/.B: Copies A-field to A-field, or B-field to B-field..F/.X: Copies both A and B fields simultaneously (.Fstraight,.Xcrossed).