4-5. Suppose the program fragment below is input to the assembler . EQU , $050 L
ID: 3603028 • Letter: 4
Question
4-5. Suppose the program fragment below is input to the assembler . EQU , $050 LDAK SYM1 ADA LAB2 MUL# SYM3 ; location 1 LOOP: CMA LAB4 JGE LOOP HLT ; location 2 . EQU SYM1,1234 • EQUSYM3, $12c EQU o, $100 LAB2: .WORD $5B43DE ; location 3 LAB4: BLKW 1,65 What are the contents of the symbol table during the first pass after (a) all of the instructions up to and including location 1 have been processed? (b) all of the instructions up to and including location 2 have been processed? (c) all of the instructions up to and including location 3 have been processed?Explanation / Answer
a)
Symbol
Type
Scope
@
-
Block Local
SYM1
int
Block Local
LAB2
word
Global
SYM3
Int
Block Local
b)
Symbol
Type
Scope
@
-
Block Local
SYM1
int
Block Local
LAB2
word
Global
SYM3
Int
Block Local
LAB4
word
Global
c)
Symbol
Type
Scope
LAB2
Word
Global
LAB4
word
Global
SYM1
-
Loop block
SYM3
-
Loop block
@
-
Loop block
Symbol
Type
Scope
@
-
Block Local
SYM1
int
Block Local
LAB2
word
Global
SYM3
Int
Block Local
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.