Download Print this page

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

System
Hide thumbs

Advertisement

The programmer may refer (in the OPERAND field)
to the right-end (3003) of this field as:
WARE+3
SELF- RELATIVE ADDRESSING
The asterisk, as the first character of an operand,
specifies the current value of the location counter as
the address.
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-
terisked address is relocatable.
SELF- DEFINING VALUES
In the previous example, a self-defining value of 3
incremented a symbolic address.
Self-defining values may be in three forms; decimal,
hexadecimal, and character. They may modify ad-
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,
HEXADECIMAL
Four (4) used to define length of
ABLE
Forty-nine to address location
4910 (Interrupt Mask)
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
HEXADECIMAL
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.

Advertisement

loading

  Also See for RCA Spectra 70

  Related Manuals for RCA Spectra 70

This manual is also suitable for:

Spectra 70/25