the project consist of 2 pases :
-
- Parsing SIC/XE code in formatts 2,3 & 4.
- Handling directives BYTE,WORD,RESW,RESB,ORG & EQU.
- Generate the symbol table.
- Generate the source file of code with assigned addresses.
-
The main design consist of 4 modules parsing ,validation, executing the pass1 algorithm & printing the output.
- The parsing module extract the components of each line.
- The validating module validate the components of every line.
- Then executing the algorithm and printing the output.
-
- Arrays & Lists : contain the components of every line sequenchelly.
- Maps : made one to one mapping between the operation code & their hexadecimal values & formats
- Created data structures LIne & Rows : carry the values of the line components.
-
- The assembler is to execute by entering assemble .
- The source file for the main program for this phase is to be named assemble.cpp.
- The output of the assembler should include (at least):
- Object-code file whose format is the same as the one described in the text book in section 2.1.1 and 2.3.5.
- A report at the end of pass2. Pass1 and Pass2 errors should be included as part of the assembler report, exhibiting both the offending line ofsource code and the error.
- The assembler should support:
- EQU and ORG statements.
- Simple expression evaluation. A simple expression includes simple {A -op- B} operand arithmetic, where -op- is one of +,-,*,/ and no spaces surround the operation, eg. A+B.
- Literals (Including LTORG) =C’’, =X’HEX-TEXT’, = forms
-
The main design consist of 5 main modules parsing ,validation, executing the pass1 algorithm, executing pass 2 algorithm & printing the output
- The parsing module extract the components of each line.
- The validating module validate the components of every line.
- The pass2 module generate the object code for each line and print it in a file.
- Then executing the algorithm and printing the output.
-
- Arrays & Lists & vectors : contain the components of every line sequenchelly.
- Maps : made one to one mapping between the operation code & their hexadecimal values & formats.
- Created data structures LIne & Rows : carry the values of the line components.
- Clone this repo
https://github.com/Magho/Assembler
- cd
Assemblerp
- run
assembler.exe
file