Page 66 - DCAP507_SYSTEM_SOFTWARE
P. 66
System Software
Notes Pass 1 Databases
1. Input source program.
2. Location Counter utilized to maintain track of every instruction's location.
3. Machine-Operation Table signifies the symbolic mnemonic for every instruction and its
length (two, four, or six bytes).
4. Directive/Pseudo-Operation Table signifies the symbolic mnemonic and action to be
taken for each pseudo-op in pass 1.
5. Symbol Table used to amass each label and its equivalent value.
6. Literal Table utilized to amass each literal encountered and its matching assigned location.
7. An accurate copy of the input is saved for pass 2. This may be accumulated in a secondary
storage device, like disk or in a structure in main memory (small programs like the CSE
560 programs) (enlarged with information that pass allocated).
Pass 2 Databases
1. Copy of source program (with pass 1 knowledge).
2. Location Counter.
3. Machine Operation Table, which signifies for every instruction: (a) symbolic mnemonic;
(b) length; (c) binary machine opcode, and (d) format (e.g., RS, RX, and SSI).
4. Directive/Pseudo-Operation Table that signifies for every directive the symbolic mnemonic
and the action to be taken in pass 2.
5. Symbol Table organized by pass 1, comprising each label and its corresponding value.
6. A workspace, INST, is used to hold every instruction as its different parts (e.g., binary
op-code, register fields, length fields, displacement field) are being assembled together.
7. An output file of assembled instructions in the format needed by the linker.
Figure 4.2: Assembler Pass 1 Structure Flowchart
60 LOVELY PROFESSIONAL UNIVERSITY