CAS Community   >   Resources   >  

Littlemancomputersimulator
Little Man Computer Simulation (LMC) in JavaScript with Fetch/Execute

An implementation of the Little Man Computer (LMC) runnable in a browser and showing the fetch/execute sequence

Peter Higginson

Created by Peter Higginson
last edited Feb 28 2015 by Peter Higginson



I have implemented a simulation of the Little Man Computer in JavaScript that I hope will be useful. It implements the standard instructions plus an “output character” (OTC) instruction and has ten example programs built in.

It can run at a number of different speeds and at the lower speeds moving blobs show the movement of data along the computer busses and the fetch/execute cycle.

You can input direct into memory or into an assembly language area (which is then assembled). There are options to display the assembled code in different formats. For more information and detail click the help button in the simulation.

I have put this at www.peterhigginson.co.uk/LMC/ but if anyone wants to mount it on their school site or to see the sources please send me an email.

I have now upgraded it to make memory filling easier - TAB moves to next location and click/loss of focus is handled. I have also added a “default fast” OPTION to make development easier by turning off the fetch/execute display. This version has a little V1.1 at the top of the screen.

Update 25/1/2015

I have been asked by a couple of schools for a version with less examples visible. This makes more sense if it is mounted on a school network (and a zip is available - send me an email) but it is also online at www.peterhigginson.co.uk/lmc/. This has only the first two and the last two (which show ASCII) of the examples in the full version. (The difference in the link is LMC for the full version and lmc for the restricted one.)

3/2/2015 - V1.2 fixed a small bug in single step with the default fast mode introduced in V1.1.

28/2/2015 - V1.3 Prevent backspace (when not editing) doing “browser back”. In the assembly area, add a cancel button and make the buttons more obvious.

Feedback and Comments


Available when logged in (join via the front page, for free):
  • View 22 comments on this resource.
  • View resource history, links to related resources.
  • Leave feedback for the author(s), or help by editing the resource.
Categories: