
Next: Conclusions and Future
Up: Integrating Abstract Machines:
Previous: Defining Assembler Instructions
In the GAMA, assembler and loader are interleaved: in contrast to
most assemblers for native machines
which first
produce a relocatable object
file which is linked together with other object files by a linker and
then loaded into memory for execution, the GAMA assembler and loader
directly transform assembler code into executable machine code in memory.
In addition to the instructions defined via definstr, the GAMA
assembler handles the following pseudo instructions:
- .proc marks the beginning of a procedure; it is mainly
used to restrict the scope of local labels thus allowing different
procedures to use the same local labels
- .end marks the end of a procedure; in addition to restricting
the scope of local labels together with .proc, it adds
the end address of a procedure
to the information in the corresponding hash table entry (third cell)
in order to allow the procedure to be removed from memory
- .dynamic declares the following global labels (the entry
points for procedures)
to be dynamic (see section 7.3)
- .static declares the following global labels
to be static
- any symbol is taken as a global label
- any number or string is taken as a local label
- (.module
)
declares all following
global labels to
be in module
; if this module does not yet exist, it is created
- (.import-from
) imports
from module
(qualified import)
- (.import-module
) imports all labels from module
(unqualified import)
The following example shows the usage of some of these pseudo instructions
and how the assembler and loader transform
assembler code into executable machine code in memory.


Next: Conclusions and Future
Up: Integrating Abstract Machines:
Previous: Defining Assembler Instructions