StephenHermer.com
Writing, Iguanas, and Electronics

MOV Instructions

All of the instructions that move data between registers, or between registers and ram, are grouped as MOV instructions.

MOV R1,R2; Copy the value of R1 into R2
LOAD $0000,R Copy the value of MEM[PC] into R
LOAD {$0000),R Copy the value of MEM[PC] into DAR, Copy the value of MEM[DAR] into R
STO R,{$0000}  Copy the value of MEM[PC] into DAR, Copy the value of R into MEM[DAR].

 

MOV instructions can be conditional, using four-bits to indicate the condition. This means we can "COPY R1 to R2 IF CARRY" or "COPY R1 to R2 IF NOT CARRY", depending on the final hardware. Initially, only seven conditionals are planned. For this document, we will limited the discussion to Branch On Carry, an instruction that conditionally updates the Program Counter when the carry flag is set.
 

BRC $0000; Load $0000 into the PC
BRC {$0000} Load $1000 into the DAR, load MEM[DAR] into the PC
BRC A Load the value of the "A"-register into the PC