ICS 331: System Software (981)

Quiz # 4

Date: November 8, 1998                                                                                               Time: 20 minutes

Question 1:                                                                                                                                  (6 Points)

For the following object code records, list in which pass of the linking loader it is used and why?

Record Type

Pass

Reason for using

Modification

2

To apply the needed modification to the object code.

Define

1

To process and store each external symbol in the record in the  ESTAB

Header

1, 2

To obtain control section Name and Length

Question 2:

   Consider the following piece of code

0000

PROGA

START

0

EXTDEF

LISTA

EXTREF

LISTB, LISTC

0003

LISTA

EQU

*

. . . . . .

0020

REF1

+LDA

LISTB

0024

REF2

WORD

LISTB+2-LISTA

     a) Generate the object code for location 0023                                                                        (4 points)

  00 - Since LISTB is not defined its address is 00.

     b) Generate the modification records for locations 0020 and 0024                                      (10 points)

   M 000021 05 + LISTB

   M 000024 06 + LISTB

  M 000024 06 + PROGA