Assembler and Interpreter for the LittleManComputer Code written in C
-
Windows:
-
Linux:
- Download lmc.tar.gz
- Extract it anywhere:
$ mkdir tarlmc $ tar xf lmc.tar.gz -C tarlmc $ cd tarlmc- Run
./setup.sh
$ ./setup.sh Do you want to install lmc (Interpreter)? [Y/n] y > cp lmc /usr/bin/lmc Do you want to install lma (Assembler)? [Y/n] y > cp lma /usr/bin/lma- Type
lmcto verify installation
$ lmc No file specified. Usage: From File: lmc file.txt Debug From File: lmc +file.txt Immediate: lmc :901308901309508209902000 Debug Immediate: lmc +:901308901309508209902000
- Windows:
- Run
build.bat - Output:
bin\lma.exe,bin\lmc.exe - Requirements: tcc for windows
- Run
- Linux:
- Run
./build.sh - Output:
bin/lma,bin/lmc - Requirements:
apt install tcc
- Run
- Comments
;Line comment/Line comment
- Instructions
- ADD
- SUB
- STA
- LDA
- BRA
- BRZ
- BRP
- INP
- OUT
- HLT | COB
- DAT
References:










