sp25-cs252 cs252-3-1
Chapter 7: Assembly Language Chapter 7: Assembly Language
Content locked
The catalog is public. Reading this content requires approved access.
Sign in to readChapter 7: Assembly Language
7
Assembly Language
7.1 Assembly Language Programming— Moving Up a Level
7.2 An Assembly Language Program
7.2.1 Instructions
7.2.1.1 Opcodes and Operands
7.2.1.2 Labels
7.2.1.3 Comments
7.2.2 Pseudo-Ops (Assembler Directives)
7.2.2.1 .ORIG
7.2.2.2 .FILL
7.2.2.3 .BLKW
7.2.2.4 .STRINGZ
7.2.2.5 .END
7.2.3 Example: The Character Count Example of Section 5.5, Revisited Again!
7.3 The Assembly Process
7.3.1 Introduction
7.3.2 A Two-Pass Process
7.3.3 The First Pass: Creating the Symbol Table
7.3.4 The Second Pass: Generating the Machine Language Program
7.4 Beyond the Assembly of a Single Assembly Language Program
7.4.1 The Executable Image
7.4.2 More than One Object File
PTR .FILL STARTofFILE
\begin{array} { r l r } { . \mathsf { E X T E R N A L } } & { { } } & { \mathsf { S T A R T o f F I L E } , } \end{array}
Exercises
7.12 What does the following LC-3 program do?
7.13 The following program adds the values stored in memory locations A, B, and C and stores the result into memory. There are two errors in the code. For each, describe the error and indicate whether it will be detected at assembly time or at run time.
★7.28 Consider the following program:
★7.29
★7.30
7.36 The modulo operator (A mod B) is the remainder one gets when dividing A by B. For example, 10 mod 5 is 0, 12 mod 7 is 5.
Source