Welcome to the Assembler repository, the culmination of our efforts in the "Systems Programming Laboratory" (20465) course at the Israel Open University. Crafted with precision in C, this repository houses a sophisticated assembler tailored for a specific assembly language, aimed at emulating the functionality of common system programs.
The project boasts a meticulously organized structure, with each component residing in its designated C and header files. This modular approach champions code readability and adherence to strict coding standards. The assembler operates seamlessly through three fundamental stages:
-
Pre-Assembler:
Sequentially processes the source file, adeptly identifying and cataloging macro definitions. Subsequent macro calls are deftly substituted with these definitions, enhancing program coherence. -
First Pass:
Executes a comprehensive scan, diligently identifying labels and constants. Additionally, this pass seamlessly translates all translatable components into binary format, laying the groundwork for the second pass. -
Second Pass:
Focuses on resolving components that remained unresolved in the first pass, culminating in their translation into binary format, ensuring the assembly process's completion.
Before diving into the realm of assembly, ensure your arsenal includes:
- GCC compiler
- Ubuntu system (Windows compatibility anticipated)
- Clone the Assembler repository:
git clone https://github.com/Ofek-Carpassi/Assembler.git
- Navigate to the assembler's directory:
cd Assembler
- Compile the program using the makefile:
i makefile
Execute the compiled program using the command: ./assembler file1 file2 ... fileN
%
Marvel as it effortlessly generates machine code from the provided assembly files.
Explore the world of assembly with confidence, armed with several provided assembly language input files. These files not only demonstrate various operations and data types but also serve as a practical test for the assembler's robust error handling.
Embark on a journey of understanding with comprehensive documentation accompanying each function in the source code. Dive into the details of the program's functionality through clear header comments, explaining their purpose and usage. Detailed code comments further enhance your understanding, ensuring a smooth exploration.
In the context of this project, contributions are like cherished treasures—while not actively solicited, they are warmly welcomed and greatly valued.
Crafted with dedication by Ofek Carpassi and Natanel Sorokin. All rights reserved.
This project is licensed under the MIT License - see the LICENSE file for details.