Skip to main content

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

Downloaded: -

Last edit: 05 October 2022

Curriculum Topic Programming

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.

A help file in Turkish is also available.

Edit history

Peter Higginson | 05.10.22

help file in Turkish

Unlock