A disassembler for the SIC/XE machine architecture. The disassembler opens a text file containing a valid object
program and its accompanying symbol file. Next, the disassembler will disassemble the program code back to object code or the SIC/XE language source file
into a text file named list.txt
.
To read an object code file along with its symbol file in order to produce an assembly listing file or the SIC/XE source code.
In the root directory of this repository run the following command in your terminal:
make
An executable file should be created named dissem
.
To clean up any created files while running the disassembler program, enter the following in your terminal:
make clean
Make clean will remove the executable and the output file created named list.txt
.
After compiling the program using make
, run the program properly by passing two arguments to the executable.
- The first argument passed should be the object program file.
- One object file is provided in the directory
input/
with the file namesample-obj.txt
- One object file is provided in the directory
- The second argument passed should be the symbol file that accompanies the project code file.
- One symbol file is provided in the directory
input/
with the file namesample.sym.txt
- One symbol file is provided in the directory
To run the program with the default text file enter the following in your terminal:
./dissem ./input/sample-obj.txt ./input/sample.sym.txt
Or move the text files above to the root directory of this repository and enter the following:
./dissem sample-obj.txt sample.sym.txt
Disassembler
├── LICENSE
├── Makefile
├── README.md
├── doc
│ ├── Pair-Programmer_Affidavit.docx
│ └── README.pdf
├── images
│ ├── diagram.png
│ ├── instructionLine.png
│ ├── joinModules.png
│ └── overviewDesign.png
├── input
│ ├── sample-obj.txt
│ ├── sample.lis.txt
│ ├── sample.sic.txt
│ └── sample.sym.txt
└── src
├── Disassembler.cpp
├── Disassembler.h
├── end_record.cpp
├── header.h
├── header_record.h
├── input.cpp
├── main.cpp
├── mod_record.cpp
├── mod_record.h
├── output.cpp
└── textRecord.h
input.cpp
reads the object program file and the symbol fileDisassembler.cpp
decodes the object program and turns it into source code*_record.cpp
handles the type of record fileoutput.cpp
prints the stored source object from what the disassembler produced into a source code fileinput/
the input files for our program After the program is done running a SIC/XE source code will be created based on the program code namedlist.txt
at the repository root directory.
We also split up the work by disassembler, input, header record, text record, end record and output. We ended up changing some variable types and method names.
We then setup a structure for the assembly line code, that way the output method can just iterate assembly code lines and print it or write it.
Finally, we put all the parts together to have a running program.
SIC/XE machine architecture is from the textbook System Software An Introduction to Systems Programming 3rd Edition by Leland Beck.