Res; Common; Progra M Secti Ons; Asect/Csecl - Xerox 530 Language And Operations Reference Manual

Table of Contents

Advertisement

RES
Reserve An Area
The RES directive enables the user to reserve an area of
core memory.
The form of this directive is
t:
Label
_
[label]
Command
RES
_ _ t _ _
~rgumen'.
_ _ _
j
where
1abel
isanyvalidsymbol. Useofalabel isoptional.
When present, the label is defined as the current
value of the execution location counter; that is,
the first location in the reserved area.
n
i<; an evaluatoble expression {no literal, external,
or forward reference} designati ng the number of
words to be reserved.
The val ue of n may be a
positive or negative integer, or
O.
When :xtended Symbol encounters anRESdirective, italters
the load and execution location counters by the specified
number of words. This enables the programmer to reserve an
area of core within the instruction sequence of his program.
The RES directive does not clear the reserved area.
Example
11.
RES Directive
ORG
A
RES
LDA
100
10
Set load and execution loca-
tion counters to 100.
Define symbol A as location
100 and advance the load and
execution location counters by
10words, changing them to 110.
VALUE
This instruction is assigned to
the location immediately fol-
lowi ng the 10 reserved words;
that is, to 110, relative to
O.
~----------------------~---
COMMON
The COMMON directive enables the user to reserve on
area of core memory wi thi n the common storage area. The
form of thedirective
i~
Label
Command
------COMMON
__
~rgument
n
----TTCibeTj-
where
label
isanyvalidsymbol. Useofalabelisoptional.
When present, the lobe lis defi ned as a re locatable
symbol having as its value the current value of the
common location in the reserved area.
n
is an evaluatable expression (no literal, external,
or forward references) desi gnati ng the number of
words to be reserved.
The value of n may be a
positive or negative integer or
O.
26
Program Sections
When Extended Symbol encounters a COMMON directive,
it alters the common location counter by the specified
number of uni ts.
Thi s enables the programmer to reserve
an area of core outside the instruction sequence of his pro-
gram.
No other Extended Symbol di rective affects the
common location counter which is automatically set to
zero at the beginning of an assembly.
The COMMON directive does not clear the reserved area.
Common symbols may be referenced as relocatable operands;
however .. the assembl er wi
II
not generate any instructions
or data to be stored in the common area.
PROGRAM SECTIONS
An object program may consist of one or more program sec-
tions: one or more relocatable and/or one or more absolute
sections.
It is usually desirable to assemble a symbolic program section
without allocating it to a particular memory area or starting
location. When a program section can be executed indepen-
dently of its origin, that is, independently of where it is
physically located within the computer, it is called a relo-
eatable program section. Relocatable sections are frequently
assembled relative to location zero; that is, they are assem-
bled as if the first instruction would be stored at location
zero.
Subsequent instructions are assernbled relative to the
beginning location of the section.
When a relocatable section is loaded into core to be exe-
cuted, the user may specify the beginning location of the
area where the section is to be stored, and an appropriate
value (called a relocation bias) is added by the loader to
each relocatable symbol and expression in the section. For
example, if a relocatable section is loaded beginningat loca-
tion 1000, the value 1000 is the relocation bias. To illus-
trate, assume a section is assembled relative to zero:
Location
Instruction
Comment
100
ADRL ALPHA
Address literal of
120
ALPHA
LDA
BETA
location ALPHA
Load accumu lator
with contents of
BETA
When these statements are assembled, locatj on 100 wi
II
con-
tain the value 120.
If this section is loaded with a relocation
bias of 1500, lhe location 1600 (100+1500) would contain
the value 1620 (120+ 1500).
Program sections are generally relocatable. However, the
provision for absolute (nonrelocatable) sections is useful for
providing instructions to be executed in the event of an
interrupt.
ASECT/CSECT
Absolute/Relocatable Program Sections
Two directives are provided for program sectioning:
Label
Command
Argument
--
--
ASECT
CSECT

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sigma 3Sigma 2

Table of Contents