Description
The following is a list of assembler features that you are expected to implement for your assembler.
Instruction Set
All the SIC/XE instructions listed in the appendix.
Instruction Formats
1, 2, 3, 4
Addressing
Simple (with or without indexing), Indirect, Immediate
Additional Features
Literal operands (types X & C), Modules, Comments
Assembler Directives
START END BYTE WORD RESB RESW BASE EQU EXTDEF EXTREF
Error Detection (15 bonus points for pass 1 and 2)
You can assume that each source program is syntactically correct. If
you wish to earn bonus points perform error checking on the following:
- illegal instruction (pass 1)(2 points)
- invalid symbol (pass 1) (3 points)
- undefined symbol (pass 2)(3 points)
- illegal addressing (pass 2)(3 points)
- address out of range (pass 2)(4 points)
A file ‘opcodes’ will contain all the instructions that are available in the assembly language. The file is in the format MNEMONIC OPCODE FORMAT
(example: LDA 00 3 {3 means 3 or 4}).
Input to pass 1 will consist of a free format SIC/XE source program. Read the name of the file containing the source program from the command line. Input to pass 2 will be the intermediate file produced by pass1. Output from each pass of the assembler will consist of the following.
Pass 1
- Source listing with line numbers and LC values (for testing purposes, also write this to screen)
- Symbol table
- Literal table
Pass 2
- Assembly listing (including symbol table at the bottom) written to a file named the same as the source program with a .lst extension.
- Object program written to a file named the same as the source program with a .obj extension.
Pass 1 is due Wednesday, October 30
Pass 2 is due Tuesday, December 4