Intrinsic Functions; Abs; Ufv; Procedure-Loca I Symbol Regions - Xerox 530 Language And Operations Reference Manual

Table of Contents

Advertisement

which, in general, conform to the conditions described for
local symbol regions in
CI
main program, as described in
Chapter 6.
When the assembler initiates processing of a procedure def-
inition as the result of encountering a procedure reference,
the current symbol region conditions of the assembly are
carried over into the procedure assembly.
That is, the
current main level local symbols are sti
II
active at their
particular level.
If within the invoked procedure a LOCAL
d i recti ve is encountered, then
1.
Loca
I
symbols from the most' recent or current mai n-
I
oca
I I
eve
I
form
thE~
base for the current procedure-
local level. To these base local symbols are added the
symbols specified in the most recently encountered
LOCAL directive.
In the case of duplicate names for
local symbols from different' levels, the value of the
later name is used.
2.
Subsequent LOCAL directive encounters within the cur-
rent level causethepreviousadditionswithinthatsame
level to be ignored and the new set of entries on the
LOCAL directive to be added to the local symbol table.
If within the current procedure level a lower level proce-
dure is invoked, the current procedure-local symbol table
(if any}forms the base for any lower level procedure-local sym-
bol table generated by
thE~
occurrence of a LOCAL directive.
In summation, where there are multilevel local symbol re-
gions, the next highest level (if any) forms the symbol table
base for the current region.
LOCAL directives within a
particular level act as they do in the main level.
When a
particular level is 'terminated by a PEND directive, the
previous higher level has its symbol table restored and so
on until main level is again reached.
If a procedure is referenced more than once in a single as-
sembly, symbols defined within 'rhe procedure except by a
SET directive must be declared LOCAL.
If not, these sym-
bols will be multidefined.
Example 32. Procedure-Local Symbol Regions
*PROCEDURE P3 DEFINITION
P3
CNAME
PROC
LOCAL
A31
DATA
A
31"
B
ll
,
C
22
, D
11
,
LOCAL
B32
DATA
.A:llff
B 32 , C 22 , D
11
,
PEND
*PROCEDURE P2 DEFINITION
P2
CNAME
PROC
EO
EO
LOCAL
DATA
LOCAL
DATA
P3
PEND
B
ll ,
C
11
, D
11
, E21
B
ll
, C
22
,
D
11
,
EO
*MAIN LEVEL
LOCAL
P2
END
In this example the subscripts are used to show which
references are identical.
In the actual program there
are of course no subscripts.
INTRINSIC FUNCTIONS
Intri nsi c functi ons are bui It into the assembler.
The
10
intrinsic functions described here enable the user to pass
arguments from procedure reference statements to procedure
definitions.
These intrinsic functions are
ABS
AF
AFA
AFNUM
AFR
AT
CF
CFNUM
CFR
UFV
AFNUM and CFNUM are reserved words; they may not be
defined by the program.
ABS, AF, AFA, AFR, AT, CF,
CFR, and UFV are not reserved words; they may be defined
by the program.
Intrinsic functions may be used in the command or argument
field of any machine instruction or assembler directive with
the following exceptions: they may not be used in command
field one (CF(l)) of any statement, nor may they appear in
the argument field of a DEF, GOTO, IDNT, LBL, LOCAL,
REF, SREF, TEXT, TEXTC, or TITLE directive.
ABS
Absol ute Va
I
ue
The ABS function converts a relocatable address into an
absolute integer value representing the word offset of the
address from its relocation base (COMMON or non-
COMMON).
Its format is
ABS(address expression)
where
ABS
identifies the function.
address expressi on
is any valid address.
The absolute value of any item other than a relocatable
COMMON address or a relocatable non-COMMON address
is the item itself (that is, the ABS function has no effect).
Intrinsic Functions
43

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sigma 3Sigma 2

Table of Contents