LMC Load and Save Instructions

The following program will demonstrate the load and save instructions of the LMC. 

Program

INP
STA FIRST
INP
STA SECOND
LDA FIRST
OUT
LDA SECOND
OUT
HLT
FIRST DAT
SECOND DAT

What you should do

  1. Click on the "LMC Simulator Applet" link to start the LMC simulator.
  2. Clear the Message Box and all of the LMC mailboxes -- click the "Clear Messages" button and the "Clear" button if necessary.
  3. Copy the eleven line program above and paste it into the Message Box
  4. Click on the "Compile Program" button.
  5. Click on the "Run" button.
  6. When prompted, enter three-digit numbers in the "In-Box", and press the "Enter" button.

What you should see