Afa; Abs Function; Af/Afa Function - Xerox 530 Language And Operations Reference Manual

Table of Contents

Advertisement

Example
33.
ABS Function
CSECT
Declares control section and sets lo-
cation counters to relocatable zero.
Reserves five words.
RES
DO
DATA
FIN
8*( (ABS($)& 7»0)-(ABS($)& 7}
Generates data words of zero unti
I
the
execution counter ($) is at a multiple
of eight.
Note that a BOUN D
8
di-
rective would accompl ish the same
thing, but no data would be gen-
erated in the skipped locations.
AF
Argument Fi eld
The AF functi on refers to the arguments ina procedure ref-
erence statement.
Its format is
AF'(element number}
where
AF
specifies the argument field.
element number
specifies which argument in the
argument field is being referenced. Element num-
ber is required and must be enclosed by parenthe-
ses.
If the desi gnated argument in the procedure
reference argument field is an expression, it is
evaluated when the assembler evaluates the pro-
cedure reference statement, not when the intri nsi c
function uses it.
Example
35
illustrotes the use of
the AF function.
Element number zero refers to
the value in the argument field of the CNAME
line for the name by which the procedure was
invoked.
AFA
Argument Field Asterisk
.The AFA function determines whether the specified argu-
ment in the procedure reference argument field is preceded
by an asterisk.
The format of this function is
AFA(element number}
where
AFA
identifies the function.
element number
specifies which argument in the
procedure reference, argument field is to be tested.
Element number is required and must be enclosed
by parentheses.
AFA is useful for specifying the
indirect tag for a GEN 1 directive.
44
Intrinsic Functions
The AFA function produces the value 1 (true) if an asterisk
prefix exists on the designated argument.
If the asterisk
prefix does not exist, or
if
the designated argument is not
provided, AFA produces a zero value (false).
In the case where an argument may be passed down several
procedure levels (from one procedure to another), anyoccur-
rence of the argument with an asterisk prefix wi
II
satisfy the
exi stence of the prefi x.
' .
Example
34.
AF/ AFA Function
This procedure definition (COMP) loads the accumulator
with the smaller of two values.
The procedure reference
statement may indicate indirect addressing for one or
both of the arguments as in the reference
ANY
COMP
*X, *y
*X
and
*y
specify that the addresses of the two words
to be compared are in locations
X
and
Y.
COMP
LDA
CP
CNAME
PROC
SET
SET
GENl
GENl
BNO
GENl
PEND
The procedure reference
ANY
COMP
X'8'
X'D'
LDA, AFA(l), 0,
0, 0,
AFR(1)
CP, AFA(2),
0,0,
AFR(2)
$+2
LDA, AFA(2),
0, 0,
AF(2)
*X,*Y
would generate coding equivalent to
LDA
CP
BNO
LDA
The procedure reference
COMP
*X
*y
$+2
*y
X,Y
would generate coding equivalent to
LDA
CP
BNO
LDA
X
Y
$+2
Y

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sigma 3Sigma 2

Table of Contents