Creating Modules - HP 9835A Programming Manual

35 series desktop computer assembly development rom
Table of Contents

Advertisement

Assembly Language Fundamentals
55
Creating Modules
When you were introduced in Chapter 2 to the concept of a module,
it
was said that a module is
given a name through the NAM pseudo-instruction.
So, when you enter a source line which has the following form -
you are assigning a name to a module, and you are also delimiting the beginning of the module.
By the inclusion of this statement, all source lines which follow are part of the module with the
name designated in this source line, that is, all lines until the END pseudo-instruction is encoun-
tered in the source. It has the form -
[t··1L) {module name}
Its {module} name must be the same as in the NAM pseudo-instruction.
A {module name} follows the same rules for naming as do labels (see above).
It is by the use of these two instructions that modules are created. 'The source lines which
appear between them comprise a single module, and the name assigned to the module is the
one with which the module is referenced (with the ILOAD and ISTORE statement for example).
When it comes time to assemble the source into object code, the assembler treats the source
lines in a module as a unit.
In actuality, therefore, there are two modules - a source module and an object module. When
you are assembling a module, the name you use refers to the source module and creates the
object module. Later, other statements, such as ISTORE and ILOAD, refer solely to the object
module.

Advertisement

Table of Contents
loading

Table of Contents