This project implements an assembler, linker, and emulator for a custom assembly language using GNU Assembler (GAS) tools. The project involves lexical and syntax analysis, code generation, linking, and execution of the generated machine code through an emulator. The project build is managed via a Makefile, and Flex and Bison are used to handle the lexical and syntactic analysis.
- Assembler: Converts assembly language into machine code using GNU Assembler.
- Linker: Combines object files generated by the assembler into a single executable.
- Emulator: Simulates the execution of the machine code generated by the assembler and linker.
- Lexical and Syntax Analysis: Performed using Flex and Bison to tokenize and parse assembly language instructions.
- Makefile Integration: Builds the entire project with a single command.
- /src: Contains the source code for the assembler, linker, and emulator.
- /lexer: Flex files for lexical analysis.
- /parser: Bison files for syntax analysis.
- /assembler: Implements the assembler functionality.
- /linker: Implements the linker to create executable files from object files.
- /emulator: Implements the CPU emulator that simulates execution of the generated machine code.
- /examples: Contains sample assembly language programs for testing.
- /tests: Contains test cases for different stages of the project (assembly, linking, and emulation).
- GNU Make: To manage the build process.
- Flex: For