# Self-Defining Values; Expressions - RCA Spectra 70 Training Manual

System
Also See for Spectra 70:

The programmer may refer (in the OPERAND field)
to the right-end (3003) of this field as:
WARE+3
The asterisk, as the first character of an operand,
specifies the current value of the location counter as
The address is always the leftmost
byte generated by the statement line. Thus, the
asterisk, with a plus or minus value, can address a
position to the right or left of the first byte generated
by the statement line.
Assuming the location counter value is 2000 for a
given statement line, *+6 generates an address of
2006 and *-3 furnishes an address of 1997. An as-
SELF- DEFINING VALUES
In the previous example, a self-defining value of 3
Self-defining values may be in three forms; decimal,
dresses, express masks and lengths, and represent
I/O trunk and device numbers. Self-defining values
may also be usedfor location addresses. When used
for this purpose, they should not exceed 4095(10).
DECIMAL
A one to six decimal digit number may be used. The
Assembler converts it to the binary equivalent.
Example:
OPERAND
ABLE (4) ,
OPERAND
0049,
Four (4) used to define length of
ABLE
Up to six hexadecimal digits may be written as a
self-defining value by enclosing the digits in single
quote marks preceded by an X. This option is used
to represent binary configurations such as masks.
Examples:
OPERAND
X'3F',
Represents the binary config-
uration 0011 1111.
16
CHARACTER
A character may be specified by enclosing it in single
quote marks preceded by a C.
Example:
OPERAND
CtA',
The character A (or in binary
1100 0001) is desired.
Example:
The three statements below generate the
same value:
OPERAND
CtA'
X'C1'
192,
EXPRESSIONS
CHARACTER
DECIMAL
All will
generate
1100 0001 2
An expression is a symbol or a self-defining value,
or a combination of the two, written in the operand
field of an Assembly statement. A simple expression
contains one factor.
NAME
OPERATION
OPERAND
START
MVC
AP
XtABC t
ABLE (3) ,BAKER
Xl (6),120(4)
The compound expression is made up of two or three
simple expressions.
OPER-
NAME
ATION
OPERAND
MVC
AP
* e 55(3), BAKER*ABLE
SUM1 e SUM2+66(6), *+T ANG e 5
Expressions are further divided into two additional
classifications, absolute and relocatable. An abso-
lute expression generates an object machine address
that is fixed, and may not be legitimately changed.
The address generated by a relocatable expression
is relative to the starting point of the program seg-
ment and may be altered when coding blocks are re-
located in memory.
Assembly rules for the formation of compound ex-
preSSions must be followed closely.
Otherwise,
absolute addresses may be generated where relo-
catable ones are required.
SUMMARY OF RULES FOR FORMING EXPRESSIONS
A simple expression is a single symbol, or one self-
defining value used as an operand.