Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Educational simulation and debugging environment for the LC4 assembly language
Assembly Haskell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test_code
.gitignore
LC4_InstructionSet.pdf
Main.hs
ParserCombinators.hs
README.org
Tests.hs
fib.asm
immediate.hs
lc4PP.hs
lc4draw.hs
lc4parser.hs
lc4vm.hs
makefile
parser.hs
simulator.hs
vmLoader.hs

README.org

Description

An LC4 assembly interpreter in Haskell. For the 240 kids to use hopefully.

Team

https://trello.com/board/lc4sim/4ed3e6e4aebfc0d21d0ee596

Stages

Load

  • read x.asm
  • parse
  • loader
  • vmstate

Run

Breakpoint? No -> End Yes -> commandline waiting

Step

vmstate step

Print

  • register file
  • current stack?
  • pc
  • instruction
  • trace?

Modules

lc4parser

Parses LC4 assembly file into lc4env data structures to be used in rest of program.

lc4vm

The data type definitions of the LC4 environment, as well as associated data structures used to represent state.

The PC is going to be represented with line numbers. Comments are considered as NOPs. As long as the invariant holds internally, the OS will not clobber R7 accidentally.

simulator

  • Performs the interpretation and altering of state.

lc4PP

The LC4 pretty printer.

main

Parses command line args and executes program components. This is where the REPL lies.

Parser

The parser module that parses generic strings. Works with ParserCombinators.

vmloader

Takes a parsed .asm file and loads the appropriate values into the LC4 virtual machine. Instantiates a new VM for the simulator.

Something went wrong with that request. Please try again.