DAT 2343 LMC Simulator Usage Alan T Pinck

  • Slides: 15
Download presentation
DAT 2343 LMC Simulator Usage © Alan T. Pinck / Algonquin College; 2003

DAT 2343 LMC Simulator Usage © Alan T. Pinck / Algonquin College; 2003

Accessing the LMC software Map a network drive to: \woodroffe-13coursewaredat 2343sonoflmc the binary (executable

Accessing the LMC software Map a network drive to: \woodroffe-13coursewaredat 2343sonoflmc the binary (executable program) form is in the directory: pgm with the name: SONOFLMC. EXE copy or run it from here

The LMC Window

The LMC Window

The File Drop-Down Menu Load n re-load previously saved mailbox contents from file Save

The File Drop-Down Menu Load n re-load previously saved mailbox contents from file Save n save current contents of mailboxes to a file for future loading during a later LMC simulation session Exit n same effect as the Quit button

Scrolling the Displayed Mailboxes Only 10 mailboxes are visible at a time. Use the

Scrolling the Displayed Mailboxes Only 10 mailboxes are visible at a time. Use the scroll bar below the 10 mailbox text boxes to see other sets of 10

Entering Mailbox Values Click in the mailbox whose contents you wish to change Highlight

Entering Mailbox Values Click in the mailbox whose contents you wish to change Highlight and replace the old contents with a new 3 decimal digit value; or type a new 3 digit decimal value in front of the old value Tab or click on another textbox to cause the contents of the one you just edited to be changed

The “Single Step” Button Performs one cycle of the instruction cycle loads “Last Instruction

The “Single Step” Button Performs one cycle of the instruction cycle loads “Last Instruction Done” with 3 digit value from mailbox with “Address” equal to the “Counter” value n increments the “Counter” n performs the operation indicated by the numeric instruction in “Last Instruction Done” n

The “Go” Button Performs the instruction cycle repeatedly until a Halt (numeric code 700)

The “Go” Button Performs the instruction cycle repeatedly until a Halt (numeric code 700) instruction has been executed May be possible to interrupt this processing by clicking the “Halt” button

The “Next IO” Button Performs the instruction cycle repeatedly until the next INPUT (code

The “Next IO” Button Performs the instruction cycle repeatedly until the next INPUT (code 500) or OUTPUT (code 600) has been executed Note that the instruction cycle execution is halted after the IO operation has been done

Warning On Input Control The INPUT (code 500) instruction does not wait for the

Warning On Input Control The INPUT (code 500) instruction does not wait for the user to enter a new value in the “Input Box” The value in the “Input Box” must be pre-set before the INPUT instruction is executed. Usual method: Enter first input value before starting execution; then run to “Next IO” and (assuming the IO was an Input) enter the next input value, before continuing.

The “Halt” Button Used as an emergency attempt to stop a program’s execution when

The “Halt” Button Used as an emergency attempt to stop a program’s execution when the program is acting under a “Run” or “Next IO” command, but is in a loop with no HALT instruction (or, for “Next IO”, no INPUT nor OUTPUT instructions) within the loop.

The “Reset Counter” Button Resets the “Counter” back to 00 Does not cause the

The “Reset Counter” Button Resets the “Counter” back to 00 Does not cause the “Little Man” to start his instruction cycle

The “Quit” Button Stops execution of the LMC simulator and closes the LMC simulator

The “Quit” Button Stops execution of the LMC simulator and closes the LMC simulator window

Demonstration of LMC Simulator Usage

Demonstration of LMC Simulator Usage

End of Lecture

End of Lecture