Skip to content

teaishealthy/lmc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Little Man Computer

This repository contains a few tools around the little man computer.

asm.py

A simple but roboust assembler for lmc assmebly.

Usage

$ python3 asm.py input.asm > output

Example Programs

Program Description
mul.asm Multiplies two numbers
sum-100.asm Sums the numbers from 1 to 100

Example Programs

Program Description
mul.asm Multiplies two numbers
sum-100.asm Sums the numbers from 1 to 100

sim.py

An lmc simulator.

Usage

$ python3 sim.py input

or

$ python3 asm.py examples/sum-100.asm | python3 sim.py -

Note

The simulator may prompt for input over stdin. This is not possible when the simulator accepts a program over stdin. In this case, the simulator will exit with an error.

About

Tools around the little man computer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages