1 | Introduction to |
| Assembly Language |
The HP 9000 Assembly Language represents machine language instructions symbolically, and permits declaration of addresses symbolically as well. The Assembler's function is to translate an assembly language program, stored in a source file, into machine language. The result of this translation resides in a relocatable object file. The object file is relocatable because it can still be combined with other relocatable object files and libraries. Therefore, it is necessary to relocate any addresses that the Assembler chooses for the symbols in the source program.
This process of combining object files and libraries is performed by the linker, ld. The linker's task is to transform one or more relocatable object files into an executable program file. Every program must be linked before it can be executed, even if the source file is complete within itself and does not need to be combined with other files.
Assembler Features
The Assembler provides a number of features to make assembly language programming convenient. These features include:
•Mnemonic Instructions. Each machine instruction is represented by a mnemonic operation code, which is easier to remember than the binary machine language operation code. The operation code, together with operands, directs the Assembler to output a binary machine instruction to the object file.
•Symbolic Addresses. You can select a symbol to refer to the address of a location in virtual memory. The address is often referred to as the value of the symbol, which should not be confused with the value of the memory locations at that address. These symbols are called relocatable symbols because the actual addresses represented by such symbols are subject to relocation by the linker.
•Symbolic Constants. A symbol can also be selected to stand for an integer constant. These symbols are called absolute symbols because the values of such symbols are not relocatable.
15