Skip to content
matsjoyce edited this page Sep 23, 2014 · 13 revisions

Execution Cycle

  1. Fetch the value from memory at the address of the instruction counter
  2. Increment the instruction counter
  3. Decode the instruction
  4. Execute the instruction (e.g. halt, or store)
  5. Repeat until halted

Simple and effective.

Execution Errors

  • Invalid memory address - The address is not in the range (0 - 99).
  • Invalid instruction - The instruction is not recognised.

Debugging

This section refers to the CLI program. For the GUI version, see the GUI page.

yaplmc comes with several debugging levels (the layers stack, so the information about layers above :

  1. This is the default. No debug information is printed.
  2. The current instruction is printed, along with the action it will perform.
  3. Stuff from level 1, and the memory, accumulator and instruction counter is also printed at each step.
  4. Stuff from level 2, and prints numeric code of current instruction, and other information which is probably not useful.

Other Facts

  • Memory is stored in a decimalised twos-complement (999 == -1, 998 == -2, ..., 500 == -500, 499 == 499, ..., 0 == 0)

Next page: The GUI

Clone this wiki locally