Sheet 3.3
Sheet 3.3
3)
1- Complete the following statements
a- The assembler identifies for the loader the parts of the object program that
must be modified using ……….. record.
b- The modification record starts with letter ……..
c- The symbol ………. is used to specify literals.
d- The assembler directive ………. is used to place literals into a pool at
location other than the end of the object program.
1
93 LTORG
002D =C’EOF’ 454F46
.
.
.
245 1073 RSUB 4F0000
255 END FIRST
1 2-7 8-9
M Starting location of the address field to be modified Its Length
What are the contents of modification record for the instruction of line 15?
b- If this code is loaded into memory starting from address 7420, what is the
new target code of the instruction of line 15?
c- If line 93 is removed, where should literal =C’EOF’ be located in target
code?
4- State whether the following are true or false. If the answer is false, explain why.
a- The assembler knows the actual location where the program will be loaded.
b- The parts of the assembly program that require modification at load time are
those that specify relative (PC-relative or base-relative) addresses.
c- Register-to-register instructions need to be modified when the program is
loaded.
d- The effect of using literals is the same as if the programmer had defined a
constant and then used the label assigned to this constant as instruction
operand.
e- Normally literals are placed into a pool at the start of the program.
2
a- The object program that contains the necessary information to perform its
modification at load time.
b- An operand that has constant value written inside the instruction that uses it.
c- The basic data structure table using which assembler handles literal
operands.
3
Answer
1-
a- Modification.
b- M.
c- =.
d- LTORG.
2-
a- Because the address field to be modified does not necessarily occupy an
integral number of bytes
b- Because one of the following cases might happen
(1) The instruction operand is not a memory address at all (register-to-
register or immediate addressing instructions).
(2) The instruction operand is specified using PC-relative or base-relative
addressing.
3-
a- M00000705
b- 4B108456
c- At location 1076.
4-
a- False. It doesn’t know.
b- False. They are those that specify direct addresses.
c- False. They need not because their operands are not memory address.
d- True.
e- False. At the end of the program
f-
a- Relocatable program
b- Literal
4
c- Literal table LITTAB.