ADD | Add | ADD src1 sr2 dest | Add values in src1 and sr2 registers and store result in dest register. (dest=src1+sr2) |
SUB | Subtract | SUB src1 sr2 dest | Subtract value in src1 from sr2 register and store result in dest register. (dest=src1-sr2) |
DIV | Divide | DIV src1 sr2 dest | Divide value in src1 register by value in sr2 register and store result in dest register. (dest=src1/sr2) |
MUL | Multiply | MUL src1 sr2 dest | Multiply values in src1 and sr2 registers and store result in dest register. (dest=src1*sr2) |
INC | Increment | INC dest | Increment (add one to) value in dest register. |
LD | Load | LD addr dest | Load load contents of memory location addr into register dest. |
ST | Store | ST src1 addr | Store value in register src1 in memory location addr |
MOV | Move | MOV src1 dest | Copy value in register src1 to dest register. |
JMP | Jump | Jump addr | Jump to instruction at memory location addr |
JZ | Jump if Zero | JZ addr | Jump to addr if the Zero Flag is set indicating a result of zero from the last ALU operation. |
JN | Jump if Negative | JN addr | Jump to addr if the Sign Flag is set indicating a negative result from the last ALU operation. |
PUSH | Push onto the stack | PUSH reg |
Copy contents of register reg to the stack (the memory
location pointed to by the stack pointer and decrement
the stack pointer by one. THe stack pointer is initialized to point to
memory address 63. |
POP | Pop from the stack | POP reg |
Increment the stack pointer and copy the value at that memory
address it points to into register reg. |
CALL | Call a
procedure | CALL addr | Push the address of
the next instruction after this CALL onto the stack and jump
to memory address addr. |
RET | Return from
procedure | RET | Pop the value on top of the stack into
the program counter. This instruction assumes that the value on the
stack was a return address pushed by a previous CALL instruction. |
HALT | Halt | HALT | Halt processor. Processor will no longer fetch instructions until reset. |