Project information
- Category: Assembly & C
- Class: Computer Organization
- Project date: Fall 2023
- Project URL: Click Here
Project Details
The Machine Code Generator project involves creating an assembler that translates assembly language into machine code and supports external references. It addresses issues with undefined references by allowing for global symbolic addresses, distinguishing between local and global labels. The assembly file must have separate sections for instructions and .fill directives, with the Stack section below the Data section. Global labels start with capital letters, while local labels start with lowercase letters. Undefined global labels are temporarily resolved as address 0. The object file format includes Header, Text, Data, Symbol table, and Relocation table sections. Error checking includes detecting undefined local symbolic addresses, beq using an undefined symbolic address, duplicate label definitions, oversized offsetFields, unrecognized opcodes, and illegal register operands.