Text preview for : C28-0326-2_Autocoder.pdf part of IBM C28-0326-2 Autocoder IBM 140x C28-0326-2_Autocoder.pdf
Back to : C28-0326-2_Autocoder.pdf | Home
File No. 1410/7010-22
Form C28-0326-2
Systems Reference Library
IBM 1410/7010 Operating System (1410-PR-155)
Autocoder-1410-AU-968
This publication is a reference text for personnel engaged in writ-
ing programs in the Autocoder language for use within the frame-
work of the 1410/7010 Operating System. The Autocoder language
is composed primarily of symbolic one-for-one source statements.
Its associated processor (Program Number 1410-AU-968) is a
symbolic assembly program with macro-generation facilities.
MINOR REVISION (November 1964)
This publication is a minor revision of, and makes obsolete,
the publication IBM 141017010 Operating System; Autocoder,
Form C28-0326-1, with its associated Technical Newsletter,
N28-1126. Minor changes to the text have been indicated by a
vertical line to the left of the change; revised illustrations are
denoted by the symbol. to the left of their figure captions.
Copies of this and other IBM publications can be obtained through IBM Branch Offices.
Address comments concerning the contents of this publication to:
IBM Corporation, Programming Systems Publications, Department 637, Neighborhood Road, Kingston, New York 12401
Contents
Introduction ........ 5 Autocoder Operation Codes . ................... . 21
Purpose of this Publication. . . . . . . . . . . . . . . . . . .. 5 Imperative Operation Codes.... . ............ . 21
Purpose of the Language and Processor. 5 Symbolic Machine Instructions .................. . 21
The Autocoder Language. . . . . . . . . . . . . . . . . . . . .. 5 Special Imperative Statements ................... . 21
The Autocoder Processor. 5 NOPWM - No Operation; Word Mark ........... . 21
Prerequisites .................................. 5 NOP - No Operation ........................ . 21
Minimum Machine Requirements. ........... 6 Declarative Operation Codes .................... . 23
DA - Define Area ... . . . . . . . . . . . . . . . . . . . . . . . . . .. 23
DA Statement 23
Basic Concepts and Functions . . . . . . . . . . . . . . . . . .. 7 DA Subentries 23
Autocoder Statements .......................... 7 DA Statement Parameters 24
Principal Elements of Autocoder Statements. . . . . . .. 7 Sample Problem . . . .................... . 25
Label . . . . . . . . . . . . . . . . . . . .. 7 Review ................................... . 25
Operation Code . . . . . . . . . . . . . . . . . . . . . . . . .. 7 DA V - Define Area in COMMON. . . . . . . . . . . . . . . . . . . . 26
Operand .......... . . . . . . . . . . . . . . . . . . . . .. 7 Assignment of Data Areas in COMMON . . . . . . . . . . . . 26
Relocation ................................... 8 Use of Labels Referencing COMMON . . . . . . . . . . . . . . 27
Upward Relocation .......................... 8 RSV - Reserve Assignment in COMMON. . . . . . . . . . . . . 27
Downward Relocation .. . . . . . . . . . . . . . . . . . . . . .. 8 DCW - Define Constant with Word Mark. . . . . 27
NO Relocation .............................. 8 Numeric Constants ........ . ............ . 28
Definition of COMMON " . . . . . . . . . . . . . . . . . . . . . . .. 8 Alphameric Constants ................. . 28
Processing Options . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 9 Blank Constants ................ . 29
Autocoder Multiple Compilation ................ " 9 Address Constants '" ................. . 29
Terminating the Object Program. . . . . . . . . . . . . . . . .. 9 Signed Address Constants. . . . . . . . . . . . . . . . ..... . 29
Assembly Listing .. . . . . . . . . . . . . . . . . . . . . . . .. 10 Implied DCW Operation Codes ................. . 29
Replacement Codes . . . . . . . . . . . . . . . . . . . . .. 11 DC - Defined Constant (no word mark) . . . . . . . . . . . . 30
Coding Sheet '" . . . . . . . . . . . . . . . . . . . . . . .. 12 DS - Define Symbol ........................... . 30
Identification ............................... 12 EQU - Equate ................................ . 30
Page Number and Line Number ................ 12 Actual or Symbolic Address ................... . 30
Label ...... . ............................ 12 Adjusted or Modified Address ................. . 30
Operation Code ............................. 12 Index Register ......................... .... . 31
Operand ................................... 12 Asterisk .................................. . 31
Linkage Loader Operation Codes. . . . . . . . . . . . . ... . 32
TITLE - Title ................................ . 32
Types of Operand Entries. . . . . . . . . . . . . . . . . . . . . .. 14 Entries ................................... . 32
Basic Addresses ............................... 14 Format Considerations ...................... . 32
Symbolic ................................. " 14 BASE1- Base Address ......... . 33
Asterisk (*) ......... . . . . . . . . . . . . . . . . . . . . . . .. 14 Actual .................................... . 33
Actual ..................................... 15 Symbolic .................................. . 33
Address Adjustment ............................ 15 Asterisk Plus XOO (* + XOO) ................... . 33
The Form * + XOO. . . . . . . . . . . . . . . . . . . . . . . . . . .. 16 BASE2 - Base Address (COMMON Data Area) ....... . 33
Multiple Adjustment Factors. . . . . . . . . . . . . . . . . .. 16 CALL - Subprogram Call .. , .................... . 33
Indexing ..................................... 16 DCWF - Subprogram Address Constant ............ . 33
Addressing an Index Register. . . . . . . . . . . . . .... " 16
DCWS - Subprogram Branch Instruction ........... . 34
Indexing an Address .......................... 16
Indexing with Address Adjustment. . . . . . . . . . . . .. 17 DE FIN - Definition ............................ . 34
Literals ...................................... 17 PRTCT - Protect ......................... ..... . 34
Numeric Literal ........................... " 17 Control Operation Codes ....................... . 35
Alphameric Literal . . . . . . . . . . . . . . . . . . . . . . .. 18 Assembly Control Statements .................... . 35
Area Defining Literal. . . . . . . . . . . . . . . . . . . . . . . .. 18 HEADR - Header Line ................... .... . 35
Address Constant Literal. . .. ................. 18 RESEQ - Resequence ................... ..... . 35
Linkage Symbols ............ . ................ 19 PST - Print Symbol Table (Cross Reference Listing) 35
System Symbols ............. ................. 20 EJECT - Eject .............................. . 36
Miscellaneous. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 20 Subprogram Control Statements ................. . 36
Operation Modifiers (d-Characters)............. 20 ORG - Origin ..................... ......... . 36
Blank Operand . . . . . . . . . . .. ................. 20 L TORG - Literal Origin ................... ... . 38
Zero as a Basic Address. . . . .. ................. 20 END - End Subprogram and Assembly ........... . 38
Special Operand Elements. . . . . . . . . . . . . . . . . . . .. 20 SPEND - End Subprogram .................... . 38
The Macro System ........................... " 40 Pseudo-Macro Coding Example. . . . . . . . . . . . . . . . . .. 49
Definition of Terms ........................... " 40
Macro Operations . . . . . . . . . . . . . . . . . . . . . . . . . . .. 40 Appendix 51
Pseudo-Macro Instructions ...................... 44 A: Processor Error Diagnostic Procedures. . . . . . . 51
Permanent and Temporary Switches ........... " 44
B: Autocoder Messages and Limits 52
MATH - For Solving Algebraic Expressions ...... " 44
BOOL - For Solving Logical Expressions ........ " 46 C: 1410/7010 Autocoder Sample Program. . . . . . . 53
COMP - To Compare Two Fields .............. " 47 D: Autocoder Operation Codes .................. , 59
NOTE - To Produce a Message ................ " 48
MEND - End of Routine. . . . . . . . . . . . . ........ " 48 Index ......... . 65
Introduction
Purpose 01 this Publication THE ASSEMBLY PROCESS
This publication is a reference text for personnel writ- The assembly process produces an assembly listing and
ing programs in the Autocoder language for use with an object program in card-image form called, in this
the IBM 1410/7010 Operating System. publication, an object deck. The object deck is in re-
locatable format, ready for processing by the Linkage
Loader.
Purpose 01 the Language and Processor The programs assembled by the 1410/7010 Auto-
coder processor must be designed to run exclusively
The 1410/7010 Autocoder is one of three programming
within the framework of the Operating System. The
systems provided by the Operating System. (The other
Resident Monitor, including the Resident laCS, provides
two are FORTRAN and COBOL.) Autocoder consists of a
a great deal of power by simplifying the task of pro-
symbolic coding language and an assembly program
gramming. A minimum of programming need be
called a processor.
concerned with operating control and input/output
Utilizing the required elements provided by the operations, since macro-instructions are available for
Autocoder language, a program can be created by cod- these functions.
ing the steps necessary for the solution of the problem,
and presenting them in the form of statements. The THE OBJECT PROGRAM
Autocoder processor translates these statements into The following points should be noted concerning the
the computer's internal language, and assembles them object program as it is discussed in this publication,
in the form of a relocatable subprogram. The resulting and executed within the framework of the Operating
relocatable subprogram can then be processed by the System:
Linkage Loader and used whenever necessary. l. The object program will be referred to as a sub-
program. (A subprogram is the basic program unit with
The Autocoder Language: Elements of Source which the Linkage Loader performs its processing.)
Statements This subprogram can be a self-contained program, or
The user's source program is written by using mnemonic it can be a subroutine to be executed in conjunction
symbols to represent the principal elements of the with other subprograms, forming a multiphase pro-
source statements. These elements are (1) the name of gram.
the statement (a label), (2) the operation to be per- 2. Subprograms to be combined during one run of
formed by the statement (an operation code), and (3) the Linkage Loader can be assembled individually at
the program elements or parameters on which the different times or during a single assembly run.
operation is to be based and/ or performed ( the
operand).
Macro statements in a user's source program cause Prerequisites
additional symbolic source statements to be generated It is assumed that the user has completed a basic course
and inserted into the program. The generated source in programming for the IBM 1410 or IBM 7010 Data
statements will be tailored according to the logic of the Processing System, and is familiar with information
macro routine the programmer has placed in the Macro contained in the following publications:
Library and the parameters in the source macro- IBM 1410 Principles of Operation, Form A22-0526, or
instructions. IBft,,/ 7010 Principles of Operation, Form A22-6726,
and
The Autolcoder Processor: USled with the Operating IBM 1410/7010 Operating System; Basic Concepts,
System Form C2B-031B
The 1410/7010 Autocoder processor is designed to op- IBM 1410/7010 Operating System; System Monitor~
erate in conjunction with the Operating System. The Form C2B-0319
object programs produced are assembled and run ac- The Autocoder user must know certain Operating
cording to the conventions of the Operating System. System conventions and requirements in order to write,
Introduction 5
assemble, and execute his programs properly. The places. The user will find that the many advantages
pertinent information is contained in the following and conveniences of the Operating System can be
publications: implemented through the use of Autocoder.
IBM 1410/7010 Operating System; System Monitor,
Form C28-0319. Minimum Machine Requirements
IBM 1410/7010 Operating System; Basic Input/Out- The minimum machine requirements for assembling
put Control System, Form C28-0322. source programs written in the Autocoder language
Operating instructions for the System are contained are specified in the publication, IBM 1410/7010 Oper-
in the publication, IBM 1410/7010 Operating System; ating System; System Generation, Form C28-0352.
Operator's Guide, Form C28-0351. Machine requirements for the execution of the ob-
This manual will indicate specific cross references ject program depend upon the combined requisites
to the above-listed publications at the appropriate of the System Monitor and the user's program.
6
Basic Concepts and Functions
This section describes Autocoder statements and the Label
principal elements used in their construction; program- A label is a name assigned by the programmer to an
ming concepts under the Operating System; the assem- element in a program (e.g., a data area, constant, or
bly listing produced by the processor; and the coding instruction). This enables operands of Autocoder state-
sheet upon which source statements are coded. Suc- ments, referencing labeled elements, to have symbolic
ceeding sections discuss the various types of permis- form. The terms label and symbol will be used syn-
sible operands, Autocoder operation codes, and the onymously throughout this publication.
Macro System. A label can contain from one to ten alphameric char-
acters, which are left-justified in the label field (card
columns 6-15). The first character must be alphabetic.
A special case in which labels are not left-justified is
Autocoder Statements explained in the sections concerning DS, DC and DCW
The source program, which is translated by the Auto- statements.
coder processor into an object program, is composed Special characters must not be used in the label
of five types of Autocoder statements: field. (An exception is permitted in the DEFIN state-
Imperative (symbolic machine instructions) ment. See "DEFIN - Definition," under "Linkage Loader
Declarative Operation Codes.")
Linkage Loader
Control Operation Code
Assembly Control Statements The operation code field (card columns 16-20) con-
Subprogram Control Statements tains a one-to-five-character mnemonic that specifies
Macro the nature of the Autocoder statement and indicates
Imperative Statements are translated into thema- to the processor the function to be performed during
chine instructions that appear in the object program. the assembly process. A table of operation codes is
Declarative Statements are translated into data supplied in the section, "Autocoder Operation Codes."
areas, data constants, and address constants used by Operation codes in machine language must never be
the object program. They are also used to define used. (The Compare, Add, and Subtract imperative
symbols (or labels) in the assembly process. operations are exceptions, in that the machine-lan-
Linkage Loader Statements enable the Linkage guage equivalent for each is identical to the corre-
Loader to properly convert the relocatable subpro- sponding mnemonic.)
grams assembled by the Autocoder processor into ab- Blank operation codes are permitted in conjunction
solute format (ready for execution). with the following mnemonics: DC, DCW, DA, and DAV.
Control Statements are directions to the Autocoder These mnemonics are discussed in the subsection en-
processor, which control the performance of specified titled "Declarative Operation Codes."
operations at assembly time. The mnemonic operation codes are listed in Appen-
dix D. In studying this list, the programmer will note
Macro-instructions enable the programmer to ex-
that groups of mnemonic operation codes (for example,
tract, from a library of macro routines, instruction se-
the group of mnemonics for the scan instructions) are
quences tailored (by means of parameters written in
represented in machine language by a one-character
macro-instructions) to meet programmer specifications.
operation code and an operation modifier (d-character)
These instruction sequences are inserted automatically
which defines the precise function the operation is
into the object program. (See the section entitled
to perform. This is true even though the mnemonic
"The Macro System.")
may be as many as five positions long.
Operand
Principal Elements of Autocoder Statements The operand field begins in card column 21. The form
The principal elements of an Autocoder statement are: and content of the various permissible operand ele-
a label, an operation code, and an operand. ments vary according to the operation to be performed.
Basic Concepts and Functions 7
However, the basic elements in the operand field are The three types of relocation factors that can be
the A- and B-addresses, and the d-character (when applied are:
required). An A-address, a B-address, and a d-charac- Upward
ter are separated from each other by single commas Downward
(Figure 1). NO
The formats of these and the other permissible op-
erand elements are discussed in the section "Types Upward Relocation
of Operand Entries." The use of these elements in Upward relocation means that the address in the object
association with specific operation codes is discussed program will normally be incremented. For example,
in the sections "Autocoder Operation Codes," and if the compiled origin of the object program is 00000
"The Macro System." and the relocation factor is 12,000, the program will be
loaded starting at core-storage location 12000. The
relocation factor is added to each load address and to
Relocation each address within the program to which an upward
All object programs produced by the compilers within relocation indicator is assigned by the processor.
the Operating System are in relocatable format. The Of the three relocation types possible, upward re-
aspects of relocation with which the Autocoder user location is the one most frequently applied.
must be familiar are noted here. The reader interested
in a detailed discussion of this subject and the relo- Downward Relocation
cation indicators that can appear in the assembly list- Downward relocation means that the address in the
ing should refer to the publication, IBM 1410/7010 object program will be decremented by a value cal-
Operating System; System Monitor, Form C28-0319. culated by the Linkage Loader. A downward reloca-
Relocation is achieved in three steps: tion indicator is assigned by the processor to those ad-
l. The programmer codes subprograms with or dresses that refer to the COMMON data area.
without regard to their actual location in core storage.
He can, however, specify a starting location for his
NO Relocation
program.
NO relocation means that the address in the object pro-
2. The processor assigns relative addresses to the
program statements and constants, starting at the ad- gram is to be unchanged by the Linkage Loader. A
NO relocation indicator will be assigned by the proc-
dress specified by the programmer, or zero (00000) if
not specified. The processor also indicates to the Link- essor to those addresses whose absolute value is already
age Loader whether these addresses are to be given supplied and must be maintained. For example, the
upward, downward, or NO relocation, as explained addresses of index registers receive NO relocation indi-
below. cators.
3. When the program is loaded, the addresses arc
adjusted by a relocation factor calculated and applied
by the Linkage Loader. (The adjusted addresses main- Definition of COMMON
tain the same relative locations and relationships to COMMON is the formal name, predefined in the proc-
each other as specified in the source program.) This essor's symbol table, of a relocatable work area that
subject is covered in more detail under "ORC - Ori- can be referenced by more than one subprogram. Cer-
gin," in the subsection "Subprogram Control State- tain language conventions must be observed if sep-
ments." arately-assembled subprograms are to achieve com-
Each address within the program is assigned a code patible addressing of shared data fields in COMMON.
by the processor, indicating to the Linkage Loader During the assembly process, references to COMMON
one of three types of relocation. When the Linkage are translated according to an addressing and reloca-
Loader is executed, it calculates and applies to the ad- tion convention designed to make these references
dress the relocation factor called for by the associated suitable for resolution by the Linkage Loader. The
indicator. convention chosen is the assignment of the value 99999
13
line
56
Label
~~rat~121 25 30 35 40
OPERAND
U ~o ~~ 60 65 70
o I 1 : IA ,A, 0 P E.R,A,N.D. L L L.' L L . _ . L.......L .1 ....L.-L-"----'--'---'---'-----'-----'-----'-. LL
I
~-+-'--'---L..J.-'-7-'-.J.......L..-+---'-.....o......JL...L...p...z..........--"-.J..~~.J.....1Jl.IA:IL'-"!.4OlJ.ILlON....
o 2 IA,J,A D,L....I.I.OA~,Q P'-".