The LMC Simulator
A simulator run under Windows 95/98 can be used to test, demonstrate, and practice machine level
programming applicable to the Little Man Computer.
Setting and Viewing Mailbox (and Input) Contents
- Scrolling Displayed Memory - only 10 mailboxes can be displayed at any time; scroll controls
below the mailboxes enable viewing of and access to mailboxes in blocks of 10.
- Modifying Memory Contents - clicking on a mailbox (or tabbing to a mailbox from the prior
mailbox) and then typing in a new value will change the contents of that mailbox; note that
unless the contents are deleted and re-entered, typing values will push existing values to the
right (i.e. the original value still appears to be there), however shifting focus to another
mailbox or another control area will result in the mailbox appearance being updated to the
value of the first 3 digits (the old material is dropped).
- Modifying Input Value - although it is a separate area, modification of the input value is
identical to modifying a mailbox value; as a warning, note that the "little man" does not wait
for you to enter a value in the input tray; he will always take whatever value is there when he
does an "input" instruction even if its the same value as he has already seen.
Run Controls
- Single Step - this control permits you to watch the LMC activity one instruction at a time;
note that execution of the "halt" instruction by the little man has no effect if you are using
single step mode.
- Go - this control permits you to run the LMC in a continuous mode until a "halt" occurs either
because the "little man" performed a "halt" instruction or because you hit the "halt" control.
- Next I/O - this control acts like the "Go" control except that breaks occur after any Input or
Output operation (as well as at Halt); this provides an opportunity to set up the next input
value and/or to examine output values before they are replaced with subsequent outputs.
- Halt - the intent of this control is to enable you to interrupt a "run-away" or "infinite loop"
program.
- Reset - this is not technically a "run control" since it does not cause the "little man" to do
anything immediately; this is simply the program counter reset (to 00).
Saving and Loading LMC programs
- File Drop Down Menu - Submenus: Save, Load, and Exit
- Save File - Initiates a common dialog window to identify the name of the file to be saved
(standard extension, .lmc) and then copies the contents of all mailboxes to this file.
- Load File - Initiates a common dialog window to identify a file containing a "Little Man
Computer" memory image (as created by a prior "Save File") and then copies the contents of
that file into the mailboxes of the LMC.