
222 CHAPTER 5 Program Design and Analysis
5.3.1 Assemblers
When translating assembly code into object code, the assembler must translate
opcodes and format the bits in each instruction, and translate labels into addresses.
In this section, we review the translation of assembly language into binary.
Labels make the assembly process more complex, but they are the most impor-
tant abstraction provided by the assembler. Labels let the programmer (a human
programmer or a compiler generating assembly code) avoid worrying about the
locations of instructions and data. Label processing requires making two passes
through the assembly source code as follows:
1. ...