- Assemble and execute assembly of the Little Man Computer instruction set
- A compiler supporting
c++-20
- Override the default by setting the
CXX
environment variable, if required
- Override the default by setting the
make
: Builds the simulator- Supports multiple threads with
-j[THREAD COUNT]
- Use
make -j$(nproc)
to build with all available threads
- Supports multiple threads with
make clean
: Removes the compiled simulator, if presentDEBUG=[true/false]
: Environment variable to enable debug symbolsBUILD_DIR
: Environment variable to configure built object output
./simulator [FILE] [MEMORY SIZE]
- For example,
./simulator programs/power.asm
- Or to limit the memory size to 50,
./simulator programs/power.asm 50
- For example,
- Set
DEBUG="true"
as an environment variable, to enable debug outputDEBUG="true" ./simulator [FILE]
- Some sample programs are kept in
programs/
multiply.asm
: Multiply 2 inputs togetherpower.asm
: Raise the first input to the power of the secondfibonacci.asm
: Output the firstn
terms of the Fibonacci sequenceiteration.asm
: Iterate over a group of addressesbinary.asm
: Convert an integer from input into 8-bit binaryleapyear.asm
: Check if a year from 1 to 999 was a leap year
- Feel free to submit pull requests!
- Contributed code must fit the style of the codebase so far
- Sample assembly is also welcome, as long as it's under
programs/