-
Notifications
You must be signed in to change notification settings - Fork 0
Execution
Matthew Joyce edited this page Sep 23, 2014
·
13 revisions
- Fetch the value from memory at the address of the instruction counter
- Increment the instruction counter
- Decode the instruction
- Execute the instruction (e.g. halt, or store)
- Repeat until halted
Simple and effective.
-
Invalid memory address- The address is not in the range (0 - 99). -
Invalid instruction- The instruction is not recognised.
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:
- This is the default. No debug information is printed.
- The current instruction is printed, along with the action it will perform.
- Stuff from level 1, and the memory, accumulator and instruction counter is also printed at each step.
- Stuff from level 2, and prints numeric code of current instruction, and other information which is probably not useful.
The debug level can be set by repeating the -d command line flag.
- Memory is stored in a decimalised twos-complement (
999==-1,998==-2, ...,500==-500,499==499, ...,0==0)
Next page: The GUI