This repository contains an Assembler and Simulator for a specific architecture. The project aims to convert assembly language code into machine code and simulate the execution of the resulting machine code.
The Assembler inputs assembly language code and generates the corresponding machine code, which the Simulator can execute. The Simulator emulates the execution of the machine code, allowing you to observe the proper execution of instructions.
- The assembler code is in the
Simple-Assembler
directory. Commands to execute the Assembler is inSimple-Assembler/run
. - The simulator code in the
SimpleSimulator
directory. Commands to execute the Simulator is inSimpleSimulator/run
. - The Assembler and the Simulator read from
stdin
. - The Assembler and the Simulator write to
stdout
.
To install and set up the project locally, follow these steps:
- Clone the repository:
git clone https://github.com/karanprasadgupta/Assembler-and-Simulator.git
- Navigate to the project directory:
cd Assembler-and-Simulator
- Go to the
automatedTesting
directory and execute therun
file with appropiate options passed as arguments. - Options available for automated testing:
--verbose
: Prints verbose output--no-asm
: Does not evaluate the assembler--no-sim
: Does not evaluate the simulator
The Assembler and Simulator support a specific set of assembly language instructions. You can refer to the Assignment.pdf for detailed information about the list of instructions and their usage.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. Make sure to follow the repository's code of conduct.
This project is licensed under the MIT License. Feel free to modify and use the code as per the license terms.
This project was developed just for learning purposes as part of the Computer Organization, Monsoon 2021 semester, assignment at IIITD.