Study Sheet - Chapter 7
Disclaimer: This study sheet covers important terms and concepts that I
found in the text. The absence of a specific item in the text from this list
does not mean that you are not responsible for knowing it. Also,
not valid in Tennessee and for entertainment purposes only.
Assembly coding and assemblers (Sections 7.1-7.3)
Terms:
assembler |
compiler |
translator |
|
tuning |
benchmark |
|
|
pseudo-instructions/assembler
directives |
|
|
macro definition |
macro call |
macro expansion |
|
forward reference problem |
2-pass assembler |
|
Instruction Location Counter (ILC) |
|
|
symbol table |
associative memory |
binary search |
hash coding / hash table |
You should understand:
- QOD on page 485... "assembly code programming... is not for wimps and
weaklings"
- 2 reasons for writing in assembly: performance and low-level access
- Macros are different than functions, they are:
- Expanded during assembly, not execution
- Placed in-line, not called like functions
- Don't have return values
- Difference between instructions and pseudo-instructions
2. Linking and loading (Section 7.4)
Terms:
linker |
loader |
executable |
|
relocation problem |
external reference problem |
relocation constant |
entry points |
external symbols |
binding time |
position independent |
dynamic linking |
Dynamic Link Library (DLL) |
implicit linking |
import library |
explicit linking |
shared library |
host library |
target library |
|
Key points:
- Understand the process of creating an executable: source files,
translators, object files and libraries, linker (as in Fig 7-13 on page 508)
- The basic problems solved by the linker:
- relocation problem - setting the starting address of a
module and adjusting all references by a relocation constant
- external reference problem - finding the address of external
functions and variables
- Six parts of an object module
- Identification - name of the module other accounting
information
- Entry point table - public objects (like .globl in our assembly
code)
- External reference table - symbols that are defined outside
this module
- Machine instructions and constants - the code
- Relocation dictionary - list of addresses in part 4 that need
to be relocated
- End of module- checksum, parity check
- Six possibilities for binding time, when program is 1) written, 2)
translated, 3) linked, 4) loaded, 5) base register is loaded, 6) executed
- Dynamic linking using DLL's
|