Cfr Function; Ufv Function - Xerox 530 Language And Operations Reference Manual

Table of Contents

Advertisement

but
BAL
ADDR
produces
CFR
RCPYI
B
1,2
ADDR
Required Command Field
The CFR function refers to the arguments in the command fi el d
cf
the procedure reference statement, as does the CF functi on.
erR
differs frornCronlywhenfewerthan "element number"
parameters are present in the command field of the procedure
reference line.
In this case, CFR will cause a diagnostic
error,
E,
to be printed on the listing, while CF will not.
In
both functions, the value will b,:! replaced
by
zero.
Exumple
38.
CFR Function
The procedure BA L produces the RCPYI and
B
i nstructi on
Iypically used to link to
Cl
subrourine or Monitor service
routine.
BAL.
CNAME
PROC
RCPYI
B
PEND
11,
CFR(2)
Set link register.
AFR(l), AF(2), AF(3)
Branch.
The procedure reference
BAL,2
SUBR
~wnerates
the equi val ent of
RCPYJ
1,2
B
SUBR
---"-----, ..
_---'
..
Example
39.
UFV Function
UFV
Use Forward Va I ue
The UFV function overrides the assembler's restrictions on
the use of forward references.
Its format is
UFV(jtem)
where
UFV
identiJlfes the function.
item
represents an intrinsic function, a symbol,
or
an expression.
In order tomaintain identicoladdress ClSsignmentsinboth the
definition and generation passes of theussembler, forward ref-
erences
are not allowed in certain contexts (such as the argu-
ment fieldof a RES, BOUND, ORG, or DO directiv'c).
In
certain cases, it may be desirable to allow a forward refer-
ence when it is known that the value will not affect addrcss
assignm0nt.
The UFV functiop is
uS0d
to achieve this.
During the definition pass (pass 1) of the assembler, UF\;
returns the valuc, integer zero, If its argument
i~
a
forword
reference; otherwise, its value
is
the argument itself.
During
the generation pass (pass 2) of the assembler, UFV
return~
the value assigned
by
the definition pass, and inhibits the
error reporting that would occur if the forward reference
were used ina norma
Ily
i Ilega
I
context.
The UFV function can be used in conjuncl'ion with the AT
function in order to determine the
type
of a forward refer-
tlnCe (see Exampl
e
41).
I'Jote:
The UFV function should be used with extreme care,
such that no val ues resul ting from its use either
directly or indirectly affect address assignment on
eithe~
assembly pass.
Labels or literal locations
thot are defi
tV3d
di fferent
I~'
i r the two passes are
fj':l9gedwith a "D" o=.rror.
At a point prior t'o the definition of ALPHA, BETA, r)r GAMMA, it is desired to generote the offset of GAMMA from
ALPHA if ALPHA
<
GAMMA
<
BETA, or the ofhet of GAMMA from BETA
if
GAMMA ,'BETA.
The UFV function
makes this simple to accomplish, as shown below.
DO
DO
DATA
ELSE
DATA
FIN
ELSE
DATA
FIN
ALPHA
EQU
GAMMA
EQU
BETA
EQU
UFV(GAMMA)
>
UFV(ALPHA)
UFV(GAMMA)
<
UFV(BETA)
GAMMA - ALPHA
GAMMA - BETA
o
$
$
$
o
on definition
petS< (see Chapter
1).
o
on definition pass.
Generoted on generation pass.
Gencluted on definition pass.
L..-_ _ _ _ _ _ , _ _ _ _ _ _ _ _ _ _ _ _ _ _
, _ _ _ _ _ _ _ _ _ _ _ _ _ _
..
,.-------,----.----.--~
Intrinsic Functions
47

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sigma 3Sigma 2

Table of Contents