hewlett-packard HP 9835A — 071

Assembly Language Fundamentals 71 Defining Your Own You are defining your own symbol each time you specify a label on an instruction or pseudo- instruction. Normally the "value" of the label is the address associated with the instruction. case is when the label is on the EQU pseudo-instruction; the other case is when the label is on However, in two cases it is possible to create the label and specify what its value is to be. One the SET pseudo-instruction. value-assigning capability to symbols. It generates no code itself, and it has no implementation The EQU is an assembly-time construct. It exists only at the time of assembly to give you or "location" in the object module.

To define a symbol using an EQU, the form is- {label}:: [iJLJ {expression} the resulting symbol ( {label}) has the same "type" as the expression (see "Expressions" below) and it has the same value as the result of the expression. As an example, assembling the statement- ISGJRCE Ihree: ~lU means that in all references in the module to the symbol "Three", it is the same as referring to the value 3. Thus- means load A with the contents of location 3. A common use for this instruction is to assign a symbol an address which is an offset from another address. For example, if this sequence were in a module - I ':;C)Ui?C:E:

I ':::;C!:".IF?CE EC!U then Save b would refer to the second word in the ass area "Save_registers", and it would probably be used to store away the contents of the a register sometime - and later retrieve the value -