An LC4 assembly interpreter in Haskell. For the 240 kids to use hopefully.
- Github repo is at: https://github.com/johnpmayer/lc4sim
- Trello is used for collaboration amongst current devs at:
https://trello.com/board/lc4sim/4ed3e6e4aebfc0d21d0ee596
- read x.asm
- parse
- loader
- vmstate
Breakpoint? No -> End Yes -> commandline waiting
vmstate step
- register file
- current stack?
- pc
- instruction
- trace?
Parses LC4 assembly file into lc4env data structures to be used in rest of program.
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.
- Performs the interpretation and altering of state.
The LC4 pretty printer.
Parses command line args and executes program components. This is where the REPL lies.
The parser module that parses generic strings. Works with ParserCombinators.
Takes a parsed .asm file and loads the appropriate values into the LC4 virtual machine. Instantiates a new VM for the simulator.