Download Print this page

Run And Segment Controlling Codes (Start, End, Csect) - RCA Spectra 70 Training Manual

System
Hide thumbs

Advertisement

Table of Contents
EXTRN CODE
Reference to a symbol in another program is defin-
ed by the EXTRN Code. A separate statement must
appear for every symbol appearing in another pro-
gram.
EXTRN appears in the OPERATION field and
a symbol must be used in the OPERAND field.
The
NAME field is not used on this line.
EXAMPLE OF ENTRY AND EXTRN
One use of the ENTRY and EXTRN codes is to link a
program to a subroutine. Assume that a SINE-CO-
SINE subroutine has two ENTRY points; SINE and
COS, and one EXTRN point; RTN. Programs using
the SINE-COSINE routine can BRANCH to either
SINE or COS depending on which function is to be
computed. The SINE-COSINE routine BRANCHES to
RTN after computing the function.
SINE-COSINE ROUTINE
NAME
OPERATION
OPERAND
SINE
COS
START
ENTRY
EXTRN
B
B
END
COS
RTN
RTN
RTN
MAIN PROGRAM
NAME
OPERATION
OPERAND
BGN
RTN
START
ENTRY
EXTRN
B
END
RTN
COS
~COS
is
an
ENTRY
COS
point in the SINE-
COSINE Routine
The main program defines RTN as an ENTRY point
that allows the SINE-COSINE routine to BRANCH to
RTN.
20
RUN AND SEGMENT CONTROLLING CODES
The first and last statements of the source program
must be a START and END statement, respectively.
If
a program contains sections which are to be load-
ed individually, the second and succeeding sections
must begin with a CSECT control code.
START CODE
In addition to flagging the start of the source pro-
gram, a START code can set the location counter to
an initial value and identify an entry into the pro-
gram.
START must appear in the OPERATION field.
A
self-defining value, written in the OPERAND field,
sets the location counter. A symbol appearing in the
NAME field is considered an ENTRY point into the
program (see ENTRY code).
NAME
OPERATION
OPERAND
BEGIN START
END CODE
S'064'
Set Location
counter to 100(10)'
Establish "BEGIN"
as an entry point.
The END code informs the Assembler that all source
input statements have been processed. The OPER-
AND field specifies the starting address of the object
program. A symbol, self-defining value, or aster-
isked address may appear in the OPERAND field.
NAME
OPERATION
OPERAND
END
CSECT CODE
STARTP
STARTPisthe
name of the pro-
gram starting
address
The CSECT code identifies both the beginning of a
new section (segment) and the termination of the pre-
vious section. The START code identifies the first
section, therefore CSECT should be used for the
second and succeeding sections only. The NAME
field may contain a symbol or be left blank. A sym-
bol used in one segment can be referenced by any
other segment in the program.

Advertisement

Table of Contents
loading

  Also See for RCA Spectra 70

  Related Manuals for RCA Spectra 70

This manual is also suitable for:

Spectra 70/25