ICS 331: System Software (981)

Quiz # 3

Date: October 27, 1998                                                                                               Time: 20 minutes

Question 1:                                                                                                                                  (6 Points)

List three major steps a programmer must do when writing a control section in the SIC/XE assembly language.

   1) Use the assembler directive "CSECT" to identify each control section.

   2) Use EXTDEF and EXTREF directives to define local and external symbols used in the C. S.

   3) Use extended format instructions whenever a reference is made to an external reference.

 

Question 2:                                                                                                                                (4 Points)

What are the two types of one-pass assemblers and how do they defer from each other?

  One type produces the object code directly into the memory for immediate execution, i. e. no object program
  is produced. The other type produces an object program to be loaded by the loader later.

 

Question 3:                                                                                                                                (10 Points)

Briefly explain how the symbol table used by one-pass assemblers is different than the one used by two-pass assemblers.

  The symbol table used by one-pass assemblers allows the use of linked lists to symbols used but not defined yet.
  When a new symbol is found as an operand it is stored with the value * "undefined" with a pointer to a list of
  locations where that symbol is used. When the value of the symbol is found it is used back in all these locations.