|
Hints on the style and flavor of the C.Eng.332 Midterm I exam: 1. You should understand the concepts well. You may, for example, need to describe how a load-and-go assembler works. 2. Knowing how the whole process works for SIC from assembly to loading is crucial. Given the OPTABLE you may be asked to do a hand-assembly of the given code: Example: Apply the algorithm described in Fig.2.4 to assemble the source program in 2.1. Do a Pass1 and build the symbol table. Complete a Pass2 on the same algorithm. This exercise will (hopefully) help you gain the ability to understand this process thoroughly. 3. You should know the responsibilities of each pass in assemblers/linkers and loaders. Example: For each of the following types of statements or language features, indicate the responsibilities of each pass of a conventional two-pass assembler. If a pass doesn't do anything with an item, you should say so. (There are short acceptable answers to these parts.) a) labels on statements (Terminology note: In a statement like TOM: CLR SAM 'TOM:' is a label, but 'SAM' is not.) b) storage reservation directives (things like RESW and RESB) c) storage initialization directives (things like WORD and BYTE) d) EQU as on the SIC/XE assembler 4. You may need to describe the operation of a multi-pass assembly as done in Fig.2.21 given a sample code. 5. Definitions of some fundamental terms may be asked. 6. One or more concept questions will be asked that needs deep understanding of the subject. You may be required to extend or modify the working of a pass. Try out the following book exercises if you have time. (Exercise numbers represent the order in 3rd edition of Beck) Section 2.1: 2 (Assemble code in Fig.2.4,) 4 (dissassembler,) 5 (free-format input,) 8 (two-pass assembler detecting doubly-defined symbols,) 9 (two-pass assembler detecting not referenced symbols.) Section 2.2: 1 (Could the assembler decide for itself which instructions need to be assembled using extended format,) 10 (more efficient Modification records for SIC,) 11 (assembler having only PC-relative addressing.) Section 2.3: 7 (difference bw LDA A-B and LDA A; SUB B,) 8 (difference between ...,) 9 (modify alg in Fig.2.4 to handle multiple program blocks,) 10 (modify alg. in Fig.2.4 to handle multiple control sections,) 11 (symbol table for an assembler defined in machine-dep features section,) 13(handling line 190 in Fig.2.15,) 14 (Fig 2.11 and only two program blocks,) 15 (separation of initialized data items,) 17 (meanings of expressions,) 20 (removing EXTREF statement,) 21 (avoiding EXTDEF statement,) 24 (RDREC-COPY). Section 2.4: 1 (why not one-pass,) 2 (cross-ref listing,) 3 (relocatable object code w/one-pass assemblers,) 5 (JEQ ENDFIL+3,) 6 (one-pass load-and-go assembler,) 8 (1-pass assembler, PC-rel addressing), 9 (1-pass assembly, Modification records.) Section 3.1: 1 (alg in Fig.3.11 and bit-mask approach,) 2 (direct addressing, bit-mask,) 3 (load object code in Fig.3.9,) 4 (REF9-13,) 5 (link and load object code in 4,) 13 (one-pass linking loader,) 15 (1-pass assmbler.)
|
Last Updated: July 25, 2001 22:33:02 +0300
KD
|