Skip to content
A Learning Machine Simulator that implements TOY & LMC
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
grammar
images
public
README.md
snippets.asm
toy-syntax.asm

README.md

Learning Machine Emulation Project (LMAS)

This is (will be) an implementation of two educational computer architectures. The first is TOY while the second is LMC.

Why another implementation?

There are several of these available, but by putting both in one easy to find and (hopefully) use location, the hope is that people will find it easier to gain a fundamental understanding of how computer architectures work. Plus, it's just fun to implement these sorts of things!

Installation

Clone the project, then start a weberver of your choice with the public directory as the root web directory; e.g:

cd $project_dir/public; python -m SimpleHTTPServer

Running tests

Jasmine is the test tool we are using for the project. Simply open the test runner thusly (assuming port 8000 is local instance):

http://localhost:8000/tests[/index.html]

Autotests

Add a suitable reload plugin (e.g. LiveReload for Chrome) and the tests will run automatically when changed.

(to use livereload with the python webserver above, install the appropriate module, e.g.: 'pip install livereload') and run it in the same directory as the web server.)

Adding new tests

Add dependencies and spec files to index.html as needed.

(re)generating the grammar

The assembly language grammar file is in pegjs format. There is a script in the project bin/ directory to regenerate it (requires the command line tool pegjs be installed, which is a node tool. So install, node as per your platform. Personally, I like using nvm to set it up, then follow the instrucitons on the pegjs site)

To have it regen with every change, add a file watcher (e.g. I use entr: 'ls -F -d grammar/* | entr bin/update-grammar')

Editor

To make the editor full screen type SHIFT-CTRL-F while the editor has focus.

You can’t perform that action at this time.