Arguments - HP 9835A Programming Manual

35 series desktop computer assembly development rom
Table of Contents

Advertisement

Communication Between BASIC and Assembly Language
109
In general, no machine instructions or code-generating pseudo-instructions can be inserted
between a SUB pseudo-instruction and the instruction containing the routine name. An excep-
tion to this exists when arguments are involved in a call.
Arguments
When a value is placed into an ICALL statement to be sent down to an assembly language
routine, that value is called an "argument" (like the argument of a mathematical function). The
corresponding structure on the assembly language side is called a "parameter". A parameter
"declaration" is an assembly pseudo-instruction by which a parameter is created.
When a routine is to be called with arguments, a parameter declaration pseudo-instruction is
required for each one of the arguments. These declarations appear between the SUB pseudo-
instruction and the instruction containing the rou tine name.
Thus, when there is a call like -
the corresponding assembly language entry looks like -
30URCE
SUB
To accommodate the two arguments, two parameter declarations had to appear between the
SUB instruction and the entry point. (In this example, they were the STR and REL declara-
tions.) These declarations may even have labels of their own -
~uJPCE
218meter
PEL
The appearance of these labels does not effect the fact that "Sort" is the name of the routine.

Advertisement

Table of Contents
loading

Table of Contents