A C program that loads and disassembles LC4 object files, converting machine code back into human-readable assembly instructions.
This project implements an LC4 (Little Computer 4) disassembler that:
.obj
) into memory using a linked list structurelc4.c
- Main program entry pointlc4_loader.c/h
- File parsing and memory loading functionalitylc4_memory.c/h
- Dynamic memory management using linked listslc4_disassembler.c/h
- Machine code to assembly conversionobj_files_for_testing/
- Sample LC4 object files for testingmake
This will compile all source files and create the lc4
executable.
./lc4 <object_file>.obj
Example:
./lc4 obj_files_for_testing/test1.obj
The obj_files_for_testing/
directory contains various test files:
test1.obj
, test2.obj
, etc.)dmem_fact_ec.obj
)user_draw.obj
)user_string_ec.obj
)make clean # Remove object files
make clobber # Remove object files and executable