CSE410 Simulator and Debugger

Simulator Invocation
The simulator is launched like this:
$ ./sim [-n] a.exe b.exe c.exe ...
The command line arguments are executable file names. Those files are either created by hand, when programming directly in machine code, or by the assembler, when programming in assembly language.

The simulator passes each file to the loader. The loader simply loads bytes into memory, following the load point (@) directives in each exe file. When all files have been loaded, the debugger is invoked. Execution begins at the last entry point (!) directive seen in the input files. The -n switch can be given to avoid invoking the debugger.

The Debugger
The debugger is very limited. It is not possible to set breakpoints, for instance.

The debugger commands are:
sExecute the next (one) instruction
cContinue execution. It will not be possible to re-enter the debugger.
qQuit execution of the simulator.
EOFQuit execution of the simulator (EOF means "end of file." How to indicate that depends on the operating system. In Linux, type ctrl-d.)
prPrint the contents of all registers.
pmPrint the contents main memory.
ppcPrint the value of the program counter (PC).
pccPrint the value of the condition code (CC).
pMPrint the state of the machine.