Introduction to
Assembler Features
•Expressions. Arithmetic expressions can be formed from symbolic addresses and constants, integer constants, and arithmetic operators. Expressions involving only symbolic and integer constants, or the difference between two relocatable symbols, defined in the current module, are called absolute expressions. They can be used wherever an integer constant can be used. Expressions involving the sum or difference of a symbolic address and an absolute expression are called relocatable expressions or address expressions. The constant part of an expression, the part that does not refer to relocatable expressions, can use parenthesized subexpressions to alter operator precedence.
•Storage Allocation. In addition to encoding machine language instructions symbolically, storage may be initialized to constant values or simply reserved. Symbolic addresses and labels can be associated with these memory locations.
•Symbol Scope. When two or more object files are to be combined by the linker, certain symbolic addresses can be defined in one module and used in another. Such symbols must be exported from the defining module and imported into the using module. In the defining module, the symbol has universal scope, while in the using module, the symbol is unsatisfied. Other symbols declared in the source program that are not exported have local scope.
•Subspaces and Location Counters. You can organize code and data into separate subspaces, and into separate location counters within each subspace. The programmer can move among the subspaces and location counters, while the Assembler changes the code and data into the correct order. In
•Macro Processing. A macro is a
16 | Chapter 1 |