Extending the MARIE instruction set

All of the MARIE instructions discussed so far use direct addressing.

But we may also need to use indirect addressing where the address of the address of the operand is given in the instruction.

MARIE’s extended instruction set contains the following indirect address mode instructions:

  • : Add value at address in address specified.
  • : Jump to subroutine at specified address.
  • : Jump to the address in the address specified.

Additional useful instruction introduced here is:

  • : Zero the accumulator.

(see MARIE ISA for the full list)

The instruction specifies the address of the address of the operand to be added. It is implemented with RTL as follows:

Jump-and-store, , gives us limited functionality which allows us to use simple subroutines.

Jump to instruction specified by the address of the operand, , which can let us implement “return” label as hence jumping back to where we were earlier.

We can clear the accumulator using .