Relocation - HP 9835A Programming Manual

35 series desktop computer assembly development rom
Table of Contents

Advertisement

68
Assembly Language Fundamentals
Relocation
The code talked about in this section is relocatable. You do not have to worry about the
absolute location of your module. The assembler automatically generates the appropriate
machine codes for each of your instructions to assure that the correct location is reached when
referenced.
Some instructions generate relocatable object code in which the operand address is an offset
from the current address and the relocating loader has to make no changes to the object code
for them as long as they are within - 512 and
+
511 of the current address .
. For indirect addressing, and for instructions which are more than 512 words away from the
current address, it is required of the loader to adjust the address in the intermediate word to
reflect the actual address being referenced. For indirect addressing generated by the assembler,
this activity is automatic.
Some instructions permit you to specify an absolute machine address for its operand. In those
cases, the assembler generates the code necessary to perform the reference to the absolute
location.
For example, if the instruction was assembled -
... L.Jj····-1
.r::i
(which essentially says "load register A with the contents of register B) the result would be a
machine instruction which references the B register (absolute address 1). This reference would
be independent of the actual location of the instruction itself.
There are a couple of ways to produce an absolute address in an operand. The pre-defined
symbols are one way. There is a type of expression known as "absolute" which is another way.
Both of these are dicussed in the next section, "Symbolic Operations" .
You should never try to use absolute addressing within the ICOM region, since not only is the
location of the region itself not fixed, but modules can be moved around within the region.

Advertisement

Table of Contents
loading

Table of Contents