LC-3 assembler written in pure python
python3 lc3.py [file] # lc3 *.asm file
# Output *.obj file that can be run with simulator
python3 run-tests.py
To debug, you can use simple disassembler written by me:
python3 disasm.py [obj-file]
I found it very usefull trying to understand what went wrong (invalid address in symbol table, invalid LC count, invalid opcode encoding, etc.).
There is a lot of debug information printing out when assembling but it can be ignored or deleted.
You can find usefull information and Instruction Set Architecture (ISA) here and here
Also you may find usefull desctiptions in assembler.h
file to better understand how to implement it here
You can download simulator here
Or use my own implementation written in pure python
You can find 2048 game written in lc3 here