0% found this document useful (0 votes)
214 views1 page

ECE3073 Computer Systems Practice Questions Program Design and Analysis: Assembler and Linking

The document summarizes practice questions about program design, analysis, assemblers, and linkers. [1] The first question asks to show the contents of the assembler's symbol table for each line of two sample assembly programs. [2] The second question asks if a linker using a single pass through object files can successfully load a program with given external references and entry points across three object files.

Uploaded by

kewancam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
214 views1 page

ECE3073 Computer Systems Practice Questions Program Design and Analysis: Assembler and Linking

The document summarizes practice questions about program design, analysis, assemblers, and linkers. [1] The first question asks to show the contents of the assembler's symbol table for each line of two sample assembly programs. [2] The second question asks if a linker using a single pass through object files can successfully load a program with given external references and entry points across three object files.

Uploaded by

kewancam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ECE3073 Computer Systems

Practice Questions

Program Design and Analysis: Assembler and Linking

i) Show the contents of the assemblers symbol table at the end of code generation for
each line of the following programs (assume each instruction is 4 bytes long):

1)
ORG 200
p1 ADR r4, a
LDR r0, [r4]
ADR r4, e
LDR r1, [r4]
ADD r0, r0, r1
CMP r0, r1
BNE q1
p2 ADR r4, e

2)
ORG 100
p1 CMP r0, r1
BEQ x1
p2 CMP r0, r2
BEQ x2
p3 CMP r0,r3
BEQ x3

ii) A linker uses a single pass through a set of object files to find and resolve external
references. Each object file is processed in the order given, all external references are
found and then the previously loaded files are searched for labels that resolve those
references. Will the linker be able to successfully load a program with the following
external references and entry points? (explain your answer)

Object file Entry points External references


o1 a, b, c, d s, t
o2 r, s, t w, y, d
o3 w, x, y, z a, c, d

Andy Russell (03/03/2013)

You might also like