Litera Is - Xerox 530 Language And Operations Reference Manual

Table of Contents

Advertisement

Note:
E1 <E2<E3 cannot be used to determine whether E2
is within the limits E1 and E:3.
Instead it is evalu-
ated as if it had been written as (E 1 < E
2 )
< E 3 . That
is, the triad El < E2 results in a value, b, of 0 or 1.
Then this value is \Jsed for the triad b< E3 to
yield another binary result.
The correct form is
El <E
2
&E
2
<E
3 ·
Parentheses Within Expressions
Mull"itermed expressions frequently require the use of paren-
theses to control the order of evaluation.
Terms inside
parentheses are reduced to a single value before being com-
bined with the other terms in the expression.
For example,
in the expression
ALPHA* (BETA+5)
the term BETA+5 is evaluated first, and that result is mul-
tiplied by ALPHA.
Expressions may contoin parenthesized terms within paren-
thesized terms:
DATA +
(HRS/8~(TIME*'2*(AG+FG))+5)
The innermost term (in this example, AG + FG) is evaluated
first.
Parenthesized terms may be
n(~sted
to any depth.
Expressions must not contain two consecutive binary oper-
ators.
The assembler distinguishes between the unary op-
erators (-), (+), and(--,), and the binary operators as follows:
1.
An operator precedi ng on expression may only be a
unary operator, as in
-27.
2.
The first operator following a tElrm in a multitermed
expression must be a binary operator:
-l27~L:ary
binary
---unary
At~S
tL-unar
y
binary
In general, Extended Symbol wi
II
accept any combination
of operators that is algebrait::ally
10~Jical;
that is,
5*-BETA
5-*BETA
is permissible.
is not permissible.
Summary of Operator and Expression Syntax
1.
Labels (symbols) and constants are single-termed
expressions.
2.
If El is an expression, then (El) is an expression.
3.
IfEl isanexpression, then-Elp+E1and--.El are
expressions.
4.
If El and E2 are expressions, then El **E 2 , E1 *E 2 ,
E 1 /E2' El + E 2 , El - E2' El
<
E2' El >E2' El <=E2'
El >=E2, El-,=E2, El &E2, El =E2, E1
II
E2, and
Ell E2 are all expressions.
5.
Externa
I
and forward procedure local references may
occur only as single-termed expressions.
UTERALS
Constants provide one means of incorporating data directly
into a program at the time it is being written; literals pro-
vide another means. A literal is written as a constant
(decimal, hexadecimal, or character string) or symbol refer-
ence preceded by an equal sign. The literal, in contrast to a
constant, is not processed as part of the program statement
in which it appears.
Instead, the literal is evaluated and
assigned to a storage location in a literal pool, and the
address of that location is assembled into the instruction.
Literals are useful in statements that require the address of
a data value rather than the dota value itself. Without
I
it-
erals it would be necessary in such situations not only to
enter the address (or symbolic location) of the data value
into the statement, but also to establish the value in the lo-
cation referred to by using a DATA directive, for example.
By using a literal, the value can be written directly in the
statement; the storing of the value in a memory location
and the substitution (in the statement) of the value's address
are tasks performed automatically by Extended Symbol.
A literal consists of an equal sign followed by a single-
termed expression (other than a
I
iteral) or an equal sign
followed by a multi-termed expression.
The value represented by a literal must not exceed the
16-bit capacity of one computer word.
Examples of valid and invalid literals:
Literal Notation
=-185
-=e'K'
::;::'ABC'
=X'5DF'
Description
Valid.
Decimal value -185
Valid.
Alphanumeric constant in
storage as 10000100001110110010
I
o
K
Inval id.
Exceeds 1-word capacity
Valid.
Hexadecimal constant in
storage as 10000101011110111111
I
o
5
D
F
Language Elements
7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sigma 3Sigma 2

Table of Contents