C24 3361 6_BOS_Assembler_with_Input_Output_Macros_Jul68 6 BOS Assembler With Input Output Macros Jul68

C24-3361-6_BOS_Assembler_with_Input_Output_Macros_Jul68 C24-3361-6_BOS_Assembler_with_Input_Output_Macros_Jul68

User Manual: C24-3361-6_BOS_Assembler_with_Input_Output_Macros_Jul68

Open the PDF directly: View PDF PDF.
Page Count: 279

DownloadC24-3361-6_BOS_Assembler_with_Input_Output_Macros_Jul68 C24-3361-6 BOS Assembler With Input Output Macros Jul68
Open PDF In BrowserView PDF
File Number S360-2l
Form C24-336l-6

Systems Reference Library

IBM System/3S0
Basic Operating System
Assembler with Input/Output Macros
Specifications
This reference publication describes the assembler
language and the input/output (I/O) macros
supplied by IBM for use in writing programs for 8K
disk-oriented System/360 installations. The
general features of. the assembler language are
described first, followed by a description of each
of three types of assembler language statements:
machine-instruction, assembler-instruction, and
macro-instruction statements. The description of
the macro instructions consists of a description
of each of the IBM-supplied I/O macros.
The reader should be familiar with the
information presented in the· publications:
IBM System/360 Principles of Operation, Form
A22-682l;
IBM System/360 Basic Operating System,
Programmer's Guide, Form C24-3372;
IBM System/360 Basic Operating System and IBM
System/360 Bas~c Programm~ng Support, Macro
Def~n~tion Language, Form C24-3364.
For a list of other associated publications,
refer to the IBM System/360 Bibliography, Form
A22-6822.

BoS

PREFACE

This publication is intended as a guide for
the programmer using,the assembler lanquage
and its features.
It contains .all the
information needed by the programmer to
code an assembler-language program on the
coding form.
The information needed by the
programmer to code user macro definitions
(for inclusion into the macro library) is
presented in the macro-definition language
publication as listed on the cover of this
publication.
The material in this publication is
presented assuming that the reader has had
ex~erience with computer system~ and has

background in the basic programming
concepts and techniques (or has completed
basic courses of instruction in these
areas).
The publication IBM System/360
Pr~n£~Bles of Operation (Form A22-6821)
supplies the necessary background
information about IBM System/360 operations
(particularly storage addressing, data
formats, and machine-instruction formats
and functions).
The publication IBMSystem/360 BasicOperati~~stem,
PrQg£ammer's Guide (Form C24-3372) supplies
the necessary background information about
IBM System/360 programming using Basic
Operating System.

Seventh Edition (July '968)
This is a major revision of, and obsoletes, C24-3361-5, and
Technical Newsletters N24-5314, N24-5335, N24-5341, and
N33-8534.
The changes reflect the availability of BaS
Release 17. The chanqes to the text, an~ small changes to
illustrations, are indicated by a vertical line to the left
of the change; changed or added illustrations are denoted by
t~e symbol • to the left of the caption.
Significant changes or additions to the specifications
contained in this publication are continually being made.
When using this publication in connection with the operation
of IBM equipment, check the latest SRL Newsletter for
revisions or contact the local IBM Branch office.
Requests
for copies of IBM publications should be made to your IBM
representative or to the local IBM br~nch office.
A form has been provided at the back of this publication £or
readers' comments.
If the form has been detached, comments
may be directed to IBM Laboratory, Publications Dept.,
P.O. Box 24, Uithoorn, Netherlands.
~

Copyright International Business Machines Corporation,
1965,1968

INTRODUCTION • • • • • • • • •
Assembler-Language statements
PROGRAMMER AIDS • • • • • • •
IBM Basic Operating system/360
Relationships • • • • • • • • •
Machine Requirements • • • • •

5
5
6
6
7

GENERAL INFORMATICN • • • • • •
Assembler Language Coding Conventions
Assembler-Language Structure.
Terms and Expressions • • • •
Terms
• • • • •
Expressions • • • • • • • •

8
8
11
13
13
17

ADDRESSING
PROGRAM SECTIONING AND
LINKING
• • • • • • • • •
• •
Addressing • • • • • • • • • • •
• •
Addresses -- Explicit and Implied
Base Register Instructions •
• •
Register Usage • • • • • • • •
Programming with the USING
Instruction • • • •
•
Relat~ve Addressing
•• • •
Program sectioning and Linking •
• •
Control Sections • • •
••
First Control Section • • • •
• •
Symbolic Linkages
• •
ENTRY -- Identify Entry-point Symbol •
EXTRN -- Identify External Symbol • •
Machine Instructions • • • • • •
••
Machine-Instructio.n Statements •
Operand Fields and Subfields •
• •
Lengths -- Explicit and Implied • • •
Machine-Instruction Mnemonic Codes.
Machine-Instruction Examples •
• •
Extended Mnemonic Codes • • • •
ASSEMBLER INSTRUCTION STATEMENTS
Symbol Definition Instruction
EQU -- EQUATE SYMBOL • • • • •
Data Definition Instructions • •
DC -- DEFINE CONSTANT
DS -- Define Storage • • • •
CCW -- Define Channel Command Word
Listing Control Instructions • • • •
TITLE
Identify Assembly output
EJECT -- Start New Page
SPACE -- Space Listing • • • •
PRINT -- Print Optional Data •
Program Control Instructions •
ICTL -- Input Format Control •
ISEQ -- Input Sequence Checking
REPRO -- Reproduce Following Card
PUNCH -- Punch a Card • • • • • •
XFR -- Generate a Transfer Card
ORG -- Set Location Counter
LTORG -- Begin Literal Pool
CNOP -- Conditional No Operation •
END -- End Assembly • • • •
MACRO INSTRUCTION STATEMENTS

20.
20
20
20
20
22
23
23
23
24
26
27
27
29
29
29
30
31
31
32

34
• .' 34
34
• • 35
• • 35
44
• • 46
46
46
47
• • 47
• • 47
48
48
49
• • 49
• • 49
• 50
• • 50
• • 50
51
• • 52

Macro Instruction Format •
• • 54
,Assembly of the Macro • • • •
• • 55
Input/Output Control Macros
55
Initialization • • • • • • •
• • 63
Processing Records Consecutively • • • 71
Processing Disk Records by th~ Direct
Access Method • • • • • •
88
Processing Disk Records by the
Indexed Sequential System
96
Macro Instructions to Load or Extend
a Disk File by ISFMS • • • • • • • • • 105
Macro Instructions to Add Records to
a File by ISFMS
• • • •
• .107
Macro Instructions for Random
Retrieval by ISFMS
••••
.108
Macro Instructions for Sequential
Retrieval by ISFMS
• • • • • • • • 109
Processing With STR Devices
• • J 12
Processing Records with Physical IOCS 124
Writing Checkpoint Records • •
• • J30
Completion • • • • • • • • • •
• • 132
File Definition Macros • • • • •
• • 137
Consecutive Processing (DTFSR) • • • • J38
Direct Access Method (DTFDA) •
• • 151
Indexed Sequential System (DTFIS)
• • 158
Processing with STR Devices (DTFSN,
DTFEF) • • • • • • • • • • • • • • • • 165
Binary Synchronous Communication
(DTFBS, DTFRF) • • • • • • • •
• .'66
Physical IOCS (DTFPH)
••••
• • 171
Supervisor-Communication Macros
• • 173
Supervisor-Assembly Macros • • •
• • 182
Macro Instructions to Assemble a
Supervisor • • • • • • • • • •
• • 183
Organization to Assemble a Supervisor 188
Job-Control-Assembly Macros (Not For A
Disk-Resident System)
• • • • • • 190
Assembling the Job Control Program • • 191
Control Cards

• • 192

Assembler Language Subset Relationship .195
APPENDIX A:

CHARACTER CODES--PART

APPENDIX A:

CHARACTER CODES--PART 2 • • 198

• • 197

APPENDIX B: .MACHINE-INSTRUCTION
MNEMONIC OPERATION CODES • • • •

• .203

APPENDIX C:

•• 211

Appendix

D~

ASSEMBLER-INSTRUCTIONS

Machine-Instruction Format .212

Appendix E: Hexadecimal-Decimal Number
Conversion ,Table • • • • • • • •
• .214
Appendix F: Summary of Constants

• .223

APPENDIX G : IOCS EXAMPLE

• .224

53
Contents

3

APPENDIX H: ASSEMBLER LANGUAGES -FEATURES COMPARISON CHART • • • • • • • 230
Appendix. I: Summary of Input/Output
for an Assembly
• • • • ••
. APPENDIX J:
MESSAGES

.234

ASSEMBLER DIAGNOSTIC
• • • 245

APPENDIX K: SUMMARY UF IMPERATIVE
MACRO INSTRUCTIONS • • • • • • • • • • • 252

4

S/360 BOS Assembler vith I/O Macros

APPENDIX L: BLANK, SUBSTITUTE BLANK~
AND INTERMEDIATE LRt REQUIREMENTS

.255

APPENDIX M:BINARY SYNCHRONOUS
Communication • • • • •
• • • 256
Part 3 - Sample Program • • • • • • • • 258
Part 4 - BOS/BSC Support Channel
Programs • • •
• • • 265
CNTRL Macro • • • •
•• • •
.266
Part 5-BOS/BSC TP OP Codes
• • ~ 266

INTRODUCTION

CQmputer programs may be expressed in
machine language, i.e., language directly
interpreted by the computer, or in a
symbolic language, which is much more
meaningful to the programmer. The symbolic
lanquage, however must be translated into
machine languaqe before the computer can
execute the program.
This function is
accomplished by an associated processing
program.
Of the various symbolic programming
languages, assembler languages are closest
to machine language in form and content.
The assembler language discussed in this
manual is a symbolic programming language
for the IBM System/360. It enables the
programmer to use all IBM System/360
machine functions, as if he were coding in
System/360 machine language.
The !~El~£translates or processes
assembler-language programs into machine
language for execution by the computer.
The program written in the assembler
language used as input to the Assembler is
called the sou£ce·pro~~; the
machine-language program produced as output
from the Assembler is called the object
~Qg£g~.
The translation or processing
procedure performed by the Assembler to
produce the object program is called
as§~mbling.
Often, as in this publication,
the object program produced is also
referred to as an assembly.

The System/360 Basic Operating system
Assembler can assemble programs· written in
the Basic Programming Support (8K Card)
assembler language or the Basic Programming
Support (8K Tape) assembler language.
It
can also assemble programs written for the
Assembler of the 7090/7094 Support Package
for the IBM System/360. The System/360
Basic Operating System Assembler requires
the EBCDIC punches for the + I ( ) and =
signs.
Any proqram written in the IBM
System/360 Basic Operating System assembler
language can be assembled by the System/360
Operating System Assembler (provided the
necessary macros are in the Macro library)
and the System/360 Basic Programming
Support Assembler with the following
exceptions:
1.

The XFR assembler instruction is
considered an invalid mnemonic

2.

operation code by System/360 Operatinq
System Assemblers and System/360 Disk
and Tape Operating System Assemblers.
The assignment, size, and ordering of
literal pools may differ among the
assemblers.

ASSEMBLER-LANGUAGE STATEMENTS
Program statements (source statements)
written in assembler language may consist
of:
a name to identify the ·statement; a
symbolic operation code lmnemonic) to
identify the function the statement
represents; and an operand, consistinq of
one Qr·more items called operands, to
designate the data or storage locations
used in the operation, and spac~ for
comments.
Assembler-language programs may consist
of up to four types of statements:
machine-instruction, macro-instruction, and
assembler~instruction, and comments
statements.
ffa~chine-instruction statements are
one-for-one symbolic representations of
System/360 machine instructions.
The
Assembler produces an equivalent machine
instruction in the object program from each
machine-instruction statement in the source
program.

Macro-instruction statements cause the
Assembler to retrieve a specially-coded
symbolic routine from the macro library,
modify the routine according to the
information in the macro instruction, and
insert the modified routine into the source
program for translation into machine
language.
IBM supplies specially-coded
input/butput (I/O) routines as part of the
macro library.
The assembler language
includes a set of I/O macro-instruction
statements through which these routines can
be retrieved and modified to suit
particular needs for input or output.
Also, the user can define his own library
routines, and reference them throuqh
macro-instruction statements he defines
himself.
These routines and statements are
defined according to a special lanquaqe,
the macro-definition lanquaqe, and are
processed by the Assembler in the same
manner as the IBM I/O routines and
macro-instruction statements. The
macro-definition language is presented in
the macro-definition language publication, as listed on the front cover of this
publication.
Introduction

5

The Assembler program, in addition to
its translation function, provides
auxiliary functions that assist the
programmer in checking and documenting
programs, in controlling storage-address
assignment, in program sectioning and
linking, in data and storage-field
"
defin£tion, and in controlling the
Assembler program itself.
Assembler-instruction statements specify
these auxiliary functions to be performed
by the Assembler, and, with a few
exceptions, do not result in the generation
of any machine-language code by the
Assembler.
Predefined mnemonic codes are provided
in the assembler language for all
machine-instruction, assembler-instruction,
and IBM-supplied I/O macro-instruction
statements. Additional extended mnemonics
are provided for the various forms of the
Branch-on-Condition machine instruction.
The assembler language provides for the
symbolic representation of any addresses,
machine components (such as registers), and
actual values needed in source statements.
Also provided is a variety of forms of data
representation.

The assembler program provides auxiliary
functions that assist thE programmer in
checking and documenting programs, in
controlling address assignment, in
segmenting a program, in data and symbol
definition, in generating
macro-instructions, and in controlling the
assembly program itself.
Mnemonic codes,
specifying these functions are provided in
the language.
Va~i~in Data-Representation:
Decimal,
binary, hexadecimal, or character
representation" of machine-language binary
values may be employed by the programmer in
writing source statements. The programmer
selects the representation best suited to
his purpose.
Ba.§~ - Re.9ister" Address Calculat"ion:
As
discussed in the IBM System/36UPrinciples
of_Qperatig,n manual, the system/360
addressing sdheme requires the designation
of a base register (containing a base
address value) and a displacement value in
specifying a storage location.
The
assembler assumes the clerical burden of
calculating storage addresses in these
terms £or the symbolic addresses used by
the programme~.
The programmer retains
control of base register usage and the
values entered therein.

6

S/360 BOS Assembler with I/O Macros

Relocatability: The object programs
produced by the assembler are in a format
enabling relocation from the originally
assigned storage area to any other suitable
area.
Sectioning and Linking: The assembler
language and program provide facilities for
partitioning an assembly into one or more
parts called £onirol sections. control
sections may be added or deleted when
loading the object program. Because
control sections do not have to be loaded
contiguously in storage, a sectioned
program may be loaded and executed even
though a continuous block of storage large
enough to accommodate the entire program
may not be available.
The linking facilities of the assembler
language and program allow symbols to be
defined in one assembly and referred to in
another, thus effecting a link between
separately assembled programs This permits
reference to data and/or transfer of
control between programs A discussion of
sectioning and linking is contained in
Program Sectioning and Linking.
Program Listing.§;
A listing of the source
program statements and the resulting object
program statements is produced by the
assembler for each source program it
assembles.
The programmer can partly
control the form and content of the
listing.Er~or-Indication§:
As a source program is
assembled, it is analyzed for actual or
potential errors in the use of the
assembler language.
Detected errors are
indicated in the program lis~ing.

IBM BASIC OPERATING-SYSTEMLJ60
RELATIONSHIPSThe Assembler program operates as a part of
the 8K disk resident version of the IBM
System/360 Basic Operating System. The
Assembler runs under control of the
Supervisor, which provides the Assembler
with all input/output and interruption
services needed in assembling a source
program.
The object programs produced also
operate as part of the disk resident system
and make use of the functions provided by
the resident control programs.
For special
applications not requiring disk, an
independent Supervisor can" be produced to
control object programs outside of the
Basic Operating System environment.
Such
independent programs do not include disk
storage "processing capability.

to be written on tape.
(See Figure 55 for
7-track tape requirements.)
To perform an assembly, the Assembler
program requires a system/360 with at least
the following features and units:
8,192 bytes of main storage.
Additional
main storage would be used ~y the
Assembler to allocate area for
input/output buffers and Assembler
tables whenever they are needed.
The Assembler requires a 16K system
if the size of the Supervisor exceeds
4,096 bytes of main storage.
Standard instruction set.
Either one multiplexor or one selector
channel.
One IBM 231' Disk Storage Drive. The
following system programs must be
present in the resident disk pack:
IPL Loader, Supervisor, Job Control,
Assembler, and Macro L'ibr ar.y routines
for all macros issued. At least one
disk workarea must be provided.
For
faster processing, an additional disk
drive can be used to split the
Assembler workarea.
See AWORK
lAs§emble£~Qrki!~fards.---

An IBM 2400-series magnetic tape unit
may be used for source input or object
program output, only if sufficient main
storaqe is available. See the Basic
Operating System Programmer's,Guide for
information relating to main storage
requirements when tape is used.
If an IBM 1052 Printer-Keyboard is
available, it may be used for the output of
special diagnostic messages.
To execute object programs, the minimum
machine reguirements are a System/360 with
at least the following features and units.
8,192 bytes of main storage (except BSC
applications, which require 16,384 bytes of
main storage).
Standard instruction set.
Either one multiplexor or one selector
channel.
One IBM 23"

One Card Read-Punch (1442 or 2540 or
2501 and 2520).

One reader IBM 1442, 2501, 2520 (Model
A1 or B1), 2540 or 2400-series tape
unit.* This dsvice may be the same I/O
unit used for punching the output
deck.
One punch IBM 1442, 2520, 2540, or
2400-series tape unit* (if the
Assembler output deck is to be
punched).
This device may be the same
I/O unit used for reading the source
deck.

Data Conversion special feature, if
variable-length records are written on
7-track tape.
Additional units as required by the
object program.
There are two basic approaches to a
minimum resident system:
1•

Problem program (s) that reside on the
disk resident pack with the data to be
processed must have:
a. IPL Loader.
b. Supervisor.
c. Job Control.
d. Appropriate problem program (s) •

2.

Problem program(s) that are loaded by
means of a card reader must have:
a.
Items a-c above.
b.
Disk Linkage Editor.

One printer IBM 1403, '404, 1443, or
2400-series tape unit* (if the program
listing is to be printed).
*At least one IBM 2400-series magnetic
tape unit is required 'for any of the
following conditions:
1.

If the source program is to be read
from tape.

2.

If the output deck from the Assembler
is to be written on tape.

3.

If the program listing is to be
written on tape.

A second tape unit is required if both
the output deck and the program listing are

Disk Storage Drive.

A full description of the disk residence
functions and the operating system
environment is explained in detail in IB~
~stem/360 Basic Operating System
Programmer's Guide, C24~3372.
For the single drive system, these
residence requirements must reside on each
pack.

In trod uc tion

7

GENERAL-INFORMATION

This section presents information about
assembler language coding conventions, and
assembler source statement structure.

statement line and, if needed, columns
16~71 of a single continuation line.

ASSEMBLER LANGUAGE-COOING-CONVENTIONS·

Cogtinuation-Lines: When it is necessary
to ~ontinue a .statemeat-on another line the
following rules apply.
Note that only one
continuation line is permitted per
statement.

This subsection discusses the general
coding conventions associated with use of
the assembler language.

A source program is a sequence of source
statements that are punched into cards.
These statements may be written on the
standard coding form, X28-6509 (Figure 1),
provided by IBM.
One line of coding on the
form is punched into one card.
The
vertical columns on the form correspond to
card columns.
Space is provided at the top of the form
for program identification. Instructions
to the keypunch operator can also be given;
any character code that ~oes not have a
corresponding printer graphic can be
assigned any special graphic to identify
the code to the keypunch operator, who can
then punch the corresponding card punch
code wherever he encounters the special
graphic.
(See ~haracter-Set for the
presentation of the valid character codes
that can be used in a source program.)
Neither the program information (Program,
Programmer, Date, etc.)
nor the
instructions to the keypunch operator are
punched into a card; they are for the
user's own use.
The body of the form (Figure 1) is
composed of two fields:
the statement
field, columns 1-71, and the
identification-sequence field, columns
73-80.
The identification-sequence field
is not part of a statement and is discussed
following the subsection Statement-Format.
The entries (i.e., coding) composing a
statement occupy columns 1-71 of a

8

S/360 BOS Assembler with I/O Macros

1.

Enter any nonblank character in column
72 of the statement line. This
character must not be part of the
statement coding. For a positional
macro, there should be no blanks in the
operand to the left of column 72.

2.

Continue the statement on the next
line, starting in column 16. All
columns to the left of column 16 wili
be ignored. .

Statement BoundariesSource statements are normally contained in
columns 1--71 of statement lines and
columns 16--71 of any continuation lines.
Therefore, columns 1, 71, and 16 are
referred to as the "begin," "end," and
"continue" columns, respectively This
convention may be altered by the Input
Format Control (ICTL) assembler instruction
discussed later in this publication The
continuation character, if used, always
immediately follows the "end" column.
Statement Format
Statements may consist of one to four
entries in the statement field.
They are,
from left to right:
a name entry, an
operation entry, an operand entry, and a
comments entry. These entries must be
separated by one or more blanks, and must
be written in the order stated.
The coding form (Figure 1) is ruled to
provide an eight-character name field, a
five-character operation field, and a
56-character operand and/or comments field.

I-%j
~.

l.Q
~

IBM Systeml36D Assembler Coding Form

IBM

Ii
(!)

.

.-

....... L-.u.s.A.

I

PROGRAM

I

PROGRAMMER

STATEMENT

(j

~.

O~ratiotl

Na ...

0

8

1

p..,
t

i

i

l.Q

I

I

!

! I
I
I

0
Ii
!3

I

I

II

I

I

I

I
I

II

I

II

I I I

(!)
(!)

Ii
Pl
I-'

H

::s

HI

o

Ii
!3
Pl

c+

~.

o

::s

I

I

I

I

I I
i I I
I I I

I

I I
II
II

I

I

!

I :
! I
I

i

!

I

I

I

;

I

I I:

.,

i
1

1

I

I II
II

I

I

II

!

i I

I

I

!

III
IIII
I
I I I

I

! ! I

I

I

I

SeqlA:nc.

!

I

II

!

I

!

I

I

:I II 'I I

I i

II
f

III

I

I I

I

I

!

! I I
iii

I
!

III

!

Ii

II
I i

II

I

III
II
!

I

I

I
i

I I

I

I

j

I
i

I

I

!

III

I

I

I

I
I

I

II
I I
II

I

I

I

I
I

I

I

I

I

I

I
I

I

I

I

I

I
I

I

I
I

II
I
I
I I

I

I

I

I

t

!

,

I

I
I

I

II
I!
I
II
I I

I

I
I

I

!

!

I

II I

I

I,

I
I

[

i

I

!

I

I

!

f

I

,

;

I

I

i

I

I

I

I

! i
I !

, I

i

:

I

I

I

i

I

I

:

I!

I
I

I

I

:

I

I

,I

!

!

•

i

I

I

i

!

I

I

!I I I I
IIII I

I

i

:

I I

!

!

I
I
I

I

I

i
I

I
I
I II
III I
I

I

I

I

I
I

I
I

I

!

I

80

73

I
I

I

I

I

!

I
I

!
I

I I
I
II
I I I II i l l i

I

71

I

I
I
I

I

65

I
I

!I iI

iii
'I I
i

I

60

Ii I

I

I

[ I '

I

II',

II

55

I :

'

I I

I
I II
I
I

I i,

I!

I

I

I! II

I

I

i I

IIII

I I

I

Gl

I

:

II

I Ii

::s

I

i
I

I

lit I

I

I

I,

I

I
I

I I I

1

i

I

CARD ELECTRO NUMBER

II:I II II III I
I
i
I !
I
I I ' I
II
I I ! I I 1'1 I : I i I I I I I
I I
i :
I
I
III
I : i
III I
I I i I I i! I i ! II
I I
II
I
I:
I
I
I
I I I i I I I
I
II
I
!
I
I I i
!
I
I I I II I I i I I I ! I i I I I i I i I I I I I I I I I II I
I
I
I ! I
I I J I I I I I i Ii: i I I i I i I I I I I'
II I

I

I

I
I

I

I
I

I

!

I

I

I

I

i

I

I

I

!

i

III

I

i

!

i

I

I I

I

I

I

I

i

I

I

I I

III
I II I I

I

I

!

I I

I
II II

I

I

I

III

I I

I I

I !

~5

30

!

I

i

!

I

I

I

I

I

I

I

I

II

I

I

I

II
III

II

i
I II I
I

II

I

I

I

Comments

?5

20

16

II

I

II

I
I

I

I

I

I-%j

1~

L

OF

PAGE

klentificotion'"

Operand

10

I

I J

DATE

I

I

I

I

III :I
i

I'
i

I

I

I

II

I

II

I I II

I

I

I
I

I
I

II

I

I

i

I

II
i

I

I
I

I

II
I

I

! I

III

I !

I

I

I: I I I I I I I
II III
I
I
I I I I
I ! I
I I ! I i
I:I
I II I I I I I I I I i I
!

I

I

!

I

I

I
I
II I
I II II
I I III
I

I

I
I

!
I

II
I

I

I I

I

j

II I
i ! I II I
iii I I
III
IIi I I
II
I
I III
I ! iii
I I ! II
I I I II
I

I
I
I
I
I

!

If desired, the programm~r may disregard
these boundaries and write the name,
operation, operand, and comment entries in
other positions, subject to the followinq
rules.
1.

The entries must not extend beyond
statement boundaries (either the
conventional boundaries or as
designated by the programmer via the
ICTL instruction).

2.

The entries must be in proper
sequence, as stated above.

3.

The entries must be separated by one
or more blanks.

4.

If used, a name entry must be written
starting in the begin column.

5.

The name and operation entries must be
completed in the first line of the
statement, including at least one
blank following the operation entry.

A description of the name, operation,
operand, and comments entries follows:
Name Entries: The name entry is a symbol
created-by the proqrammer to identify a
statement.
A name entry is optional. The
symbol must consist of eight characters or
less, and be entered with the first
character appearing in the begin column.
If the begin column is blank, the assembler
program assumes no name has been entered.
No blanks may appear within the symbol.
QE~£ati2n-Entries:

The operation entry is
the mnemonic operation code specifying the
machine operation or assembler functions
desired.
An operation entry is mandatory
and must appear in the first statement
line, starting at least one position to the
right of the begin column.
Valid mnemonic
operation codes for machine and assembler
operations are contained in Appendixes B
and C of this publication. Valid operation
codes consist of five characters or less.
No blanks may appear within the operation
entry.

QE~~n~~ntries:

Operand entries are the
coding that identifies and describes data
to be acted upon by the instruction, by
indicating such things as storage
locations, masks, storaqe-area lenqths, or
types of data.
Depending on the needs of the
instruction, one or more operands may be
written. Operands are required for all
machine instructions.
Operands must be separated by commas and
no blanks must intervene between operands
and the commas that separate them.
'0

S/360 BOS Assembler with I/O Macros

Symbols can appear in the operand field
of a statement. Symbols that appear in the
operand field must be defined.
A symbol is
considered to be defined when it appears in
the name field of a statement.
The operands may not contain embedded
blanks except as follows:
If character representation is
used to specify a constant, a
literal, or immediate data in an
operand, the character, strinq may
contain blanks, e.g., C'AB Dt.
comments Entries: Comments are descriptive
items of information about the proqram that
are to be inserted in the proqram listinq.
All valid characters (see ~h~E~cteE Se1-in
this section), including blanks may be used
in writing a comment. The entry cannot
extend beyond the end column (normally
column 71), and a blank must separate it
from the operand.
An entire line may be used for a comment
by placing an asterisk in the begin column.
Extensive comments entries may be written
by using a series of lines with an asterisk
in the begin column of each line or by
using the aforementioned continuation line.
In statements where an optional operand
entry is omi tted_ but a comments entry is
desired, the absence of the operand entry
must be indicated by a comma preceded and
followed by one or more blanks, as follows:
r------~I'

IName

--------~I----------------------__,

10peration 10perand

II+IL-

1 END

1

~

I
1

COMMENT
1
_ _ _ _ _ _ _ _J

Statement Example:
The following example
illustrates the use of name, operation,
operand, and comments entries.
A compare
instruction has beeD named by the symbol
COMP; the operation entry (CR) is the'
mnemonic operation code for a
register-to-register compare operation, and
the two operands (5,6) designate the two
general reqisters whose contents are to be
compared. The comm€nts entry reminds the
programmer that he is comparinq "new sum"
to "old" with this instruction.
I

I

i

IName

IOperation

I Operand

~I-----rl-----------+---

I

I
~

ICOMP
ICR__._ _ _ _ _ _ _- L
15,6
NEW SUM TO OLD
I
L -____
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _J
~~

The· identification-sequence field of the
coding form (columns 73-80) is used to
enter program identification and/or
statement sequence characters.
The entry
is optional.
If the field, or a portion of
it, is used fo~ program identification, the
identification is punched by the user in
the statement cards, and reproduced by the
Assembler in the printed listing of the
source program.
To aid in keeping source statements in
order, the programmer may code an ascending
sequence of characters in this field or a
portion of it.
These characters are
punched into their respective cards, and,
during assembly, the progra~mer may request
the assembler to verify this sequence by
the Input Sequence Checking (ISEQ)
assembler instruction, which is discussed
under PrQqra~fQ~i~Q!_InstrY£iioQ§.

The entries in a statement must always be
separated by at least one blank and must be
in the following order: name, operation,
operand(s), comment.
Every statement, with the exception of
the comments statement, requires an
operation entry.
Name and comment entries
are optional. Operand entries are required
for all machine instructions and most
assembler instructions.
The name and operation entries must be
completed in the first statement line,
including at least one blank following the
operation entry.

Assembler-Language statements may be
written using the following letters,
numeric digits, and special characters:
Letters:

29 characters are classified
as letters. These include
the characters w, i, and $ as
well as the alphabetic
characters A through Z. The
three additional characters
are included so that the
category can accommodate
certain non-English
languages.

Numeric Digits: 0 through 9
Special Characters:
& blank

+ -

,

* () •/

These letters, digits, and special
characters are only 51 of the set of 256
code combinations defined as the Extended
Binary Coded Decimal Interchange Code
(EBCDIC).
Each of the 256 codes (including
the 5' characters above) has a unique card
punch code.
Most of the terms used in
Assembler-Language statements are expressed
by the letters, digits, and special
characters shown above.
However, such
Assembler- language features as character
self-defining terms and character constants
permit the use of any of the 256 card
codes. ~dix! shows the various forms
of EBCDIC codes.

The basic structure of the language can be
stated as follows.
A source statement is composed of:

The name and operation entries must not
contain blanks. Operand entries must not
have a blank· preceding or following the
commas that separate them.

• A name entry (optional).
• An operation entry (mandatory).
• An operand entry (usually required).

A name entry must always start in the
"begin" column.

A

nam~

entry is:

• A symbol.
If the column after the end column is
blank, the next line must start a new
statement.
If the column after the end
column is not blank, the following line
will be treated as a continuation line.
All entries must be contained wi~hin the
designated begin, end, and continue column
boundaries.

An operation entry is:
• A mnemonic operation code repre~enting
a machine-, assembler-, or
macro-instruction.
An operand entry is:
• One or more operands composed of one or
more expressions, which, in turn, are
General Information

"

composed of a term or an arithmetic
combination of terms.
Operands of machine instructions
generally represent such things as storage
locations, general registers, immediate
data, or constant values. Operands of
assembler instructions provide the
information needed by the assembler program
in order to perform the designated
operation.
Figure 2 depicts this structure. Terms
shown in Figure 2 are classed as absolute
or relocatable. Terms are absolute or

Name

Operation

I

Mnemonic Operation Code

I

A Symbol

~

machine instruction Op-code
assembler instruction Op-code
macro instruction Op-code

relocatable due to the effect of proqram
relocation upon them. Program relocation
is the loading of the object program into
storaqe locations other than thos~
originally assigned by the assembler
program.
A term is absolute if its value
does not change upon relocation.
A term is
relocatable if its value chanqes by n-when
the program is relocated n-bytes away from
its assembled location.
The following subsection, Terms-and
Ex££ess!Qn§, discusses these items as
outlined in Fiqure 2.

Operand, ••• ,Operand, •••

Expression
Term
Symbol (either AT or RT), e.g., BETAl
Self-defining term (AT)
decimal, e.g., 91
hexadecimal, e.g., X'5B'
binary, e.g., B'01011011'
character, e.g., C'$'
Location Counter reference (RT), e.g., *
Literal (RT), e.g., = F'91'
Symbol length attribute reference
(AT), e.g. L'BETAl
Arithmetic combination of terms

±
AT: AT, e.g., L'BETAl * 10

±
LEGEND:

AT
RT

+

/
*

Figure 2.

12

absol ute term
relocatable term
addition
subtraction
division
multiplication (or the
Location Counter reference,
depending on the context)

±

AT: AT : AT, e.g., 5*X'5B'-1
RT ± AT, e.g., BETA 1+10

±
RT ± AT: AT, e. g ., *+ 10/2
Expression (Expression)
Expression (Expression, Expression)

Assembler Language structure--Machine and Assembler Instructions

S/360 Bas Assembler with I/O Macros

TERMS AND EXPRESSIONS

256B

(first character is not
alphabetic)

RECORDAREA2

(more than eight characters)

TERMS
All terms represent a value. This value
may be assigned by the assembler program
(symbols, symbol length attribute location
counter reference, literals) or may be
inherent in the term itself ~elf-defining
terms) •
An arithmetic. combination of terms is
reduced to a single value by the assembler
program.
The following material discusses each
type of term and the rules for its use.

(contains a special character
-

IN AREA

*)

(con tains a blank)

No£g: Any of several different
combinations of characters can be installed
in a printer. If the characters $, I,. and
Q) are' not included, either a blank space
will occur or a different character will be
printed when the code for one of these
characters is sensed. This varies with the
print arrangement that is used.
DEllNIM~YMBOLS:

A symbol is a character or combination of
characters used to represent addresses or
arbitrary values.
Symbols, through theii use as names and
in operands, provide the prog~amme~ with an
efficient way to name arid reference a
program element.
A symbol, created by the
programmer for use as a riam~ entry and in
an operand, must conform to these rules:
1.

The symbol must not consist of more
than eight characters. The first
character must be a letter. The other
characters may 'be letters, digits, or a
combination of the two.

2.

No special characters may be included
in a symbol.

3.

No blanks are allowed in a symbol.

4.

Symbols used by laCS begin with the
letter I. Therefore,. user symbols in
the problem program should·not begin
with.the letter I.
Also, a symbol or
the first portion of a symbol (up to
severi characters) in the problem
program should not be the same as the
file name in a DTF header entry, except
when referring to that file in an laCS
macro instruction.

5.

If a Supervisor is being assembled with
a problem program, user symbols shoul~
nQ..:!: start with SYS because symbols used
by the Supervisor start with SYS.
The following are valid symbols:

READER
A23456
X4F2

r.OOP2

$~3

N

Q)PRICE
itB'

S4

The following symbols are invalid, for
the reasons noted:

The assembler program
assigns a~value to each symbol appearing·as
a name entry in a source statement. The
value assigned to symbols naming storage
areas, instructions, constants, and control
sections represents the address of the
leftmost byte 01 the storage field
containing the named item~
Since the
addresses. of these items may change upon
program relocation, the symbols naming them
are considered relocatable terms.
Symbols us~d as name entries in the
Equate Symbol (EQO) assembler instruction
are assigned the value designated in the
operand entry of the instruction.
Since
the operand entry may represent a
relocatable value or an absolute (i.e.,
nonchanging) value, the symbol is
considered a relocatable term or an
absolute term depending upon the value to
which it is equated.
The value of a symbol may not be
negative and may not exceed 224-1.
A symbol is said to be defined when i~
appears as the name of a source statement.
(A special case of symbol definition is
discussed in proqram-Sectioning,and
Linking.)
.
.
Symbol definition also involves the
assignment of a lengthatt~ibute-to the
symbol~
(The assembler program maintains
an internal table -- the symbol table -- in
which the values and attribrites of symbols
are kept.
When the assembler program
encounters a symbol in an operand, it
refers to the table for the values
associated with the symbol.)
The length
attribute of a symbol is the size, in
bytes, of the storage field whose address
is represented by the symbol. For example,
a symbol naming an instruction that
occupies four bytes of storage has a length
attribute of four.
General Information

13

PR£;Yl0USLY DEF1NED S!l1BOLS:
Some
instructions require that a symbol
appearing in the operand entry be
previously defined.
This simply means that
the symbol, before it is used in an
operand, must have appeared as a name entry
in a prior statement.
GEE£;R!1-RE~1RI~TIONS_QE-~YMB01~:
A symbol
may be defined only once in an assembly.
That is, each symbol used as the name of a
statement must be unique to that assembly.
However, a symbol may be used in the name
field more than once as a control section
name (i.e., defined in the START, CSECT, or
DSECT assembler statements described in
Ad.Q.~si..lliI-==-.R.f.Qgram Sectioning and
Lig~igg) because the coding of a control
section may be suspended and then resumed
at any subseque~t point.
The CSECT or
DSECT statement that resumes the section
must be named by the same symbol that
initially named the section; thus, the
symbol that names the section must be
repeated.
Such usage is not considered to
be duplication of a symbol definition.

Sel!=De!inin~!,grm.§

A self-defining term is one whose value is
inherent in the term.
It is not assigned a
value· by the assembler program.
For
example, the decimal self-defining term -15 -- represents a value of fifteen.
There are four types of self-defining
terms:
decimal, hexadecimal, binary, and
character.
Use of these terms is spoken of
as decimal, hexadecimal, binary, or
character representatitin of the machine
language binary value or bit configuration
they represent.
Self-defining terms are classed as
absolute terms since the value they
represent does not change upon program
reloca tion.
USINQ_SE1F-DEllNING 1£;RMS: Self-defining
terms are the means of specifying machine
values or bit configurations without
equating the value to a symbol and using
the symbol.
Self-defining terms may be used to
specify such program elements as immediate
data, masks, regi~ters, addresses, and
address increments.
The type of term
selected (decimal, hexadecimal, binary, or
character) will depend on what is being
specified.
The use of a self-defining term is quite
distinct from the use of data constants or
literals.
When a self-defini.ng ,term is
used in a machine-instruction statement,
its value is assembled into the
instruction.
When a data constant or
14

S/360 BOS Assembler with I/O Macros

literal is specified in the operand of an
instiuction, its address is assembled into
the instruction ------DecimaUelf-Definin~rm:
A decimal term
is simply an unsigned decimal number
written as a sequence of decimal digits.
High-order zeros may be used (e.g.,007).
Limitations on the value of the term depend
on its use.
FOr example, a decimal term
that designates a general fegister should
have a value between 0 and '5 inclusively;
one that represents an address should not
exceed the size of storage. In any case, a
decimal term may not consist of more than
eight digits, or exceed 16,777,215(2 24 -1).
A decimal term is assembled as its binary
equivalent Some examples of decimal
self-defining terms are:
8, 147, 4092,
0002' •

Hexadecimal Self-Definin~Term:
A
hexadecimal self-defining term is an
unsigned hexadecimal number written as a
sequence of hexadecimal digits.
The digits
must be enclosed in single quotation marks
and preceded by the letter X; for example,
X'C49' •
Each hexadecimal digit ~s assembled as
its four-bit binary equivalent.
Thus, a
hexadecimal term used to represent an
eight-bit mask would consist of two
hexadecimal digits.
The maximum value of a
hexadecimal term is X'FFFFFF'.
The hexadecimal digits and their bit
patterns are as follows:
0- 0000
1- 0001
2- 0010
3- 00"

4567-

0100
0'0'
0110
0" ~

89AB-

1000
100.
1010
1011

C- 1100
D- 1'0'
E- 1110
F- 1"1

A table for converting from hexadecimal
representation to decimal representation is
provided in Appendix E.
Bi.riarL.~,gl!-Definig.sL.1erm:
A binary
self-defining term is written as an
unsigned sequence of 1s and ~s enclosed in
single quotation marks and preceded by the
letter B, as follows:
B'10001'01'.
This
term would appear in storage as shown,
occupying one byte.
A binary term may have
up to 24 bits represented.

Binary representation is used primarily
in designating bit patterns of masks or in
logical operations.
The following example illustrates a
binary term used as a mask in a Test Under
Mask (TM) instruction.
The contents of
GAMMA are to be tested, bit by bit, against
the pattern of bits represented by the
binary term.

r---~

Ii

IName

IOperand

IOperaticn

i----f--.----+_
IALPHA
ITM
L-_____

IGAMMA,B'.O'O',O,'
_ _ __

~

~I

Ch~~acter self=Definin~~:

A character
self-defining term consists of one to three
characters enclosed by single quotation
marks.
It may be preceded by the letter C
(this is not mandatory). All letters,
decimal digits, and special characters may
be used in a character term.
In addition,
any of the 2~6 punch combinations (shown in
!EE~ndix~) may be designated in a
character self-defining term. Examples of
character self-defining terms are as
follows (the letter C preceding the
quotation mark is optional):

C'I'

C'ABC'

C' ,
C'

(blank)

'3'

Because of the use of quotes in the
assembler language and ampersands in the
macro language as syntactic characters, the
following rule must be observed when using
these characters in a character term.
For each single quotation mark or
ampersand d,esired in a character term, two
singl~ quotation marks or ampersands must
be written.
For example, the character
value A'# would be written as 'A"#'. while
a single quotation mark followed by a blank'
and ~nother single guotation mark would be
written as ' " " ' .
Each character in the character se~uence
is assembled as its eight-bit code
equivalent (see A~ndix-A).
The tvo
quotation marks or ampersands that must be
used to represent a single quotation mark
or ampersand within the character sequence
are assembled as a single. ~uotation mark or
am Ifersan d.
Location·Counter Reference
The programmer may refer to· the -current·
value of the Location Counter at any place
in a program, by using an asterisk in an
operand. The asterisk represents the
location of the first byte of currently
available storage (i.e., after;any required
bdundary adjustmen~.
Using an asterisk in
a machine-instruction statement is the same
as pla~ing a symbol .in the name field of
the statement and then using that symbol as
an operand of the statement Because a
Location Counter is maintained for each
control section, a Location Counter.
reference designates the Location Counter
for the section in which the.reference
appears.
A reference to the Location Counter may
be made in a literal address constant

(i.e., the asterisk may be used in an
address constant specified in literal
form).
The address of the instruction
containing the literal is used for the
value of the Loc~tion Counter.
A Location
Counter reference may not be used in a
statement which requires the use of a
predefined symbol, with the exception of
the EQU and ORG assembler instructions.
The·Location·Counter: A Location Counter
is used to assign storage addresses to
program statements.
It is the assembler
program's equivalent of the instruction
counter in the computer.
As each machine
instruction or data area is assembled, the
Location counter is first adjusted to the
proper boundary for the item, if adjustment
is necessary, and then incremented by the
length of the assembled item. Thus, it
always points to the next available
location.
If the statement is named by a
symbol, the value attribute of the symbol
is the value of the Location Counter after
boundary adjustment, but before addition of
the length.
The assembler maintains a Location
Counter starting at a double-word boundary
for each·control section of the program and
manipulates each Location Counter
independently as previously described.
Source statements for each section are
assigned addresses from the Location
Counter for that section The Location
Counter for each successively declared
control section assigns locations. in
consecutively higher areas of storage.
Thus, if a program has multiple control
sections~ all statements identified as
h~longing to the first control section will
be assigned from the Location Counter for
secti6n " the statements for the second
control section will be·assigned from the
Location Counter for section 2, etc.
This
procedure is followed whether the
statements from different control sections
are interspersed or written in control
section sequence.
The Location Counter setting can be
controlled by using the START and ORG
assembler instructions, which are described
in Addressinq·--·Proqram-sectioninq-and.
Linking. The counter affected by either of
these assembler instructions is the counter
for the control section in which they
appear.
Maximum value for the Location
Counter is 2 24 -1.

A literal term is one of three basic ways
to introduce data into a program. It is
simply a constant preceded by an equal sign
(=) •

General Information

15

A literal represents data rather than a
reference to data.
The appearance of a
literal in a source stat~ment directs the
assembler program to assemble the value
specified by the literal, store this value
in a "lite'ral Fool", and place the address
of the storage field containing the value
in the oFerand field of the assembled
source statement.

Literal Format: The assembler requires a
description of the type of literal beinq
specified as well as the literal itself.
This descriptive information assists the
assembler in assembling the literal
correctly The descriptive portion of the
literal must indicate the format in which
the constant is to be assembled.
It may
also specify the length the constant is to
occupy.

Literals provide a means of enterinq
constants (such as numbers for calculation
addresses, indexinq factors, or words' or
phrases for printinq out a message) into a
program by specifying the constant in the
operand of the instruction in which it is
used.
This is in contrast to using the DC
assembler instruction to enter the data
into the program, and then using the name
of the DC instruction in the oFerand.
Only
one literal is allowed in a
machine-instruction statement.

The method of describinq and ~pecifyinq
a constant as a literal is nearly identical
to the method of specifying it in the
operand of a DC assembler instruction. The
major difference is that the literal must
start with an equal sign (=), which
indicates to the assembler that a literal
follows.
The reader is referred to the
discussion of the DC assembler instruction
operand format !Qdr~ssin~-- Program
Se.ftioni!!~an~1!nki.!!g·for the means of
specifying a literal. All types of address
constants, except S-type address constants,
can be expressed as literals. Some
ex~mples of literals are:

A literal term may not be combined with
any other terms.
A literal may not be changed in storaqe.
That is, it may not be used as the
receiving field of an instruction that
modifies storage.
A literal may not be specified in a
constant (see Q~=-Dei~ne C~stan1) or any
other Assembler instruction.
The instruction coded below shows one
use of a literal.
r----T

I

IName

IOperand

10peration

,

J-----+-------+_

IGAMMA LIL-_________L
110,=F
L-______
-

f

274'

I

,

I

The statement GAMMA is a load
instruction usirig a literal as the second
operand.
When assembled, the second
operand cf the instruction will be the
address at which the binary value
represented by F'274' is stored.
In general, literals may be used
wherever a storaqe address is permitted as
an operand. They may not, however, be used
in any assembler instruction that requires
the use cf a previously defined symbol.
Literals are considered relocatable
because the address of the literal rather
than the literal itself, will be assembled
in the statement that employs a literal.
The assembler generates the literals,
collects them, and places them in a
specific area of storage as explained in
the subsection The Literal Pool.
A literal
is not to be confUsed-wit~the-immediate
data in an SI instruction.
Immediate data
i~ assemtled into the instruction.
16

S/360 BOS Assembler with I/O Macros

=A (BETA)
=F'1234'
=C'ABC'
=CL7'PAGE'

address constant literal.
a fixed-point number with
a lenqth of four bytes.
a character literal.
an explicit lenqth literal.

The Literal·Pool:
The literals processed
by the assembler are collected and placed
in a special area called the literal pool,
and the location of the literal, rather
than the literal itself, is assembled in
the statement employing a literal. The
positioning of the literal pool may be
controlled by the programmer, if he so
desires. Unless otherwise specified, the
literal pool is placed at the end of the
first control section.
The programmer may also specify that
multiple literal pools be created.
However, the sequence in which literals are
ordered within the pool is controlled by
the assembler.
Further information on
positioning the literal pool(s) is under
LTQRG=Begin Literal Pogl.

The lenqth attribute of a symbol may be
used as a term. Reference to the attribute
is made by coding L' followed by the
symbol, as in:
L'BETA
The length attribute of BETA will be
sUbstituted for the term.
The followinq
example illustrates the use of L'symbol in
movinq a character constant into either the
high-order or low-order end of a storaqe
field.

For ease in following the example, the
length attributes ofA1 and B2 are
mentioned.
However, keep in mind that the
L'symbol term makes coding such as this
possible in situations where lengths are
unknown.
r--

i

IName

IOperation

I-IA1

I

IB2
IHIORD
ILOORD

IDS
IDC
I MVC
IMVC

i

IOperand

-+

ICL8
ICL2'AB'
I A1 (L 'B2) , B2
I
IA1+L'A.-L'B2(L'B2),B21

combination with another term, it first
reduces the combination of terms inside the
parentheses to a single value.
This value
then is used in.reducing the rest of the
expression to aiother sinqle value.
certain fixed rules determine the ways
in which terms can be combined.
These
rules are discussed under Absolute and
Relocatable-Expressions.
In addition to
these, the following general rules can be
stated for coding any expressions:
1.

L-

A1 names a storage field eight bytes in
length and is assigned a length attribute
of eight. B2 names a character constant
two bytes in length and is assigned a
lenqth attribute of two.
The statement
named HIORD moves the contents of B2 into
the leftmost two bytes of A1. The term
t'B2 in parentheses provides the length
specification required by the instruction.
When the·instruction is assembled, the
length is placed in the proper field of the
machine instruction.
The statement named LOORD moves the
contents of B2 into the right-most two
bytes of A1. The combination of terms
A1+L'A'-L'B2 results in the addition of the
length of A1 to the beginning address of
A1, and the subtraction of the length of B2
from this value.
The result is the address
of the seventh byte in field A1. The
constant represented by B2 is moved into A1
starting at this address. L'B2 in
parentheses provides length specification
as in HIORD.

An expression may not start with an
arithmetic operator (+-/*).
Therefore,
the. expression -A+BETA is invalid.
However, the expression O-A+BETA is
valid~

2.

An expression may not contain two terms
or two operators in succession.

3.

An expressi~n may not consist of more
than 3 terms.

4.

An expression may not have mo~e than
one pair of parentheses.

5.

A multiterm expression may not contain
a literal.

The following are examples of valid
expressions:
AREA1+X'2D'
*+32
N-25
FIELD
FIELD+332

(EXIT-ENTRY}/8
=F'1234'
L'BETA*10
B'101'
C'ABC'

29
L'FIELD
TEN/TWO
LAMBDA+GAMMA

Evaluation of Expressions
EXPRES SI ONS
The preceding sUbsection dealt with the
various types of terms that. can be used,
either sinqly or in combination, to form
operand entries.. This subsection now deals
with the more general category of
expressions, where an expression is an
operand entry consisting of either a single
term or an arithmetic combination of terms.

A single term expression, e.g., 29, BETA,
*, L'SYMBOL, takes on the value of the term
involved.
A multiterm expression, e.q.,
BETA+10,ENTRY-EXIT, 10+A/B, is reduced to a
single value, as follows:
1.

Each term is given its value.

2.

Expressions within parentheses are
evaluated first.

3.

Arithmetic operations are performed
left to right.
Multiplication and
division are done before addition and
subtraction, e.g., A+B*C is evaluated
as A+(B*C), not (A+B}*C. The compu~ed
result is the value of the expression.

4.

Division yields an integer result; any
fractional portion of the result will
be dropped. For example, the
expression 1/2*10 equals zero, but the
expression 10*1/2 equals five.

Up to three terms can be combined with
the following arithmetic operators:
+

/*

addition, e.g., ALPHA+2
subtraction, e.g., ALPHA-BETA
multiplication, e.q., 5*L'DATA
division, e.g., (ALPHA-BETA)/2

Two of the terms within a three term
expression can be grouped within
parentheses to indicate to the Assembler
the order in which they are to be
evaluated.
When the Assembler program
encounters terms in parentheses in

General Information

17

5.

Division by zero is valid and yields a
zero result.

Final values of expressicns representing
storage addresses are never greater than
2 24 -1, however intermediate results may
have a maximum value of 2 31 -1.

The following examples illustrate
absolute expressions.
A is an absdlute
term; X and Yare relocatable terms from
the same control section.
A-Y+X
A

Absolute and Relocatable Expressions
An expression is called absolute if its
value is unaffected by program relocation
An eXFression is called relocatable if
its value changes upon program relocation
The two types of expressions, absolute
and relocatable, take on these
characteristics from the term or terms
composing them.
The following material
discusses this relationship.
AB~QLU1~

EXR]~~SION:
An absolute
expression may be an absolute term or any
arithmetic combination of absolute terms.
An absolute term may be an absolute symbol,
any of the self-defining terms, or the
length attribute reference. As indicated
in Figure 2, all arithmetic operations are
permitted between absolute terms.

An absolute expression may contain two
relocatable terms (RT) -- alone or in
combination with an absolute term (AT) -under the following conditions:
1.

2.

The relocatable terms must be paired,
that is, they must appear in the same
control section in this assembly (see
Rr0.9.!:am2.§ctio.n~!!.L.~nd_Li.nki.lliI) and
have opposite signs •. The paired terms
do not have to be contiguous, e.g.,
RT+AT-RT.
No relocatahle term may enter into a
multiply or divide operation.
Thus,
RT-RT*10 is invalid However,
(RT-RT) *10 is valid.

The pairing of relocatable terms cancels
the effect of relocation.
Therefore the
value represented by the paired terms
remains constant, regardless of program
relocation For example, in the absolute
expression A-Y+X, A is an absolute term,
and X and Y are:relocatable terms from the
same control section. If ~ equals 50, Y
equals 25, and X equals 10, the value of
the expression would be 35. If X and Yare
relocated by a factor of 100 their values
would then be 125 and 1'0.
However, the
expression would still evaluate as 35
(50-125+ 110=35) .•
An absolute expression reduces to a
single absolute value.

18

S/360 BOS Assembler with I/O Macros

A*A
X-Y+A
*-Y
(a reference to the Location Counter
must be paired with another
relocatable term from the same control
section).
RELOCATABLE EXPRESSIONS:
A relocatable
expression is one whose value would change
by n if the program in which it appears is
relocated n bytes away from its originally
assigned area of storage.
A relocatable
expression must not have a v~lue below the
starting address of the control section,
except in a USING, CCW, or A- and Y-type
address constant.
A relocatable expression may be a
relocatable term.
A relocatable ~xpression
may contain relocatable terms -- alone or
in combination with absolute terms -- under
the followinq conditions:
1.

There must be an odd-number-of
relocatable terms.

2.

If a relocatable expression contains
three relocatable terms, two of them
must be paired.
Pairing is described
in !bsol.!!.t.§ Expressio!!.

3.

The unpaired term must not be directly
preceded by a minus sign.

4.

No relocatable term may enter into a
multiply or divide operation.

A relocatable expression reduces to a
single relocatable value. This value is
the value of the oad relocatable term,
adjusted by the values represented by the
absolute terms and/or paired relocatable
terms associated with it.
For example, in the expression W-X+W, W
and X are -relocatable terms from the same
control section.
If initially W equals 10
and X equals 5, the value of the expression
is 15. However, upon relocation this value
will change.
If a relocation factor of 100
is applied, the value of the expression is
115.
Note that the value of the paired
terms, W-X, remains constant at 5
regardless of relocation. Thus, the new
value of the expression, '15, is the result
of the value of the odd term (W) adjusted
by the values of W-X.

The following examples illustrate
relocatable expressions.
A is an absolute
term, Wand X are relocatable terms from
the same control section.
Y is a
relocatable term from a different control
section.

Y-32*A

w-x+y

*

W-X+*

(reference to
Location Counter)

=F' 1234' (literal)

A*A+W
W-X+W
Y

General Information

19.

ADDRESSING-- PROGRAM

SECTIONING·AND~ING

BASE REGISTER INSTRUCTIONS
The System/360·addressing technique
requires the use of a base register, which
cont~ins the base address, and a
displacement, which is added to the
contents of the base register~
The
programmer may specify a symbolic address
and request the assembler to determine its
storage address in terms of a base register
and a displacement. The programmer may
rely on the assembler to perform this
service for him by indicating which general
registers are available for assignment and
what values the assembler may assume each
contains. The·programmer may use as many
or ~s few registers for this purpose as he
desires~
The only requirement is that, at
the point of reference, a register
containing an address from the same control
section is available, and that this address
is less than or egual to the address of the
item to ·which the· reference i~ being made.
The difference between the two addresses
may not exceed 4095 bytes.

ADDRESSES -- EXPLICIT

A~D

IMPLIED

An address is composed of a displacement
plus the contents of a base regist~r.
(In
the case of RX instructions the contents
of an index register are also· used to
deri ve t he address.) .
The programmer writes an explicit
address by specifying. the displacem~ent and
the base register.
If, in an RX
instruction, an explicit address is used,
it is assembled without being checked for
proper boundary alignment.
The assembler
assumes that the programmer has either used
an aligned.explicit address or programmed
with a register to align the address.

The USIN~ and DROP assembler instructions
enable programmers to use expressions
representing implied addresses as operands
of machine-instruction statements, leaving
the assignment of base registers and the
calculation of displacements to the
assemble.r.
In order to use symbols in the operand
field of ~achine-instruction statements
th~ programmer must (1) indicate to the
assembler, by means of a USING statement,
that one or more general registers are
available for use as base registers, (2)
specify by means of the USING statement,
what value each base register contains, and
(3) load each base register with the value
he has specified for it.
A program must bave at least one USING
statement for each control section to be
addressed.
Having .the assembler determine base
registers and displacements relieves the
programmer of separating each ~ddress into
a displacement value and a base address
value. This feature of the· assembler will
eliminate a likely source of programming
errors, thus reducing the time required to
check out programs~ To take advantage of
this feature, the programmer uses the USING
and DROP iristructions described in this
sUbsection. The principal discussion of
this feature follows the description of
both instructions.

Certain general registers have special uses
and are available to the programmer under
certain restrictions; These registers and
the restrictions follow.
0-1

The boundary alignment checked by the
assembler is the alignment of the effective
address, when an implied address is used.
The programmer writes an implied address by
specifying an absolute orrelocatable
address.
The assembler can select a base
register and compute a displacement,
thereby generating an explicit address from
an implied address, if the programmer has
conveyed the availability and contents of
the base registers.
He can do this with
the USING and DROP instructions.

·20

S/360 BOS Assembler with I/O Macros

These registers are used bi the
routines generated from the
IBM-supplied macros. Therefore,
these reqisters may be used without
restriction if no IBM macros appear
in the program; otherwise they
should be used only for immediate
computations, where the content of
the register is no longer needed
after the computation.
If the
programmer uses them, he must
either save their content himself
(and reload them later) or be
finished with them before IOCS uses
tbem.

These registers are used by the
Supervisor Interruption Routine.
Since interru'ptions are
unpredictable, these registers
should not be used by the
programmer, unless SUPVR
SAVEREG=YES is specified" when
assembling the supervisor.
(See
Macro Instructions to Assemble·a
SU.E.g.!:vi.§~. )

The format of the USING instruction
statement is:

ri------~'-----------_,____

14-15

Logical IOCS uses these two
registers for linkage.
Register 14
contains the return address (to the
problem program) from the DTF
routine.
Register'5 contains the
entry point into the DTF routine.
IOCS does not save the contents of
these registers prior' to using
them; if the programmer uses them,
he must either save their contents
himself (and reload them later) or
be finished with them" before 'IOCS
uses them.
It should be noted that
IOCS uses these registers only when
the user has called an IOCS routine
such as GET, PUT, OPEN, or CLOSE.

No~:

Whenever the Translate and Test
(TRT) instruction is used, the contents of
register 2 must be saved before this
instruction is executed.
After the TRT
instruction has been executed, the contents
of register 2 may be restored.
See the
~~te~Ll60 Principles of OEeration manual
listed on the front cover of this
publication for further information on the
TRT instruction.

The USING instruction indicates that one
or more general registers ar.e available for
use as base registers.
This instruction
also states the base address values that
the assembler may assume will be in the
registers at object time. Note that a
USING instruction does not load the
registers specified. It is the
programmer's responsibility to see that the
specified base address values are placed
into the registers. Suggested loading
methods are described in the SUbsection
PrQyramminq with the USING Instruction.

I

IOperand

Operand v must be an absolute or
relocatable expression.
No literals are
permitted. Operand v specifies a value
that the assembler can use as a base
address. The other operands must be
absolute expressions. The operand r1
specifies the general register that can be
assumed to contain the base address
represented by operand v. Operands r2, t3,
r4, and r5 specify registers that can be
assumed to contain v+409i, v+8192~ v+'2288,
and v+16384 respectively The values of the
operands r1, r2, r3, r4, and r5 must be
between 0 and '5. For example, the
statement:

'----------------"
IOperand
I
+I
1*,8,9
I
J

r-------~i-----------_,____

IName
Registers 2-11 are available to the
programmer. To avoid the possibility of
errors, these registers should be the
registers used by the programmer: However,
if for any reason there is a shortage of
registers, 0-1 and 14-15 are available
under the restrictions previously stated.

~

Not~:
Whenever Autotest is
used, the programmer must not use
registers 12 and 13 becaus~these
registers are used by the Autotest
Master Control routine.

I Operation

I

I
~I------I~--------+I-----1
IBlank IUSING
IFrom 2-6 expressions I
I
I
lof the form v,r',
I
Ir2,r3,r4,r5
I
I ______ I___________-L--J
I

IName

~

12-13

~Operation

I
I
IL-,______ I US_ING
_ _ _ _ _ _ _,
~I~

~

tells the assembler it may assume that the
current value of the Location counter will
be in general register 8 at object time,
and that the current value of the Location
Counter, incremented by 4096, will be in
general register 9 at object time.
The operands rl, r2, r3, r4, and r5 can
be a symbol or an expression provided that
the value of the symbol or expression is
between 0 and 15.
If the programmer changes the value in a
base register currently being used and
wishes the assembler to compute
displacements from this value, the
assembler must be told the new value by
means of another USING statement. In the
following sequence the assembler first
assumes that the value of ALPHA is in
register 9. The second statement then
causes the assembler to assume that
ALPHA+1000 is the value in register 9.

Addressing -- Program Sectioning and Linking

21

r-

I

IName

I operation

1----+
I

IUSING

I
I

I.
I.
I USING.

I

It is not necessary to use a DROP
statement when the base address in a
register is changed by a USING statement;
nor are DROP statements needed at the end
of the source program.

-,--

IOperand

-+---

IALPHA,9

I
I
I ALPHA+ 1000,9

A register made unavailable by a DROP
instruction can be made available again by
a subsequent USING instruction.

L

A USING statement may specify general
register 0 as a base register if oper~nd v
is a relocatable expression or zero.
If
gene-ral register 0 is specified, it must be
operand r1.
In this case, the assembler
assumes that register 0 contains the value
zero. Subseguent registers specified in
the same statement are assumed to have the
values 4096, 8192, etc.
The assembler
therefore places all subsequent effective
addresses less than 4096 in the
displacement field and uses zero'for the
base register field.
BQ!~:

If register 0 is ,made availab~e by a
USING instruction, the program is not
relocatable, despite the'fact that the
value specified by'operand v must be
relocatable.
However, the programmer is
able to make the program relocatable at
some future time by:
1.

Replacinq register 0 in the USING
statement.

2.

Loadinq the register with a relocatable
value.

3.

Reassembling the program.

The DROP instruction specifies a previously
available register that may no longer be
used as a base register.
The format'of the
DROP instruction statement is as follows~
i

i

IName

i

IOperation

IOperand

i

PROGRAMMING WITH THE USING INSTRUCTION
The USING (and DROP) instructions may be
used anywhere in a program, as often as
needed, ·to indicate the general registers
that are available for use as base
registers and the base address values the
assembler may assume each contains at
execution time.
Whenever an address is
specified in a machine-instruction
statement, the assembler determines whether
there is an available register containing a
suitable base address.
A register is
considered available for a relocatable
address if it was loaded with a relocatable
value that is in the same control section
as the address. A, register with an
absolute value is available 'only for
absolute addresses. In either case, the
base address is considered suitable only if
it is less than or equal to the address of
the item to which the reference is made.
The difference between the two addresses
may not exceed 4095 bytes.
7n the followinq sequence, the BALR
instruction loads register 2 with the
address of the first storaqe location
immediately following. In this case, it i~
the instruction named FIRST. The USING
instruction indicates to the assembler that
register 2 contains this location.
When
employing this method, the USING
instruction must immediately follow the
BALR instruction.
No other USING or load
instructions are required if the location
named LAST is within 4095 bytes of FIRST.

I

I----+-----Ir----------~

1

I

IBlank

IDROP

IName

IOperation

I

I

IUp to 5 absolute
lexpression~ of the
I for m r 1 , r 2,
Ir3,r4,r5

1

I

tL-______ t

~

__________L _ _ _ _

I
I
I

t

I

The expressions indicate general
registers previously named in a USING
statement that are now unavailable for base
addressing. The following statement for
example, prevents the assembler from using
registers 1 and '1:
i

I

I

IName

I Operation
I

I

J

1 DROP

IOperand

I

22

5/360 BOS Assembler with I/O Macros

-+'
IBEGIN IBALR

I

1
IFIRST

IUSING
1
I

I

I ·
I ·
·
lEND

I

I

I
I
ILAST

-,----10perand

I

f,I

12,0
1*,2
I
I

I

I
I
I BEGIN

I
I

I

I

In the following example, the BALR and
LM instructions load reqisters 2-5.
The
USING instruction indicates to the
assembler that these reqisters are
available as base, registers for addressing
a maximum of 16,384 consecutive bytes of
storage, beginning with the location named

I
I
I
I

HERE. The number of addressable bytes may
be increased or decreased by altering the
number of registers designated by the USING
and LM instructions and the number of
address constants specified in the DC
instructions.
r-

j

IName

I operation

1----+------BALR
USING
LM

I BEGIN

I

IHERE

1

IOperand

+12,0

DC
DC
DC

HERE,2,3,4,5
3,5,BASEADDR
FIRST
A (HERE+4096)
A (HERE+ 8192)
A (HERE+ 12288)

END

BEGIN

B

IBASEADDR
I
I
IFIRST
I

I

ILAST

IL

_ _ _ _ _...l...-

RELATIVE ADDRESSING
Relative addressing is the technique of
addressing instructions and data areas by
designating their location in relation to
the Location Counter or to some symbolic
location. This ty~e of addressing is
always in bytes, never in bits, words, or
instructions. Thus, the expression *+4
specifies an address that is four bytes
greater than the current value of the
Location Counter.
In the sequence of
instructions shown in the following
example, the location of the CR machine
instruction can be expressed in two ways,
ALPHA+2 or BETA-4, because all of the
mnemonics in the example are for 2-byte
instructions in the RR format.
r-

Tj---

Sectioning a program is optional, and
many programs can best be written without
sectioning them.
The programmer writing an
unsectioned program need not concern
himself with the subsequent discussion of
program sections, which are called control
sections.
He need not employ the CSECT
instruction, which is used to identify the
control sections of a mUltisection program.
Similarly, he need not concern himself with
the discussion of symbolic linkages if his
program neither requires a linkage to nor
receives a linkage from another program.
He may; however, wish to identify the
program and/or specify a tentative starting
location for it, both of which may be done
by using the START instruction.
He may
also want to employ the dummy section
feature obtained by using the DSECT
instruction.
Note: Program sectioning and linking is
closely related to the specification of
base registers for each control section.
Sectioning and linking examples are
provided under the heading Addressing
External Control sections.
CONTROL SECTIONS

j

IName

IOperation

IALPHA
I
I
IBETA

ILR
ICR
IBCR
IAR

~

~I------------~------------------~

}----+

in EXTRN statements and V-type address
constants may not exceed 255.
(EXTRN
statements are discussed in this section;
V-type constants under Q~_==~giing
Constant assembler instruction.)
If the
sam~ymbol appears in a V-type address
constant and in the name field of any other
statement, it is counted as two symbols.

IOperand
I
13,4
14,6
11,14
12,3

It is often convenient, or necessary, to
write a large program in sections.
The
sections may be assembled separately~ then
combined subsequently into cne object
program.
The assembler provides facilities
for creating multisectioned programs and
symbolically linking separately assembled
programs or program sections. The combined
number of control sections and dummy
sections may not exceed 32. The combined
number of control sections and dummy
sections plus the number of unique symbols

The concept of program sectioning is a
consideration at coding time, assembly
time, and load time. To the programmer, a
program is a logical unit.
He may want to
divide it into sections called control
sections; if so, he writes it in such a way
that control passes properly from one
section to another regardless of the
relative physical position of the sections
in storage.
A control section is a block
of coding that can be relocated,
independently of other coding, at load time
without altering or impairing the operating
logic of the program. It is normally
identified by the CSECT instruction.
However, if it is desired to specify a
tentative starting location, the START
in~truction may be used to identify the
first control section
To the assembler, there is no such thing
as a program; instead, there is an
assembly, which consists of one or more
control sections.
(However, the terms
assembly and program &re often used
interchangeably
An unsectioned program is
treated as a single control section.
To
the linkage editor, there are no programs,

Addressing -- Program Sectioning and Linking

23

only control sections that must be
fashioned into an object program.
The output of the assembler consists of
the .assembled control sections and a
control dictionary. The control dictionary
contains 'information the linkage editor
needs in order to complete
cross-referencing between control sections,
as"it. combines them into an object program.
The linkage editor can take control
sections from various assemblies and
combine them properly with the help of the
corresponding control dictionaries.
Successful combination of separately
assembled control sections depends on the
techniques used to provide symbolic
linkaqes between the control sections.
Whether the programmer writes an
unsectioned proqram, a multisection
program or part of a ~ultisection program,
he still knows what eventually will be
entered into storage, because he has
described storage symbolically. He may not
know where each section appears in storage,
but he does know what storage contains.
There is no constant relationship between
control sections. Thus, knowin~ the
location of one control section does not
make another control section addressable by
relative addressing techniques.

control section contents can be intermixed
because the assembler provides a Location
counter for each control section.
Locations are assigned to control sections
in such a way that the sections are placed
in storage consecutively, in the same order
as they firs~ occur in the program. Each
control section subsequent to the first
begins at the next available double-word
boundary.
FIRST CONTROL SECTION

instruction in an assembly. It may also be
used to specify a tentative starting
location for the program. The format of
the START instruction statement is as
follows:

,

i

-,--------------------~

10peration 10perand
IName
I
I
I
IA self-defining
IA symbol I START
or blank
lor blank __ I_________---LIterm
__________. ________
~I

L

~

If a symbol names the'START instruction
the symbol is established as the name of
the control section. If not, the control
section ~s considered to be unnamed.
All
subsequent statements are assembled as part
of that control section This continues
until a CSECT instruction identifying a
different· control section or a DSECT
instruction is encountered. A CSECT
instruction named by the same symbol that
names a START instruction is considered to
identify the continuation of the control
section first identified by the START.
Similarly an unnamed CSECT that occurs in
a program initiated by an unnamed START is
considered. to identify the con~inuation of
the unnamed control section
The symbol in the name field is a valid
relocatable symbol whose value represents
the address of the first byte of the
control section.
It has a lenqth attribute
of one.
The assembler uses the self-defining
value specified by the operand as the
tentative starting location of the program.
This value must be divisible by eight. For
example, either of the following statements
could be used to assign the name PROG2 to
the first control section and to indicate
an initial assembly location of 2040:
I

IName

i

'

IOperation

10perand

~---+-----+-----

The first control section of a program has
the following special properties
1.

2.

Its tentative loading location may be
specified as an absolute value.
It normally contains the literals
requested in the program, although
their positioning can be altered.
This is further explained under the
discussion of the LTORG assembler
instruction.

The START instruction may be used to give a
name to the first (or only) control section
of a proqram. There may be only one START

24

S/360 BOS Assembler with I/O Macros

IPROG2
I PROG2

ISTART
1START

L..

I

12040
IX '7F8

I

.l.-

If the operand is omitted, the assembler
sets the tentative starting location of the
program at zero.
Nol~:

The START instruction may be
preceded only by ICTL, ISEQ, REPRO, PUNCH,
EJECT, SPACE, TITLE, PRINT, and comments
statements, and by macro tnstructions that
generate only these statements.
If the user plans to write his own
macro-instruction routines, the START
instruction may not be used as an
instruction within his macro routine.

CS~£!_ --

reserving the storage.
(It is assumed that
the storage is reserved either by some
other part of this assembly or else by
another assembly
The DSECT instruction
identifies the beginning or resumption of a
dummy section.
More than one dummy section
may be defined per assembly, but each must
be named.
The format of the DSECT
instruction statement is as foll~ws:

- Identify·· Control·· section

The CSECT instruction identifies the
beginning or the continuation of a control
section. The format of the CSECT
instruction statement is as follows:
r--------~------------,,-------

I

I Operation
I

I

I
I

INotused; any
I
loperand is treatedl
las a comment
I

I

I

IName

IA symbol
lor blank

I CSECT

I Operand

I

I

If a symbol names the CSECT instruction
the symbol is established as the name of
the control section; otherwise the section
is considered to be unnamed.
All
statements following the CSECT are
assembled as part of that control section
untIl a statement identifying a different
control section is encountered (i.e.,
another CSECT or a DSECT instruction) •
The symbol in the name field. is a valid
relocatable symbol whose value.represents
the address of the first byte of the
control section~ It has a leagth attribute
of one.
Several CSECT statements with the same
name may appear within a program. The
first is considered to identify the
beginning of the control section; the rest
identify the resumption of the section.
Thus, statements from different control
sections may be interspersed. They are
properly assembled (assigned contiguous
storage locations) as long as the
statements from the various control
sections are identified by the appropriate
CSECT instructions
Unnamed

Control-Sectio~

If neither a named CSECT instruction nor
START instruction appears at ~he beginning
of the program, the assembler determines
that it is to assemble an unnamed control
section as the first (or only) control
section. There may be only one unnamed
control section in a program.
If one is
initiated and is then followed by a named
control section, any subsequent unnamed
CSECT statements are considered to resume
the unnamed control section. If it is
desired to write a small program that is
unsectioned, the program does not need to
contain a CSECT instruction.
DS]f~ldenti!y_DUN~y-~§ction

A dummy section represents a control
section that is assembled but is not part
of the object program.
A dummy section is
a convenient means of describing the layout
of an area of storag.e without actually

I

i

i

I Name

IOperation

IOperand

I

I

I

I

I

IA symbol

I·DSECT

I
I

I
I

,

INotused; any
I
loperand is treated I
tas a comment
I

The symbol in the name field is a valid
relocatable symbol whose value represents
the· first byte of the dummy section.
It
has a length attribute of one.
Program statements be16nging to dummy
sections may be interspersed throughout the
program-or may be written as a unit.
In
either case, the appropriate DSECT
instruction should precede each set of
statements.
Whenever the assembler
instructions EJECT, SPACE, PRINT, PUNCH,
REPRO, XFR, or TITLE are used within a
DSECT, they are treated as comments and 11Q!
executed. When multiple DSECT instructions
with the same name are encountered . the
first is considered to initiate the dummy
section and the rest to continue it.
Symbols that appear in the name field of
a DSECT statement or in the name field of
statements in a dummy section may be used
in USING instructions. Therefore, they may
be used in program elements (e.g.,
machine-instructions and data definitions)
that specify storage addresses.
An example
illustrating the use of a dummy section
appears subsequently under Addressing-Dummy
Se£~.

A symbol that names a statement in a
dummy section may be used in an A-type
address constant only if it is paired with
another symbol (with the opposite sign)
from the same dummy section.
DUMMY SECTION-LOCATION ASSIGNMENT:
A
Locationcounter is usedtodetermine the
relative locations of named program
elements in a dummy section.
The Location
Counter is always set to zero at the
beginning of the dummy section, and the
location values assigned to symbols that
name statements in the dummy section are
relative to the initial statement in the
section.
ADDRESSING DUMMY SECTIONS: The programmer
mayw"IshtodescrIbe the-format of an area
whose storage location will not be

Addressing -- Program Sectioning and Linking

25

determined until the program is executed.
He can describe the format of the area in a
dummy section, and he can use symbols
defined in the dummy section as the
operands of machine instructions. To
effect references to the storage area, he
does the following:
1.

2.

Provides a USING statem-ent specifyinq
both a general register that the
asse~bler can assign to the machineinstructions as a base register and a
value from the dummy section that the
assembler may assume the register
contains
Ensures that the same register is
loaded with the actual address of the
storage area.

The values assiqned to symbols defined
in a dummy section are relative to the
initial statement of the section. Thus,
all machine-instructions which refer to
names defined in the dummy section will, at
execution time, refer to storage locations
relative to the address loaded into the
register.
An example is shown in the following
coding.
Assume that two independent
assemblies (assembly 1 and assembly 2) have
been loaded and are to .be executed as a
single overall program. Assembly 1 is an
input routine that places a record in a
specified area of storage, places the
address of the input area containing the
record in general register 3, and branches
to assembly 2.
Assembly 2 processes the
record.
Coding shown in the example is
from assembly 2.
The input area is described in assembly
2 by the DSECT control section named
INAREA. portio"ns of the input area (i.e.,
record) that the programm€rwishes to work
with are named in the DSECT control section
as shown. The assembler instruction USING
INAREA,3 designates general register 3 as
the base register to be used in addressing
the DSECT control section~ and that general
register 3 is assumed to contain the
address oi INAREA.
Assembly 1, during execution, loads the
actual beginning address of the input area
in general register 3. Because the symbols
used in the DSECT section are defined
relative to the initial statement in" the
section, the address values they represent,
will, at the time of program execution, be
the actu~l storage locations of the input
area.
26

S/360 BOS Assembler with I/O Macros

r----------T------------"~I--------------------~I

IName

IOperation

J--

I

ASMBLY2
BEGIN

CSECT
BALR
USING
USING
CLI
BE

IOperand

I

+---------f
I

12,0
1*,2
1

1

JINAREA,3
IINCODE,C'A'
ATYPE

ATYPE

MVC
M.VC

WORKA,INPUTA
WQRKB,INPUTB

WORKA
WORKB

DS
DS

CL20
CL18

INAREA
INCODE
INPUTA
INPUTB

DSECT
DS
DS
DS

CL1
CL20
ICL18

END

I
I

SYMBOLIC LINKAGES
Symbols may be defined in one proqram and
referred to in another, thus effectinq
symbolic linkaqes between independently
assembled programs. The linkaqes can be
effected only if the assembler is able to
provide information about the linkaqe
symbols to the linkage editor, which
resolves these linkage references at load
time. The assembler places the necessary
information in the control dictionary on
the basis of the linkage symbols identified
by the ENTRY and EXTRN instructions.
Note
that these symbolic linkages are described
as linkages between independent assemblie~;
more specifically, they are linkages
between independently assembled control
sections.
In the program vhere the linkage symbol
is defined (i. e., used as a name) , it must
also be identified to the assembler by
means of " the ENTRY assembler instruction.
It is identified as a symbol that names an
entry point, which means that another
program will use that symbol ~n order to
effect a branch operation or a data
refe~ence.
The assembler places this
information in the control dictionary.
Similarly, the program that uses a
symbol defined in some other program must
identify it by the EXTRN assembler
instruction. It is identified as ari
externally defined symbol (i.e., defined in
another ptogram) ihat is used to effect
linkage to the point of definition The

assembler places this information in the
control dictionary.
There is another way to obtain symbolic
linkage, namely by using the V-type address
constant. The subsection Data·Definition
In§tructio!!§. ~ontains the details pertinent
to writing a V-type address constant.
It
is sufficient here.to note that this
constant may be considered an indirect
linkage point.
It is created from an
externally defined symbol~ but that symbol
does not have to be identified by an EXTRN
statement The V-type address constant may
be used for external branch references
(i.e., for effecting branches to other
programs).
It should not be used for
external data references (i.e., for
referrinq to data in other programs).

defined in some other proqram Each
external symbol must be identifiedi this
includes symbols that name control
sections.
The format of the EXTRN
instruction statement is as follows:
i

I

IName

I

I Operation I Operand

r---+

---------+----------------------~

I Blank I EXTRN

I

'1

I

I A relocatable
I symbol

,.

..L

The symbol in the operand field may not
appear as the name of a statement in this
program.
The following example identifies
three external symbols that have been used
as operands in this program but are defined
in some other program.

,

IName

IName

I Operation

l---;-

IBlank I ENTRY
I
I
I
I
IL - - - - - - LI ____________

Operand

I

,

A relocatable
symbol that also
appears as a statement name
~_

EXTRN
EXTRN
EXTRN

I
I

,

,

+ RATEBI

I

I
I PAYCALC
I WITHCALC

An example that employs the EXTRN
instruction appears subsequently under
Addressin~ternal·· Control . S ecti.QJl§.

I
I
I

Not~:
A V-type address constant does not
have to be defined by an EXTRN statement.

II

Nol~~
When external symbols are used in an
expression they may not be paired. The
assembler processes them as though they
originated from different control sections.

The symbol in the ENTRY operand field
may be used as an operand by other
.
programs. An ENTRY statement operand may
not contain a symbol defined in an unnamed
control section or a dummy section. The
following example identifies the statements
named SINE and COSINE as entry points to
the program.

Addressinq External Control Sections
A common way for a program to link to an
external control section is to:
1.

create a V-type address constant with
the name of the externa~ symbol.

2.

Load the constant into a general
register and branch to the control
section via the register.

I

Operation
Operand
IName
r----~---------~--------ENTRY
SINE
I
ENTRY
COSINE
I
.
Th~ name of a control section does not
have to be identified by an ENTRY
instruction when another program uses it as
an entry point. The assembler
automatically places information on control
section names in the control dictionary. A
maximum of '00 ENTRY statements will be
processed in a single assembly.

rf-----------~,----

IName

I

IMAINPROG
BEGIN

ICSECT
IBALR
IUSING
IL
IBALR

VCON'

~--~----------------~

I Operation
I

I
I

EXTRN -- IDENTIFY EXTERNAL SYMBOL
The EXTRN instruction idEntifies a linkage
symbol that is used by this program but

Operation I Operand

I
I

The ENTRY instruction identifies a linkage
symbol that is defined in this program but
may be used by some other program.
The
format of the ENTRY instruction statement
is as follows:

.

,

Ir------T------------~-----------.-------------,

ENTRY -- IDENTIFY ENTRY-POINT SYMBOL

I
I
IDC
lEND

IOperand

I

3,VCON

1,3
V(SINE)
BEGIN

Addressing -- Program sectioning and Linking

27

For example, to link to the con trol
section named SINE, the preceding coding
might be used.

I

I

IName
I
MAINPROG
BEGIN

I Operation
I
CSECT
BAtR
USING

IOperand
I

An ~xternal symbol naming data may be
referred to as follows:

,4-

Identify the external symbol with the
EXTRN instruction, and create an
address constant from the symbol.
Load the constant into a general
register, and use the register for base
addressinq.

For example, to use an area named
RATETBL, which is in another control
section, the following coding might be
used:

28

S/360 Bas Assembler with I/O Macros

,

I

RATEADDR

2,0
*,2

EXTRN

RATETBL

L
USING
A

4,RATEADDR
RATETBL,4
3,RATETBt

DC
END

A (RATE TBt)
BEGIN

,I

MACHINE-INSTRUCTIONS

This section discusses the coding of the
machine-instructions represented in the
assembler language. The reader is reminded
that the functions of each
machine-instruction are discussed in the
pr!ncipl~§ ~i-Qperati£B manual (see
pr~!~£,g) •

1.

Floating-point instruc~ions must
specify floating-point registers 0, 2,
4, or 6.

2.

Double-shift, full-word multiply, and
full-word divide instructions must
specify an even-numbered general
register in the first operand.

OPERAND FIELDS AND SUBFIELDS
Machine-instructions may be represented
symbolically as assembler language
statements. The symbolic format of each
varies according to the actual
machine-instruction format, of which there
are five:
RR, RX, RS, SI, and SSe
Within
each basic format, further variations are
possible.
The symbolic format of a machineinstruction is similar to, but does not
duplicate, its actual format. ~dix·D
illustrates machine format for the five
classes of instructions.
A mnemonic
operation code is written in the operation
field, and one or more operands are written
in the operand field. Comments may be
appended to a machine-instruction statement
as previously explained in the
In trog uctiQ1l.
.
AnY.machine-instruction statement may be
named by a symbol, which other assembler
statements can use as,an operand. The
value attribute of the symbol .is the
address .of the leftmost byte assigned to
the assembled instruction. The length
attribute of the symbol depends on the
basic instruction format, as follows:
Ba§ic Format
RR
RX
RS
SI
SS

. 1.§lgth

2

.

Attribut~

4
4
4
6

In§1ructi2!LAl!!l.!!!!!illlLrul.L£h.§£king
All machine-instructions are aligned
automatically by the assembler on half-word
boundaries. If any statement that causes
information to be assembled requires
alignment, the bytes skipped are filled
with hexadecimal zeros.
All expressions
that specify storage addresses are checked
to insure that they refer to appropriate
boundaries for the instructions in which
they are used.
Register numbers are also
checked to make sure that they specify the
proper registers as follows:

Some symbolic operands are written as a
single field and other operands are written
as a field followed by one or two
subfields. For example, addresses, consist
of the contents of a base register and a
displacement.
An operand that specifies a
base and displacement is written as a
displacement field foilowed by a base
register subfield, as follows:
40(5). In
the RX format, both an index register
subfield and a base register ~ubfield are
written as follows:
40(3,5). In the SS
format, both a length subfield and a base
register subfield are written as follows:
40 (21,5) •
!£pendix-Qshows two types of addressing
formats for RX, RSi SI, and SS
instructions In each case, the first type
shows the method of specifying an address
explicitly, as a base register and
displacement. The second type indicates
how to specify an implied address as an
expression.
~or example, a load multiple instruction
(RS format) may have either of the
following symbolic operands:

R 1 , R 3 , D 2 (B 2)

R.,R3,S2

explicit address
implied address

Whereas D2 and B2 must be represented by
absolute expressions, S2 may be represented
either by a relocatable or an absolute
expression.
In order to use implied addresses, the
following rules must be o~served:
1.

The base register assembler
instructions (USING and DROP) must be
used.

2.

An explicit base register designation
must not accompany the implied address.

For example, assume that FIELD is a
relocatable symbol, which has been assigned
a value of 7400. Assume also that the
Machine Instructions

29

assembler has been notified (by a USING
instruction) that general register 8
currently contains a relocatable value of
4096 and is available as a base register.
The following example shows a
machine-instruction statement as it would
be written in assembler language and as it
would be assembled.
Note that the value of
D2 is the difference between 7400 and 4096
and that X2 is assembled as zero, since it
was omitted.
The assembled instruction is
presented in decimal:

L

L
2~

(implied address)

If the first subfield in the sequence
is omitted, the comma that separates it
from the second subfield is written.
The parentheses must also be written.
MVC 32(16,5) ,FIELD2
MVC BETA(,5) ,FIELD2 (implied lenqth)
(Beta must be an absolute expression)

3.
Assembler statement:
ST

2,48 (4,5)
2,FIELD

4,FIELD

In the RX class of instructions if the
index register sub field is not used,
but the base register is specified, the
first subfield (index register) must be
specified as zero.
It_may_not-Qg
omitted.

Assembled instruction:
L

Op.code
50

R~

4

X2
0

B2
8

D2
3304

L

4.
An address may be specified explic~tly
as a base register and displacement (and
index register for RX in~tructions) by the
formats shown in the first column of the
following table.
The address may be
specified as an implied address by the
formats shown in the second column.
Observe that the two storage addresses
required by the SS instructions are
presented separately; an implied address
may be used for one while an explicit
address is use~ for the other.

r--~

Ii

1----+
1 EX
I

I RS
I SI

ID2(X2,B2)
ID2(0,B2)*
I D2 (B2)

I

,

I D 1 (B 1)

1 S S I D 1 (L 1 , B 1)
1

1

ID1(1.,B')
ID2(L2,B2)

L __- - - 1 .

-+-

1 S2 (X2)
I S2
I S2
,I
I S 1 (L 1)
I S 1 (L)

I

1

s,

I S2(L2)

.L--

I
I
1
1
_ _ _ _.J1

*A zero must be supplied in an RX
explicit address when it is desir~d to
omit an index register specification
but include a base register
specification.
A comma must be written to separate
operands. Parentheses must be written to
enclose either one or two subfields of an
operand, and two subfields must be
separated by a comma.
If the format of an
operand includes one subfield and if the
subfield is omitted, the parentheses must
also be omitted.
If the format includes
two subfields, the following rules apply:
1.

If both subfields are omitted, the
separating comma and the parentheses
must also be omitted.

30

S/360 BOS Assembler with I/O Macros

If the second subfield in the sequence
is omitted, the comma that separates it
from the first subfield must be
omitted. The parentheses must be
written
MVC
MVC

I Type IExplicit Address I Implied Address I

2,48(4,5)
2,48(0,5)

32 (16,5) , FIELD2
FIELD1(16) ,FIELD2

(implied
ad dress)

Fields and subfields in a symbolic
operand may be represented either by
absolute or by relocatable expreSS10ns,
depending on what the field requires.
(An
expression has been defined as consisting
of one term or a series of arithmetically
combined terms.)
Refer to Appendix D for a
detailed description of field requirements.
N01~:
Blanks may not appear in an operand
unless provided by a character
self-defining term or a character literal
Thus, blanks may not intervene between
fields and the comma separators, between
parentheses and fields, etc.

LENGTHS -- EXPLICIT AND IMPLIED
The length field in SS instructions can be
explicit or implied.
To imply a length,
the programmer omits a length field from
the operand.
The omission indicates that
the length field is either of the
following:
,.

The length attribute of the expression
specifying the displacement, if an
explicit base and displacement have
been written.
-

2.

The length attribute of the expression
specifying the effective address, if
the base and displacement have been
implied.

In either case, the length attribute for
an expression is the length of the leftmost
term in the expression.
By contrast, an explicit length is
written by the proqrammer in the operand as
an absolute expression.
The explicit
length overrides any implied length.
Whether the length is explicit or
implied, it is always an effective lenqth.
The value inserted into the length field of
the assembled instruction is one less than
the effective length in the
machine-instruction statement
No!~:
If a length field of zero is
desired, the length may b~ stated either as
a one or as a zero.
(This is useful when
the subject instruction is to be executed
by the Execnte (EX) machine instruction.)

To summarize, the length required in an
SS instruction may be specified explicitly
by the formats shown in the first column of
the following table or may be implied by
the formats shovn in the second column.
Observe that the two lengths required in
one of the SS instruction formats are
presented separately.
An implied length
may be used for one while an explicit
length is used for the other.

I

I Explicit Length

I-I Dl (Ll,Bl)

1

S, (L 1)
D 1 (L, B 1)
S 1 (L)

I
I
I D2 (L2, B2)
,I S2 (L2)

Implied Length

s,Dl (,Bl)
Dl(,!31)
S,
D2 (, B2)
S2

I
I

1
1
1
I
I

example, the modifier L indicates a loqical
function, as in AL for Add Logical.
Mnemonic codes for functions involving
data usually indicate the data types, by
letters that correspond to those for the
data types in the DC assembler instruction
(see Assembler·Instruction statements).
Furthermore, letters U and W have been
added to indicate short and long,
unnormalized floating-point operations,
respectively For example, AE indicates Add
Normalized Short, whereas AU indicates Add
Unnormalized Short.
Where applicable,
full-word fixed-point data is implied if
the data type is omitted.
The letters R and I are added to the
codes to indicate, respectively~ RR and SI
machine instruction formats~
Thu~, AER
indicates Add Normalized Short in the RR
format. Functions involving character and
decimal data types imply the SS format.
MACHINE-INSTRUCTION EXAMPLES
The examples that follow are grouped
according to machine-instruction format.
They illustrate the various symbolic
operand formats.
All symbols employed in
the &xamples must be assumed to be defined
elsewhere in the same assembly.
All
symbols that specify register numbers and
lengths must be assumed to be equated
elsewhere to absolute values.
Implied addressing, control section
addressing, and the function of the USING
assembler instruction are not considered
here. For discussion of these
considerations and for examples of coding
sequences that illustrate them, th& reader
is referred to Proqram sectioning and
Linking-and Base-Register Instructions.
RR-Forroat

The mnemonic operation codes (shown in
are designed to be easily
remembered codes that indicate the
functions of the instructions The normal
format of the code is shown below; the
items in brackets are not necessarily
present in all codes:

!E£~ndll~)

Verb [Modifier] [Data Type] [Machine
Format]
The verb, which is usually one or two
characters, specifies the function.
For
exa~ple, k represents Add , and MV
represents Move.
The function may be
further defined by a modifier. 'For

r--------,--------~.--,r-----

IName

I

IALPHAl
IALPHA2
I BETA
IGAMMA.
IGAMMA2
L--________

Operation

IOperand

1

LR
11,2
LR
IREG1,REG2
SPM
16
SVC
1250
SVC
__________ ITEN
______________________

~

~

.J

The operands of ALPHA1, BETA, and GAMMAl
are decimal self-defining values, which are
categorized as absolute expressions. The
operands of ALPHA2 and GAMMA2 are symbols
that are equated elsewhere to absolute
values.

Machine Instructions

3'

·

.IOperaticn

IName

I~-------I~-

BETA instructions and GAMMA4 specify
implied addresses.
GAMMA2 specifies a
displacement of zero. GAMMA3 does not
specify a base register.

~

IOperand

--+1--------

IALPHA.
IL
1.,39(4,.0)
IALPHA2
IL
IREG',39 (4,TEN)
IBETA1
IL
12,ZETA(4)
IBETA2
IL
IREG2,ZETA(REG4}
lGAMMA1
tL
12,ZETA'
IGAMMA2
IL
IREG2,ZETA
IGAMMA3
IL
12,=P'1000'
I LA MBDA1 I L
I 3, 20 (0, S) __________
L-________i -________- - i -______
~.

r.--------~.~-------_r__'------~------------~

IName

1ALPHA.
~

Both ALPHA instructions specify explitit
addresses; REG1 and TEN are· absolute
symbols.
Both BETA instructions specify
implied addresses, and both use index
registers.
Indexing is omitted from the
GAMMA instructions.
GAMMA1 and GAMMA2
specify implied addresses.
The second
operand of GAMMA3 is a literal. LAMBDA1
specifies no indexing.

r--

~,.----------_r__

.I

IName

IOperation

IOperarid

IALPHA1
IALPHA2
IALPHA3
IALPHA4
IALPHAS

IBXH
IBXH
IBXH
ISLL
ISLL

11,2,20(4)
IREG1,REG2,20(REGD)
IREG1,REG2,ZETA
IREG2,5
IREG2,0(S)

I
I
1
1
I

L--

I

I

•

J-----+

I

r---------.r-----------r-IName
IOperation 10perand
1

1

1 ALP HA1 I CL I
1 40 (9) , X '40 '
IALPHA2
ICLI
140(REG9),TEN
IBETA.
ICLI
IZETA,TEN
I CL T
I ZETA, C ' A '
I BET A2
IGAMMA 1 I SIO
140 (9)
IGAMMA2
ISIO
10(9)
1GAMMA3
I SIO
140 (0)
IGAMMA4
ISIO
IZETA
L--_____ - i - -__________
___
'~

The ALPHA instructions and GAMMA.-GAMMA3
specify explicit addresses, whereas the

32

IALPHA2
I ALPHA3'
IALPHA4
IBETA
IGAMMA 1
IGAMMA2
JGAMMA3
IGAMMA4'
_______
~

~

AP
140 (9,8) ,30 (6,7)
1
140 (NINE,REG8) ,30 (L6, 7) I
AP
AP
IFIELD2,FIELD1
1
AP
I
I FIELD2 (9) , FIELD1 (6)
AP
IFIELD2(9),FIELD1
I
MVC
140(9,8),30(7)
I
MVC
140(NINE,REG8),DEC(7)
I
MVC
IFIELD2,FIELD1
I
MVC
IFIELD2(9),FIELD1
I
__________
________
____________J
~

~.

ALPHA., ALPHA2, GAMMA., and'GAMMA2
specify explicit lengths and addresses.
ALPHA3 and GAMMA3 specify both implied
length and implied addresses; ALPHA4 and
GAMMA4 specify explic'it length and implied
addresses.. BETA specifies an explicit
length for FIELD2 and an implied length for
FIELD.; both addresses are implied.

--------l

Whereas ALPHA' and ALPHA2 specify
explicit addresses, ALPHA3 specifies an
implied address.
ALPHA4 is a shift
instruction shifting the contents of REG2
left S bit positions.
ALPHAS is a shift
instruction shifting the contents of REG2
left by the value contained in general
register S.

J--

10perationiOpeFand

-------f__

1-1

S/360 BOS Assembler with I/O Macros

EXTENDED MNEMONIC CODES
For the convenience of the programmer, the
assemfuler provides extended mnemonic codes,
which allow conditional branches to be
speci(ied mnemonically as well ~s through
the use of the BC machine-instruction.
These extended mnemonic codes specify both
the machine branch instruction and the
condition on which the branch is to occur.
The codes are not part of the universal set
of machine-instructions, but are translated
by the assembler into the corresponding
operation and condition combinations.
The allowable extended mnemonic codes
and their operand formats are shown in
Figure 3, together with their machineinstruction equivalents.
Unless otherwise
noted, all extended mnemonics shown are for
instructions in the RX format.
Note that
the orily difference between the operand
fields of the extended mnemonics and those
of their machine-instruction equivalents is
the absence of the R. field and the comma
that separates it from the rest of the
operand field.
The extend€d mnemonic list,
like the machine-instruction list, shows
explicit address formats only.
Each
address can also be specified as an implied
address.

r-

--------------------------------------,------------------------,

~--------------~

I
IEXTENDED
ICODE
I

I
1 OPERAND
1
1
1

1

1
1
1
MEANING
1MACHINE INSTRUCTION
1
1
1
1
1
I
1
1
l-1
1
---------------------------------+----------------------~
1
I
I
1
Branch Unconditional
D2 (X2, B2)
1
J B
1
1 BC 15, D2 (X2, B2)
Branch Unconditional (RR Format) 1 BCR 15, R2
R2
1
1 BR
1
No Operation
D2 t X2 , B2)
1
J NOP
1
1 BC 0, D2 (X2, B2)
No Operation (RR Format)
R2
1
1 NOPR
1
1 BCR 0, R2
l-f
1
----------------~
1
I
1
1
1USED AFTER COMPARE INSTRUCTIONS
1
1
I
1
I
1
1
Branch on High
D2 (X2, B2)
1 BC 2, D2 (X 2, B2)
1
1
1 BH
Branch on Low
D2 (X2, B2)
I BC 4, D2 (X2, B2)
1
I BL
1
Branch on Equal
D2 (X2, B2)
1
I BE
1
1 BC 8, D2 (X2, B2)
D2 (X2, B2)
Branch on Not High
1 BC 13, D2 (X2, B2)
1
I BNH
1
Branch on Not Low
D2 (X2, B2)
1
1 BC q 1, D2 (X2, B2)
1 BNL
1
D2 (X2, B2)
Branch on Not Equal
I
I BNE
1 BC 7, D2 (X2, B2)
1
------,-------l
l---------r-l--1
I
1
1
1
1
IUSED AFTER ARITHMETIC INSTRUCTIONS
1
I
I
I
1
1
I
I
1
Branch on Overflow
·1 BC 1, D2 (X2, B2)
1
I BO
I D2 (X2, B2)
I
Branch on Plus
1 BC 2, D2 (X2, B2)
1
I BP
I D2 (X2, B2)
I
Branch on Minus
1
I BM
1 D2 (X2, B2)
1 BC 4, D2 (X2, B2)
1
Branch on Zero
1
1 BZ
1 D2 (X2, B2)
1
1 BC 8, D2 (X2, B2)
I------r---------+_
+1
I
1
1
1
IUSED AFTER TEST UNDER MASK INSTRUCTIONI
1
1
1
1
1
1
1
1
Branch if Ones
1
1 BO
1 D2 (X2, B2)
I
1 BC , D2 (X2, B2)
Branch
if
Mixed
BM
D2
(X2,
B2)
I
I
1
1 BC 4, D2 (X2, B2)
1
B2)
Branch if Zeros
D2 (X2,
1
1 BZ
I _____
I BC 8, D2 (X2, B2)
L-_______
. _________ 1
_______

,

,

~

~

J

Figure 3.

Extended Mnemonic Codes

The following examples illustrate
instructions using extended mnemcnic codes.
In these examples it is assumed that the
symbol GO is definEd elsewhere in the
program.

.-------r
IName

1 Operation

i

IOperand

--,

I

l------+.-:.---------+-------------------t
I
1
I
1
IL

___

IE
140(3,6)
IB
140(0,6)
IBL
IGO(3)
I BL
1GO
1________
BR
14
__i_

~

1

I
I
1
1
I

The first two instructions specify an
unconditional branch to an explicit
address The address in the first case is
the sum of the contents of base register 6,
the contents of index register 3 1 and the
displacement 40; the address in the second
instruction is not indexed. The third
instruction specifies a branch on low to
the address'implied by GO as indexed by the
contents of index register 3; the fourth
instruction does not specify an index
register. The last instruction is an
unconditional branch to the address
contained in register 4.

Machine Instructions

33

Just as machine instructions are used to
request the computer to perform a sequence
of operations durinq program execution
time, so assembler instructions are
requests to the assembler to perform
certain operations durinq the assembly~
Assembler-instruction statements, in
contrast to machine-instruction statements
do not always cause machine-ins~ructions to
be included in the assembled program.
Some, such as DS and DC, generate no
instructions but do cause storage areas to
be set aside for constants and other data.
others, such as EQU and SPACE, are
effective enly at assembly time; they
generate nothing in the assembled program
and have no effect on the Location Counter.
The fellowing is a list of all the
assembler instructions.

EQU -- EQUATE SYMBOL
The EQU instruction is used to define a
symbol by assigning to it the attributes of
an expression in the operand field.
The
form·at of the EQU instruction statement is
as follows:
r-------.

I Name
~

,

--r-----~

10peration, Operand

IA symbol

+------+

L-

IEQU

IAn expression

,

---t

--L-

I

I

.J

The expression in the operand field must
be absolute or relocatable.
Any symbols
appearing in the expression must be
previously defined.

~Y~Rol_Q~i~n~!~on lnstruct~Qn

EQU - Equate Symbol
Data Definition Instructions
Dc--=-Define-constant------DS - Define Storage
CCW - Define Channel Command Word

*

*

££Qg~~~~gctiQning_~nd-1inking

Instructions
START-=-start Assembly
CSECT - Identify Control Section
DSECT - Identify Dummy Section
ENTRY - Identify Entry-Peint Symbol
EXTRN - Identify External Symbol

The symbol in the name field is given
the same attributes as the expression in
the operand field.
The length attribute of
the symbol is that of the leftmost (or
only) term of the expression. The value
attribute of the symbol is the value of the
expression.
The EQU instruction is the means of
equating symbols to register numbers,
immediate data, and other arbitrary values
The following examples illustrate how this
might be done:

~~§~-B~g~§tef_1nst~gctiQn§

USING - Use Base Address Register
DROP - Drop Base Address Register
1i§!ing_~Qn!~Ql_In§!~Q£!~Ens

TITLE E~ECT SPACE PRINT -

Identify Assembly output
Start New Page
Space Listing
Print optional Data

ICTL - Input Format Control
ISEQ
Input Sequence Checking
ORG
Set I,ocation Counter
I,TORG
Begin Literal Poel
CNOP
Conditional No Operation
END
End Assembly
REPRO
Reproduce Following Card
PUNCH
Punch a Card
XFR
Generate a Transfer Card

*

Discussed under Adgfess~ng_==-Rrogr~~
Se£iioning~nQ_1inking·

34

S/360 BOS Assembler with I/O Macros

,Name

,

I

I

,Operation

10perand

~---+----------+-

IREG2
ITEST
I

,EQU
IEQU
I

I

-------l

12
(qeneral register)
IX'3F' (immediate data)

..L_ _ _ _.

1
I
.J

To reduce programming time, the
programmer can equate symbols to frequently
used expressions and then use the symbols
as operands in place of the expressions
Thus, in the statement
r-

I

IName

10peration

~

I

,FIELD

I
,EQU

,

'---

-or, Operand

-+-

I
,ALPHA-BETA+GAMMA

-L-

,
I
I

,
I
.J

FIELD is defined as ALPHA-BETA+GAMMA and
may be used in place of it.
Note, however,

that ALPHA, BETA, and GAMMA must all be
previously d,efined.

There are three data definition instruction
statements: Define Constant (DC). Define
storage (DS), and Define Channel Command
Word (CC W) •
These statements are used to enter data
constants into storage, to define and
reserve areas of storage, and to specify
the contents of channel command words. The
statements may be named by symbols so that
other program statements can refer to the
fields generated from them. The DS
instruction is written in the same format
as the DC instruction and may specify some
or all of the information that the DC
instruction provides. Only the function
and treatment of the statements vary.
The
DC instruction is presented first and
discussed in more detail than the DS
instruction.
DC -- DEFINE CONSTANT
The DC instruction is used to provide
constant data in storage.
It may specify
one constant or a series of constants.
Furthermore, a variety of constants may be
specified:
binary fixed-point,
floating-point, decimal, hexadecimal,
character, and storage addresses
(Data
constants are generally called constants
unless they are created from storage
addresses, in which case they are called
address constants.)
The format of the DC instruction
statement is as follows:
r-

IName

--~I------------~I---

I Operation I Operaad

l-----_+_
IA symbol I DC
lor blank I
I

I

L--

I

+-

lOne operand in
I
I the following
I
I format
_ _ _ _ JI

-'---

The operand consists of four subfields.
They are written in the following sequence:

,

Duplication
Factor

2
Type

3
Modifiers

4
Co nst ant (sl

The constant provided in the fourth
subfield is described by subfields 1-3.
Some or all of the three descriptive
subfields may be omitted, depending on the
constant. Note that more than one constant

may be specified in the fourth subfield for
most types of constants, so the programmer
need not write a separate data definition
for every constant desired.
However, each
constant so specified must be of the same
type; the descriptive three subfields apply
to all of them.
No blanks may occur within
any subfield, except in providing a
character in a character constant.
No
blanks may occur between the sub fields of
an operand.
The symbol that names the DC instruction
is the name of the constant, or, if the
instruction specifies more than one, the
first constant.
In the case of multiple
constants, relative addressing (for
example, SYMBOL+2) may be used to reach the
various values. The number of bytes
allocated to each constant can readily be
determined from the .four subfields.
The value attributed to the symbol
naming the DC instruction is the address of
the leftmost byte (after alignment) of the
constant, or the first constant where
multiple constants are defined.
The length
attribute depends on two things:
the type
of constant being defined and the use of a
length specification. If no length
specification is present, the implied
length of the constant is assumed.
Should
more than one constant be defined, the
attributed length is the length in bytes
(specified or implied) of the first
constant.
Boundary alignment also varies according
to the type of constant being specified and
the presence of a length specification.
Some·~onstant types are only aligned to a
byte boundary, but the DS instruction can
be used to force any type of word boundary
alignment for them.
This is explained
under"DS -- Define Storag~. Other
constants are aligned at various word
boundaries (half, full, or double) in the
absence of a length specification.
For
these constants, no bou~dary alignment
occurs if length is indicated.
Bytes that must be skipped in order to
align the field at the proper boundary are
not considered to be part of the constant.
In other words, the Location Counter is
incremented to reflect the proper boundary
(if any incrementing is necessary) b~fore
the address value is established.
Thu"S,
the symbol naming the constant will not
receive a value attribute that is the
location of a skipped byte.
The bytes
skipped in aligning the constant defined by
a DC instruction will be zeroed, because
information is being assembled.
This would
occur, for example, in the alignment of the
statement DC F'123'.

Assembler Instructions

35

!~~di~_f summarizes, in chart form,
the information concerning constants that
is presented in this section.

LITE]A1-DEFINI11.Q.!!1?=
The reader is
reminded that the discussion of literals as
machine-instruction operands referred him
to the description of the DC operand for
the methcd of writing a literal operand.
All subsequent operand specifications are
applicable to writing literals, the only
differences being:

force alignment to a doubleword, full-word,
or h alf- word bound ary, as desired.
(See
Fo~cing-Alignm·en1 under DS~-Define
stQ~~gg.)
The duplication factor may be
omitted altogether.
~Q1g:

If duplication is specified for an
address constant containinq a Location
Counter reference, the value of the
Location Counter used in each duplication
is incremented by the length of the
constant.

= siqn.

1.

The literal is preceded by an

2.

The duplication factor may not be zero.

3.

s-ty pe address constants may not be
specified.

Examples of literals appear throughcut
the balance of the DC instruction
discussion.

The duplication factor must be specified by
an unsigned decimal value. It causes the
constant(s) to be generated the number of
times indicated by the factor.
It is
applied after the constant has been fully
assembled, that is, after it has been
developed into its proper format.
Note
that, except in a literal, a duplication
factor of zero is permitted.
It is used to

The type subfield defines the type of
constant being specified.
From the type
specification, the assembler determines how
it is to interpret the constant and
translate it into the appropriate machine
format.
The type is specified by a letter
code as shown in Figure 4.
Further information about these
constants is provided in the discussion of
the constants themselves under gE§£~nd
Su~ii~ld 4~ __ £Qn§1~D1.
QB~£~nd-subfield_ll~~Q~iiiers

Modifiers describe the length in bytes
desired for a constant (in contrast to an
implied length), and the scalinq and
exponent for the constant.
If multiple
modifiers are written, they must appear in
--,

r----~

I CODE I
......-----t

MACHINE FORMAT

B
F

Character
·Hexadecimal
Binary
Fixed-point

H

Fixed-point

E

Floating-point

D

Floating- poin t

p
Z
A
Y
S

Decimal
Decimal
Address
Address
Address

v

Address

C
X

1-----1I
I

~Qte:

..L-

The type subfield for a character constant may be omitted, C is assumed.

L-.

Figure 4.

36

I
.----.--1

Type Codes for Constants

S/360 BaS Assembler with I/O Macros

this sequence~
lenqth, scale, exponent.
Each is written and used as describEd in
the following text.
LE]g1~~~IEB:
A length modifier may be
specified for any type of constant. It is
written as Ln, where n is an unsigned
decimal value.
The value ef n represents
the number of bytes of storage that are
assembled for the constant. No boundary
alignment is provided when a length
modifier is given.

The maximum value permitted for a length
modifier varies with the type of constant.
A character may have a length up to 256
specified, whereas the range of a
fixed-point constant is 1 to 8. Should the
specified length be greater or less than
the constant actually given, padding or
truncation occurs as necessary. If no
length modifier is present, the implied
length of that type of constant is used.
Limits on the modifiers and implied lengths
are found in ~EE§ndi~_I, a summary of
constants.
SCALE·MODIFIER~
This modifier is written
as-sn;-Where-n is a decimal value.
The
decimal value may be preceded by a sign; if
none is present, a plus sign is assumed.
The maximum values for scale modifiers are
summarized in !EE§ndi~-I.

A scale modifier may be used with
fixed-point (F, H) and floating-point (E,
D) constants only. It is used to specify
the amount of internal scaling that is
desired, as follows.
Scale·Modifier for Fixed-Point constant:
ThIs-Scale-modIfIer-specifIes-the power of
two by which the constant must be
multiplied after it has been converted to
its binary representation.
~t must fall
within the range -187 to .346.
Multiplication of a binary number by a
power of two causes the binary point to
move. It has the effect of shiftinq the
binary point away from its assumed position
in the binary field, the assumed position
being to the right of the rightmost
position. The process is comparable to the
movement of a decimal point in the
multiplication of a decimal number by a
power of ten.
The scale modifier, then, indicates
either of the following:
1.

2.

the number of binary positions to be
occupied by the fractional portion of
the binary number, or
.
the number of binary positions to be
deleted from the integral portion of
the binary number.

A positive scale of x shifts the inteqral
portion of the number x binary positions to
the left, thereby reserving the rightmost x
binary positions for the fractional
portien.
A negative scale shifts the
integral portion of the number riqht,
thereby deleting rightmost integral
positions. 1f-~§£~le~Qgifier does not
aC£Q~E~nY_~_f~~~g=Egin1-£Qn§tant cont~inin~
~fractio~1-E~£iL-~he-K£~£!iQnal part_i§
lo~i~ __ For example, if the decimal portion
of the number 987.65 is to be retained, the
statement DC FS8'987.65'is required. The
statement DC F'987.65' without the scale
factor S8 retains only the integral
portion, 987, of the number.

In all cases where positions are lost
because of scaling (or the lack of
scaling) , rounding occurs in the leftmost
bit of the lost portion.
The roundinq is
reflected in the rightmost position saved.
Sc~le_~gQifie~~Q~FIQating-Point Constant:
Only a positive scale ~odifier may be used
with a floating-point constant.
It may be
any value from 0 to 13 and indicates the
number of hexadecimal positions that the
fraction is to be shifted to the riqht.
It
is specified in this way because a
floating-point constant is always converted
to a fraction.
This fraction is
hexadecimally normalized, that is, with a
high-order hexadecimal diqit that is not
zero. Because the point is then assumed to
be to the left of the leftmost position in
the field, and cannot be moved left, the
fraction is shifted right.
Note that this
shift amount is in terms of hexadecimal
positions.

Thus, scaling that is specified for a
floating-point constant provides an
assembled fraction that is unnormalized,
i.e., contains hexadecimal zeros in the
leftmost positions of the fraction.
When
the fraction is shifted, the exponent is
adjusted accordingly to retain the correct
magnitude.
When hexadecimal positions are
lost, rounding occurs in the leftmost
hexadecimal position of the lost portion.
The rounding is reflected in the riqhtmost
hexadeci~al position saved.
EXPONENT MODIFIER:

This modifier is

wrItten-as-En~-Where n is a decimal value.

The decimal value may be preceded by a
sign; if none is present, a plus sign is
assumed.
The maximum values for exponent
modifiers are summarized in AEBgndiK-1.
An exponent modifier may be used with
fixed-point (F, H) and floating-point (E,
D) constants only.
The modifier denotes
the power of 10 by which the constant is to
be multiplied before its conversion to the
proper internal format.
Assembler Instructions

37

This modifier is not to be confused with
the exponent of the constant itself, which
is specified as part of the constant and is
explained under QEeran~Qbfield 4:·
constant. Both are denoted in the same
fashion; as En.
The exponent modifier
affects each constant in the operand,
whereas the exponent written as part of the
constant only pertairis to that constant.
Thus, a constant may be specified with an
exponent of +2, and an exponent modifier of
+5 may precede the constant.
In effect,
the constant has an exponent of +7.
Note that there is a maximum value, both
positive and negative, listed in !~~~Qi~_l
for exponents.
This applies both to
exponent modifier and exponents specified
as part cf the ccnstant, or to their sum if
both are specified.

This subfield supplies the constant (or
constants) described by the subfields that
precede it.
A data constant (all types
except A,Y,S,and V) is enclosed by single
quotation marks.
An address constant
(types ~, Y, S, and V) is enclosed by
parentheses. For types F,H,E,D,P, and Z
two or more constants may be specified in
the subfield. The constants must be
separated by commas and the entire sequence
of constants must be enclosed by single
quotation marks.
Thus, the format for
specifying the constant(s) is one of the
followinq:
Sinqle

Multiple

Co~§.t~nt

Co.!!st~nts~

'constant'
(constan t)

'constant, ••• ,constant'

If an address constant contains a
Location counter reference, the Location
counter value that is used is the storage
address of the first byte the constant will
occupy.
If an address constant is
specified (and it is a Location Counter
reference) with a duplication factor, the
donstant is duplicated with a varying
Location Counter value.
The subsequent text describes each of
the constant types and pr~vides examples.
~h~~~£!~~~fon§!~n!_==~f:

Any of the valid
256 punch combinations may be designated in
a character constant. ,only one character
constant may be specified per operand.
Since multiple constants within an operand
are separated by commas, an attempt to
specify two character constants would
result in interpreting th~ comma separating
them as a character.
The maximum length of a character
No boundary
constant is 256 bytes.
alignment is performed.
Each character is
translated into one byte.
If no lenqth
modifier is given, the size in bytes of the
character constant is equal to the number
of characters in the constant.
If a lenqth
modifier is provided the result varies as
follows:
,.

If the number of characters in the
constant exceeds the specified length,
as ~any rightmost bytes as necessary
are dropped.

2.

If the number of characters is less
than the specified length, the excess
rightmost bytes are filled with blanks.

*Permitted for F,H,E,D,P, and Z type
constants only.
All constant types except character (C),
hexadecimal (X), binary (B), packed decimal
~), and zoned decimal (Z), are aligned on
the proper boundary, as shown in !EE~ndi~
1, unless a length modifi~r is specified.
In the presence of a lengtb modifier, no
boundary alignment is performed.
If an
operand specifi~s more than one constant,
any necessary alignment applies to the
first constant only.
Thus, for an operand
that provides five full-word constants, the
first would be aligned on a full-word
boundary. The rest, however, would
automatically fallon full-word boundaries
as well.
The total storaqe requirement of an
operand is the product of the length times
the number of constants in the operand
ti~es the duplication factor (if present)
plus an~ bytes skipped for boundary
alignment of the first constant •
38

S/360 BOS Assembler with I/O Macros

Special consideration must be qiven to
representing quotation marks and ampersands
as characters.
Each single quotation mark
or ampersand desired as a character in the
constant must be represented by a pair of
sinqle quotation marks or ampersands. The
double quotation marks and ampersands count
as one character.
Only one single
quotation mark or ampersand appears in
storage.
In the following example, the length
attribute of FIELD is 12:
r

i

i

IName

10perat.ion

10perand

l-

I

I

IFIELD

IDC

IC'TOTAL IS

L--

I

i

,
no'

I
-f
I

However, in this next example, the
length attribute is 15, and three blanks
appear in storage to the riqht of the zero:

r-------T-----------.IName

10peration

,

10perand

I

length modifier is given, the constant is
handled as follows:

+-------------------1

1----4

IFJELD
IS "0'
L-______ IDC
_________ ICL15'TOTAL
______________
~

~

I

In the next example, the length
attribute of FIELD is 12, although 13
characters appear in the operand. The two
ampersands count as only one byte.

•

i

,Name

loperation

I-

I

i

,

-+------------------1

IFIELD

IDC

IC'TOTAL is &&10'

I

I

I

I

L-

I

I

I

Note that in the next example, a length
of four has been specified, but there are
five characters in the constant
IName

,

10perand

+---------~I--------·----------~

IFIELD
L-_ _ _ _ _ IDC
__________ 13CL4'ABCDE'
~

~

2.

If the number of hexadecimal digit
pairs is less than the specified
length, the necessary bits (and/or
bytes) are added to the left and
filled with hexadecimal zeros.

An eight-digit hexadecimal constant
provides a convenient way to set the bit
pattern of a full binary word.
The
constant in the following example would set
the first and third bytes of a word to 1s:
---

or--

IOperation

If the number of hexadecimal digit
pairs is greater than the specified
length, the extra leftmost bits
(and/or bytes) are dropped.

i

,Operand

I

."1('"

1.

~

'--'--~,i

i

IName

10peration

10perand

~

I

I
ITEST

IDS
IDC

+--

L-.____

ABCDE ABCDE ABCDE

,operation

---tl-

t-I

Note that the same constant could be
specified as a literal.
I Operation

,,

.~---'II----------~

IName

IName

I
.J

I

The next example uses a hexadecimal
constant as a literal and inserts 1s into
bits 24 through 31 of register 5.

On the other hand, if the length had
been specified as six instead of four, the
generated constant would have been:

~--------

lOperand

~---+-----+-

_______

The DS instruction sets the location
counter to a full-word boundary.

ABCDABCDABCD

i

,,

10F
IX'FFOOFFOO'

_ _ _ _ _.J

The generated constant would be:

I

~I~

,,

-I

I

IMVC

IAREA(12),=3CL4'ABCDE'1

L--

I

I

i

Hexadecimal constant -- X:
A hexadecimal
constantiscomprised-of one or more of the
hexadecimal digits, which are 0-9 and A-F.
Only one hexadecimal constant may be
specified per statement.
The maximum
lenqth of a hexadecimal constant is 256
bytes (512 hexadecimal digits).
No word
boundary alignment is performed.
constants that contain an even number of
hexadecimal diqits are translated as one
byte per pair of digits.
If an odd number
of digits is specified, a hexadecimal zero
is paired with the leftmost digit to make
up another byte.
If no length modifier is given, the
implied length of the constant is half the
number of hexadecimal digits in the
constant (assuminq that a hexadecimal zero
is added to an odd number of digits).
If a

I

IIC

L-

I

,Operand

,

+

15,=X'FF'

I

...L-

.J

In the following example, the digit A
would be dropped, because five hexadecimal
digits are specified for a length of two
bytes:
. - - - - - - 1 " 1 1- -

~

IName

jOperation

10perand

I

,

I

IALPHACON

IDC

I1

I
~

,
I
-I
I
I

,3XI,2 I A6F4E'

I

_ _- - - - L _ _ ___

I

The resulting constant would be 6F4E,
which would occupy the two bytes specified
by the length modifier (L2).
It would be
generated three times, as requested by the
duplication factor.
Had it been specified
as X'A6F4E', the resulting constant would
have contained a hexadecimal zero in th~
leftmost position:
OA6F4E
Binary cons~1_==~~ A binary constant is
written using .s and Os enclosed in
quotation marks.
Only one binary constant
may be specified in a statement.
Duplication and length may be specified.
Assembler Instructions

39

The maximum length of a binary constant is
256 bytes.
The implied lenqth of a binary constant
is the number of bytes occupied by the
constant including the padding necessary to
complete a byte.
The padding bit used is a
O.
Paddinq or truncation takes place on
the left.
~he following example shows the coding
used to designate a binary constant.

The number is converted to its binary
equivalent and is assembled as a full-word
or half-word, depending on whether the type
is specified as F or H.
It is aliqned at
the proper full-word or half-word boundary
if a length is not specified.
An implied
length of four bytes is assumed for a
full-word (F) and two bytes for a half-word
(H).
However, any length up to and
including eight bytes may be specified for
either type of constant by a lenqth
modifier, in which case no boundary
aliqnment occurs.

r--------.-----------.-IName

IOperation

l-

I

IBCON
IBTRUNC
IBPAD

IDC
IDC
IDC

L -_____ - L - -

IOperand

-+--,---

IB'nOnQOp
IBL1'1C0100011'
IBL1'101'

Maximum and minimum values, exclusive of
scaling, for fixed-point constants are:

.tlax

-L

2 15 -1

.tl in
-2 63
-2 31
-2 15

27-1

-2 7

2{) 3- 1

2 31 -1
BCON would have a length attribute of
one.
BTRUNC would assemble with the leftmost
bit truncated, as follows:
00100011
BPAD would assemble with five zeros as
padding, as follows:
00000101
Fixed-Point constants -- F and H:
A
fixed=point constantis writtenas a
decimal number.
The number may be an
integer, a fraction, or a mixed number
~.e., one with integral and fractional
portions) and may be followed by a decimal
exponent if desired.
The format of the
constant is as follows:
1.

The number is written as a signed or
unsigned decimal value. The decimal
point may be placed before, within, or
after the number, or it may be omitted,
in which case the number is assumed to
be an inte~er.
A positive sign is
assumed if an unsigned number is
specified Unless a scale modifier
accompanies a mixed number or fraction,
the fractional portion is lost, as
explained under ~~Rfield 3~~odifie£~.

2.

The exponent is optional.
If
specified it is written immediately
after the number as En, where n is an
optionally signed decimal value
specifyinq the exponent of the factor
10.
The eXfonent may be in the range
-85 to +75.
If an unsigned exponent is
specified, a plus sign is assumed.
The
exponent causes the value of the
constant to be adjusted by the power of
10 that it specifies before the
constant is converted to its binary
form.

40

5/360 BOS Assembler with I/O Macros

The binary number occupies the rightmost
portion of the field in which it is placed.
The unoccupied portion (i.e., the leftmost
bits) is filled. with the siqn.
That is,
the setting of the bit desiqnating the sign
is the settinq for the bits in the unused
portion of the field.
If the value of the
number exceeds the length, the necessary
leftmost bits are dropped.
A neqative
number is carried in 2s complement form~
If the presence or absence of a scale
modifier is such that the rightmost portion
of the number must be dropped, rounding
occurs.
A duplication factor is applied
after the constant is converted to its
binary format and assembled into the proper
number of bytes.
A field of three full-words is generated
from the statement shown here.
The
specified numbers occupy the rightmost
three bytes, with the siqn propoqated
through the rest of the word.
This
constant then appears three times in
storaqe.
The location attribute of CONWRD
is the address of the leftmost byte of the
first word, and the length attribute is
four, the implied length for a full-word
fixed-point constant. The expression
CONWRD+4 could be used to address the
second constant (second word) in the field.
I

i

IName

IOperation

----,-

I

I

IOperand

---+

ICONWRD
IDC
13F'658474'
L-________ __________,__ ______ •___________
~i

~i

I

~

I
.J

The next statement causes the qeneration
of a two-byte field containing a negative
constant.
Notice that scaling has been
specified in order to reserve six bits for
the fractional portion of the constant.

.--

i

i

IName

IOperaticn·

IOperand

I

I

I

IHALFCON
L-________ IDC
____________ IHS6'-25.93'
____________________
~I

~I

~

The next constant (3.50) is multiplied
by 10 to the -2 before being converted to
its binary format.
The scale modifier
reserves eight bits for th:efractional
portion.
r-----------ri------------~--------------------~i

IName

loperaticn

~

IOperand

·~I------------+-

I

---1

IFULLCON
IDC
IHS8'3.50E-2'
I
L---__ ____________i -____________________
~I

~I

The same constant could be specified as
a literal:
'--~-------------~i·-------

IName

I Operation

1-----+

IOperand
I
17,=HS8'3.50E-2'

L-_---1.

I

I

IAH

The final example specifies three
constants.
Notice that the scale modifier
requests four bits for the fractional
portion of each constant. The four bits
are provided whether or not the fraction
exists.
r-----

IName

--,-

i

-----,

I-

ITHREECON

IOperation IOperand
I
---+
I DC
I FS4 '10 I 25.3, 100'

L-

I

I

,
I

~

Machine format for a floatinq-point
number is in two parts: . the portion
containing the exponent, which is sometimes
called the chara~teristic, followed by the
portion containing the fraction, which is
sometimes called the mantissa.
The number
specified as a floating-point constant must
be converted to a fraction before it can be
tr~nslated into the proper format.
For
example, the constant 27.35E2 represents
the number 27.35 times 10 to the 2nd.
Represented as a fraction, it would be
.2735 times 10 to the 4th, the exponent
having been modified to reflect the
shifting of the decimal point.
The
presence of an exponent modifier, which
will pertain to each constant in the
operand, may affect the exponent (see
QEgran£2ubfield·3:---11odifigrs). Thus, the
exponent is also altered before being
translated into machine format.
Once the
constant is converted into the proper
fraction and exponent, each is translated
into its binary equivalent and arranqed in
machine floating-point format.
The translated constant is placed in a
full word or a double word, depending on
whether the type is specified as E or D.
The characteristic·occupies the first byte,
and the fraction takes up the remaininq bit
positions. The constant is aligned at the
proper word or double word boundary if a
length is not specified.
An implied length
of four bytes is assumed for a full word
(E) and eight bytes is assumed for a double
word (D).
However, any length up to and
including eight bytes may be specified for
either type of constant by a length
modifier, in which case no boundary
alignment occurs.

FlQ~ti.!!g-Poi.!!j:_Constants-==~~:

A
floating-point constant is written as a
decimal number, which may be followed by a
decimal exponent, if desired. The number
may be an integer, a fraction, or a mixed
number (i.e., one with integral and
fractional portions). The format of the
constant is as follows:
1.

The number is written as a signed or
unsigned decimal value. The decimal
point may be placed before, within, or
after the number, or it may be omitt~d,
in which case, the number is assumed to
be an integer.
A positive sign is
assumed if an unsigned number is
spec ified.

2.

The exponent is optional. If
specified it is written immediately
after the number as En, where n is an
optionally signed decimal value
specifying the exponent of the factor
10. The exponent may be in the range
-85 to +75. .If an unsigned exponent is
specified, a plus sign is assumed.

within the portion of the floating-point
field allocated to the fraction, the
hexadecimal point is assumed to be to the
left of the leftmost hexadecimal digit, and
the fraction occupies the leftmost portion
of the field.
The fraction is normalized
(no leading hexadecimal zeros), unless
scaling is specified. If the rightmost
portion· of the frac.tion must be dropped
because of length or scale modifiers,
rounding will occur.
Negative fractions
are carried in true representation, not in
the 2s complement form.
Any of the following statements could be
used to specify 46.415 as a positive,
full-word, floating-point constant; the
last is a machine-instruction statement
with a literal operand.
Note that the last
two constants contain an exponent modifier.

Assembler Instructions

41

---------r------

I
I
I
I
I
I

I Operation
I
IDC
IDC
IDC
I DC
I DC
IAE

IOperand
I
IE'46.415'
IE'46415E-3'
IE' +464 .15E-1'
IE'+.4641SE+2'
I EE2' .46415'
I 6, =E E 2 ' • 46 41 5 '

L

I

I

IName
~

as

i

I
------~

I
I
I
I
I
I
I

Each of the following would be generated
floating-point constants.

double~word

i

I

I

IName

,Operation

10perand

1---'-t-------t____
I FLOAT

I DC

L

1 . 1 . -

----,

If no length modifier is given, the
implied length for either constant is the
number of bytes the constant occupies
(taking into account the format, sign, and
possible addition of zero bits for packed
decimals). If a length modifier is given,
the constant is handled as follows~
1.

If the constant requ~res fewer bytes
than the length specifies, the
necessary number of bytes is added to
the left. For zoned decimal format,
the decimal digit zero is placed in
each added byte. For packed decimals,
the bits of each added byte are set to
zero.

2.

If the constant requires more bytes
than the length sp~cifies, the
necessary number of leftmost digits or
pairs of digits is dropped, depending
on which format is specified.

I

-----J

I DE+4' +46, -3.729, +473' I
I

De,£imal Constan.:!:s --_R-l!nd·Z: A decinial
constant is written as a signed or unsigned
decimal value. If the sign is omitted, a
plus sign is assumed. The decimal point
may be written whereverd€sired or may.be
omitted. Scaling and exponent modifiers
may not be specified for decimal constants.
The maximum length of a decimal constant is
16 bytes. No word boundary alignment is
performed.
The placement of a decima~ point in the
definition does nbt affect the assembly of
the constant in any way, because, unlike
fixed-point and floating-point constants, a
decimal constant is not converted to its
binary equivalent. The fact that a decimal
constant is an· integer, a fraction, or a
mixed number is not pertinent to its
generation. Furthermore, the decimal point
is not assembled into the constant~ The
programmer may determine proper decimal
point alignment eithei by defining his data
so that the point is aligned or by
selecting machine-instructions that will
operate.on the data properly (i.e., shift
it for purposes of alignment) •
If zoned decimal format is specified
(Z), each decimal digit. is translated into
one byte. The translation is done
according to the character set shown in
Appendix A. The rightmost byte contains
the sign as well as the rightmost digit.
For packed decimal format (F), each pair of
decimal digits is translated into one byte.
The rightmost digit and the sign ~re
translated into the rightmost byte. The
bit configuration for the digits is
identical to the configurations for the
hexadecimal digits 0-9. as shown in
Hexadecimal Self-Defini~~. For both
packed and zoned decimals, a plus sign is
translated into the hexadecimal digit C,
and a minus s~gn into the digit D.
.
If an even number of packed decimal
digits is specified, one digit will be left
42

unpaired, because the rightmost digit is
paired with the sign. 'Therefore in the
leftmost byte, the leftmost four bits will
be set to zeros and the rightmost four bits
will contain the odd (first) digit.

S/360 BOS Assembler with I/O Macros

Examples of decimal constant definitions
follow • .
I

IOperation
r.I
1FIRST I DC
ISECONDIDC
I THIRD IDC
IFOURTHIDC
L-

,

I

j

I Name

I

10perand

+IP'+1.25'

----.

IZ'-S43'
IZ'79.68'
IPL3'79.68'

I

.1
I
I
I

.J.

.J

FIRST would be assembled in two bytes,
vith the one on the right containing the
positive sign and the five specified~
SECOND would require three bytes; four
bytes would be assembled for THIRD. The
length of three specified for FOURTH would
be filled with zeros on the left paired
with the seven, and the assumed plus' sign
paired with· the eight~n the rightmost
byte.
The following example illustrates the
use of a packed decimal literal.
i

i

I

IName
lI

I Operation
I
IUNPK

I Operand

L-

I

+-IOUTAREA,=PL2'+2S~
I

--.

,
I

I
I

ADDRESS CONSTANTS: An address constant is
a storage address that is translated into a
con'stant Address constants are normally
used £or initializing base registers to
facilitate the addressing. of storage.
Furthermore, they provide the means of
communicating between control sections of a

multisection program. However, storage
addressing and control section
communication are also dependent on the use
of the USING assembler instruction and the
loading of registers. Coding examples that
illustrate these considerations are
provided in Proqr~mming with the Using
Instr.!!,ction.
An address constant, unlike other .types
of constants, is enclosed in parentheses
There are four types of address constants:
A, Y, S, and V.

In the following example, the field
generated from the statement named ACONST
contains a constant which occupies four
bytes. Note that there is a Location
Counter reference.
The value of the
Location Counter will be the address of the
first byte allocated to the constant. The
second statement shows the same constant
specified as a literal (i.e., address
constant literal).
r------,.--

IName

I

operation

IACONST

Co~£1exRelocatable

Expressions:
These
expressions contain two or three unpaired
relocatable terms or a negative relocatable
term in addition to any absolute or paired
relocatable terms that may be present.
A
complex relocatable expression can only be
used to specify an A-type or y-type address
constant. In contrast to relocatable
expressions, complex relocatable
expressions may represent a negative value.
A complex relocatable expression might
consist of external symbols (which cannot
be paired) and designate an address in an
independent assembly th~t is to be linked
and loaded with the assembly containing the
address constant.
A-ly~.-!ddre~~onstant:
This constant is
specified as an absolute, relocatable, or
complex relocatable expression.
(Remember
that an expression may be single term or
multiterm.)
The value of the expression is
calculated as explained in the General
IniQrmation section, under Evalu1!tio1Lof
Ex££~ssiQ~§.
The maximum value allowed in
this case, however, is 2 31 -1. The implied
length of an A-type constant is four bytes,
and the value is placed in the rightmost
portion.
Alignment is to a full-word
boundary, unless a length is specified. A
length modifier may be used, in which case
no alignment will occur.
The length that
may be specified depends on the type of
expression used for the constant; a length
of 1-4 bytes may be used for an absolute
expression, while lengths of 3 and 4 bytes
may be used for a relocatable or complex
relocatable expression.

The A-type address constant can be used
to reference external data, in which case
EXTRN and ENTRY points are required.
In this example, ADEND will be assembled
as the value (or the address of the
leftmost byte) of DUMP.
r------~ir-------·-----ri------------------------,

IName

IOperation

I-

I

IADEND IDC

'"

IOperand
I
IA(DUMP)

I
,
I

,

IL----__

DC
L__________

~~

Operand
A(*+4096)
4,=A (*+4096)

_ L_ _ _ __ _ _

]Qte: When the Location Counter reference
occurs in a literal, as in the load
instruction above, the value of the
Location Counter is the address of the
first byte of the instruction.
y-1Y.E~Address CQnstan1:
A y-type address
constant has the characteristics and format
of the A-type constant discussed above
except for the following:

,.

The constant is assembled as a 16-bit
value and aligned to a half-~ord
boundary.

2.

The implied length is two bytes.

3.

If length specification is used, a
length of two to four bytes may be
designated for a relocatable or complex
expression and 1 to 4 bytes for an
absolute expression.

S-TY~ Address Constant:
The S-type
address constant is used to store an
address in base-displacement form.

The constant may be specified in two
ways:
1.

As an absolute or relocatable
expression, e.g., S{BETA).

2.

As two absolute expressions, the first
of which represents the displacement
value and the second, the base
register, e.g., S(400(13».

The address value represented by the
expression in (1) will be broken down by
the assembler into the proper base register
and displacement value. An S-type constant
is assembled as a half word and aligned on
a half-word boundary. The leftmost four
bits of the assembled constant represents
the base register designation, the
remaining 12 bits the displacement value.
If lenqth specification is used, only
two bytes may be specified. s-type address
Assembler Instructions

43

constants may not be specified as literals.
A duplication factor may not be used.
V-Type Address-Constant:
This constant is
used to reserve storage for the address of
an exteinal symbol that is used in
branching to other programs.
A V~type
coristant may not be used for external data
'references. The constant is specified as
one relocatable symbol, which need not be
identified by an EXTRN statement. Whatever
symbol is used is ~ssumed to be an external
symbol by virtue of the fact that it is
supplied in a V-type address constant.
Note that'specifying a symbol as the
operand of a V-type constant ,does not
constitute a definition of the symbol for
this assembly.
Until the program is
loaded, the value of the assembled constant
is zero. The implied lenqth of a V-type
address constant is four bytes, and
boundary alignment is to a full word.
A
length modifier may be used to specify a
length of either three or four bytes, in
which case no such boundary alignment
occurs.
In the following example, four bytes
will be reserved on a full-vord boundary,
and filled with zeros untii loadtng time.

r--------,-------------Tt'----------IName
IQperation 10perand
~
I
I
I VCCNST I DC
I V (SORT)
~------~------------~

tis -- DEFINE STORAGE
The DS instruction is used to reserve areas
of storage and to assign names to those
areas.
The use of this instruction is the
preferred way of symbolically defining
storage for work areas, input/output areas,
etc.
The size of a storage area that can
be reserved by using the DS instruction is
limited'only by the maximum value' of the
Location Counter. Because the maximum
length specification is 256, an area larger
than 256 must be specified vith a
duplication factor.
For example, the
statement DS 2CL200 can be used to reserve
400 positions of main storage.
t

IName
l
IA symbol
lor blank

I Operation

I
I

I
I
I

I
L-

I
IDS

I

~

---,
10perand
I
--l
I
lOne operand
I
Iwritten in the
I
Iformat described
I
lin the following
I
I text
I

~

I

-----I

The format of the DS operand is
identical to that of the DC operand;
44

S/360 BOS Assembler with I/O Macros

exactly the same subfields are employed and
are written in exactly the same seguence as
they are in the DC operand, with the
following exception:
The specification of data (subfield 4)
is optional in a DS operand, but it is
mandatory in a DC operand.
If a DS operand specifies a constant in
subfield 4, (and no length is specified in
subfield 3) the assembler determines the
length of the data and reserves the
appropriate amount of storage.
It-does not
assemble-the-constant.
The ability to
specify data and have the assembler
calculate the storage area that would be
required for such data is a convenience to
the programmer. If he knows the general
format of the data that will be placed in
the storage area during program execution
all he needs to do is show it as the fourth
subfield in a DS operand.
The assembler
then determines the correct amount of
storage to be reserved, thus relieving the
programmer of length considerations.
If the DS instruction is named by a
symbol, its ~alue attribute is the location
ot the leftmost byte of the reserved area.
The length attribute of th~ symbol is the
length (implied or explicit) of the type of
data specified.
Any positioning required
for aligning the storagear~a to the proper
type of boundary is done before the address
value is determined. Because no data is
assembled at this time, skipped bytes are
not zeroed.
Each field type (e.g., hexadecimal,
character, floating;;;' point) is associated
with certain characteristics (these are
summarized in !EEgngix-f). The associated
characteristics will determine which
field-type code the programmer selects for
the DS operand and what other information
he adds, notably a length specification or
a duplication factor.
For example, the E ,
floating-point field and the F fixed-point
field both have an impli€d length of four
bytes. The leftmost byte is aligned to a
full-word boundary. Thus, either code
could be specified if it were desired to
reserve four bytes of storage aligned to a
full-word boundary.
To obtain a length of
eight bytes, one could specify either the E
or F field type with a length modifier of
eight. However, a duplication factor would
have to be used tor~serve a larger area,
b~~ause the maximum length specification
for either type is eight bytes.
Note also
that specifying length would cancel any
special boundary alignment.
In contrast, packed and zoned decimal (P
and Z), character (C), hexadecimal (X), and
binary (B) fields have an implied length of
one byte.
Any of these codes, if used,

would have to be accompanied by a length
modifier, unless ju~t one byte is to be
reserved. Although no alignment occurs,
the use of these field types permits
greater latitude in length specifications
the maximum for these types being 256
bytes.
However, if a symbol that is
defined by a P or Z field type with a
length modifier greater than 16 is used as
an operand in a decimal machin~
instruction, a length error will occur.
Unless a field of one byte is desired,
either the length must be specified for the
C, X, P, Z, or B fieid types, or else the
data must be specified (as the fourth
subfield), so that the assembler can
calculate the length.

~ecial

Uses of

~Duplication-Fac~or

FORCING ALIGNMENT:
The Location Counter
can be forced to a double-word, full-word,
or half-word boundary by using the
appropriate field type (e.g., D, F, or H)
with a duplication factor of zero. This
method may be used to obtain boundary
alignment that otherwise would not be
provided. For example, the following
statements would set the Location counter
to the next double-word boundary and then
reserve storage space for a 12S-byte field
(whose leftmost byte would be on a
double-wbrd boundary).

Ir - - - - - r j - - - - - - - - - - - T

To define four 10-byte fields and one
100-byte field, the respective DS
statements might be as follows:

.--

IName IOperation

I
,
I
I

~'--~~j------------~'--------

~

'I

I
I DS
IAREA IDS

~

II

I Operation
I
IFIELD IDS
IAREA IDS
IName

IOperand

I-

I

L-----1..

I

14Ct.,0
ICL'OO

Although FIELD might have been specified
as one 40-byte field, the preceding
definition has the advantage of providing
FIELD with a length attribute of '0.
This
would be pertinent when using FIELD as a
machine- instruction operand governed by a
length consideration.
Additional examples of DS statements are
shown below:

.-----y-

-------------------,

10perand
I
10D
ICL12S

I

I

IName IOperationlOperand
I
I
I
I
-I
lONE
DS
CLSO(one SO-byte field,
J
length attribute of SO)
ITWO
DS
SOC (SO one-byte fields,
I
length attribute of
I
one)
ITHREE DS
6F(six full words, length
I
attribute of four)
IFOVR DS
D(one double word, length
I
attribute of eight)
IFIVE DS
4H(four half-words,
I
length attribute of
I
t~o)
'--~

Note: A DS statement causes the storage
area to be reserved but not set to zeros.
The programmer should not assume that the
area will contain zeros when the prbgram is
loaded.

DEFINING-FIELDS·OF·ANAREA: A DS
instruction with a duplication factor of
zero can be used to assign a name to an
area of storage without actually reserving
the area .' Additional DS and/or DC
instructions·may then be used to reserve
the area and assign names to fields within
the area (and generate constants if DC ~s
used) •
For example, assume that SO-character
records are to be read into an area for
processing and that each record has the
following format:
positions
positions
positions
positions
positions

5-'0
11-30
31-36
47-54
55-62

Payroll Number
Employee Name
Date
Gross Wages
Withholding Tax

The following example illustrates how DS
instructions might be used to assign a name
to the record area, then define the fields
of the area and allocate the storage for
them. Note that the first statement names
the entire area by defining th~ symbol
RDAREA; the statement gives RDAREA a length
attribute of SO bytes, but does not reserve
any storage. Similarly, the fifth
statement names a 6-byte area by defining
the symbol DATE; the three subsequ~nt
statements actually define the fields of
DATE and allocate storage for them.
The
second, ninth, and last statements are used
for spacing purposes and, therefore, are
not named.

Assembler Instructions

45

r----,---------,-IName
IOperation
IOperand

i

•

I

IName IOperation

.----t-------t------------1
OCL80
CI.4
CL6
CL20
OCL6
CL2
CL2
CL2
CL10
CL8
CL8
CL18

IRDAREA IDS
IDS
I
IPAYNO
IDS
INAME
IDS
IDATE
IDS
IDAY
IDS
IMONTH
IDS
IYEAR
IDS
IDS
I
IGROSS
IDS
IFEDTAX IDS

IL---_ _ ID~
______
~

I

,

T

i

I

I

ICCW

L-

I

IOperand

I

----+

•

12,READAREA,X'48',80
_ _ _ _ _ _ JI

Note that the third operand sets bits
31-39 to zero, as required. The bit
pattern of this operand is as follows:
36-39
100{)

32-35

0100

If there is a symbol in the name field
of the CCW instruction, it is assigned the
address value of the leftmost byte of the
channel command word. The length attribute
of the symbol is eight.
The internal
machine format of a channel command word
is:

~

CCW -- DEFINE CHANNEL COMMAND WORD
r-

The CCW instruction provides a convenient
way to define and generate an eight-byte
channel command word aligned at a
double-wcrd boundary. The format of the
CCW instruction statement is:

,

,

~

All fcur operands must appear.
They are
written, from left to right, as follows:
1.

An absolute expression that specifies
the command code.
This expression's
value is right-justified in byte 1.

2.

An absolute or relocatable expression
specifying the data address.
The value
of this expression is right-justified
in bytes 2-4.

3.

An acsolute expression that specifies
the flags for bits 32-36 and zeros for
bits 37-39. The value of this
expression is right-justified in byte
5.
(Byte 6 is set to zero.)

4.

An acsolute expression that specifies
the count.
The value of this
expression is right-justified in bytes
7-8.

The following is an example of a CCW
statemen t:
46

S/360 BOS Assembler with I/O Macros

~----------

I Usage

-------"

~--+----+-

----,
r-----,--I
IName
IOperationlOperand
I
j------+_
I
1A symboll CCW
I Four operands,
lor blankl
Iseparat~d by commas,
I
I
I specifying the conI
"
Itents of the channel
I
1
Icommand word in
I
l i t h e format
I
I
I described in the
IL-_ _ _ _ _ I _ _ _ _ _ _ Ifollowing
text
_ _ ___
~

I

IByte I Bits

11
I 0-7
I Command code
12-4
I 8-31
I Data address
15
I 32-36 I Flags
1
I 37-39 I Must be zero
16
I 40-47 1 Set to zero
17-8
I 48-63 I Count
L-_ _-'--____- - - L -

,
I

The listing control instructions are used
to identify an assembly listinq and
assembly output cards, to provide blank
lines in an assembly listing, and to
designate how much detail is to be included
in an assembly listing.
In no case are
instructions or constants generated in the
object proqram.
If listing control
statements are used within a DSECT, they
are treated as comments and not executed.
For example, if the EJECT instruction is
used within a DSECT, it does not cause the
listing to be ejected.

TITLE -- IDENTIFY ASSEMBLY OUTPUT
The TITLE instruction enables the
programmer to identify the assembly listinq
and assembly output cards.
The format of
the TITLE instruction statement is as
follows:
rl-----~i--------~--T.----------------------,

IName

IOperation

10perand

I

J

I

I

,

IName
I or
Iblank
I

ITITLE
I
I
I

IA sequence of charlacters, enclosed in
Isingle quotation
I marks

I
I
I
I

*-------~-------

If the first TITLE statement in a
program appears before the START statement,
it may contain an entry in the name field.
This entry may contain one to four
alphabetic or numeric characters in any
combination.
Any additional characters are
ignored. The contents of the name field
are punched into columns 73-76 of all the
output cards for the program, except in
those cards produced by means of a REPRO or
PUNCH assembler instruction.
An entry in
the name field of any other TITLE statement
is ignored.
The operand field of a TITLE ~tatement
may contain up to 100 characters, enclosed
in single quotation marks. A continuation
card may be used, if necessary. Any
characters in excess of 100 are ignored.
The contents of the operand field are
printed at the top of each page of the
assembly listing. The TITLE statement
itself does not appear in the source
listing.

EJECT -- START NEW PAGE
The EJECT instruction affects only the
assembly listing and provides a conveRient
way to separate program routines in the
listinq.
This instruction causes the
remainder of the present page to be skipped
and the listing to continue at the top of
the next page, below the heading line.
If
the ejection occurs at the first line of
the page, the entire page is skipped.
If two or more EJECT instructions are
issued in succession, a complete page is
skipped for each EJECT after the first, and
the listing continues on the page that is
in printinq position after the last EJECT
has been executed.
Each page that is
skipped is printed with a heading line,
however.
The format of the EJECT instruction
statement is:
r-------r-----------~

[Name

IOperation

I----_f_
A program may contain more than one
TITLE statement.
Each TITLE statement
provides the heading for pages in the
assembly listing that follows it, until
another TITLE statement is encountered.
Each TITLE statement encountered after the
first statement c~uses the listing to be
advanced to a new page (before the heading
is printed).

(Blank

(EJECT

I

I

._------,,

+-

INot used; any
loperand is treated
1as a comment

I'
"

IOperand

,

I
I
I
I
J

The EJECT statement itself does not
appear in the source listinq.

SPACE -- SPACE LISTING
For example, if the following statement
is the first TITLE statement to appear in a
program, and it appears before the START
statement:

.---,,Name

.IPGM1

~

,Operation

~----+

The SPACE instruction is used to insert one
or more blank lines in the listinq. The
format of the SPACE instruction statement
is as follows:

,Operand

INam~

-------+,-----------.--------~

ITITLE

I'FIRST HEADING'

I
IBlank
I'

I

I

, Operation
I
ISPACE
I

IOperand

--------.,

+-

IA decimal value
lor blank

,
I

'--

then PGM1 is punched into all of the output
cards (columns 73-76), except those
produced by a REPRO or PUNCH statement, and
this heading appears at the top of each
page: FIRST' HEADING.
If the following statement occurs later
in the same program:
I

ii

I

A decimal value is used to specify the
number of blank lines to be inserted in the
assembly listing.
A blank operand causes
one blank line to be inserted.
If this·
value exceeds the number of lines re~aininq
on the listinq paqe, the statement will
have the same effect as an EJECT statement
The SPACE statement itself does not appear
in the source listinq.

,Name I Operation 1Operand
(
1----+1
, ____ ,TITLE
'A NEW
HEADING'
____
____ , ____
.____________________
J

PRINT -- PRINT OPTIONAL DATA

then PGM1 is still punched into the output
cards, but each following page begins with
the headinq:
A NEW HEADING.

The PRINT instruction is used to control
printinq of the assembly listing.
The
format of the PRINT instruction statement
is:

~

~~

~

~

,

Assembler Instructions

47

r-------,------------~i-----------------------,

IName

IOperation

~---+--

IBlank
L-

IOperand

,----f-I-

IPRINT

I

zeros are printed in the assembly listinq.
However, if:

,

lOne
to three operandsl
________

I '

IName

~,

I Operation

I~----+I-

Ii

I

IOperand

-------+---------------------~

II PRINT

I ________________________
NODA TA

~I

~

One to three of the following operands
are used:
is the last PRINT statement to appear
before the DC statement, only eight bytes
of zeros are printed in the assembly
listing.

ON

A listing is printed.

OFF

No listing is printed.

GEN

All statements generated by
macro-instructions are printed.

NOGEN

statements generated by
macro-instructions are not
printed.
However, the
macro-instruction itself and
messages resulting from the
MNOTE instruction, if used, will
appear in the listing.

DATA

Constants are printed out in
full in the listing.

NODATA

Only the first eight bytes (16
hexadecimal digits) or the first
constant, whichever is shorter,
of the assembled data, is
printed on the listing.

A proqram may contain any number of
PRINT statements. A PRINT statement
controls the printing of the assembly
listing until another PRINT statement is
encountered.

r----~--------~------------------____,

I Operation

IOperand

I

r-----+------+-----------------~

I

IPRINT

I-

I

ION,NODATA,GEN

I
~

For example, if the statement:
.---~

~----------------------,

IName

I Operation

IOperand

I

1

IDC

IXT,256'00'

I

r----+------+---------------------1
'----~--------~

appears in a program, 256 bytes of zeros
are assembled.
If the statement:

.------r
IName

----~i~----------·------·-------,

I Operation

r----+
~

1L-_ _ _ I _
PRINT
_ _ _ _,

IOperand
I
I DATA

is the last PRINT statement to appear
before the DC statement, all 256 bytes of
48

S/360 BOS Assembler with I/O Macros

If program control instructions are used
within ·a DSECT, they are treated as
comments and not executed.
For example, if
the XFR instruction is used within a DSECT,
it does not cause any transfer card to be
generated.
If the user plans to write his own macro
instruction routines, the assembler
instructions ICTL (input format control) ,
ISEQ (input sequence checkin~, and LTORG
(begin literal pool) may not be used as
instructions within the macrQ routine.

until the first PRINT statement (if any)
is encountered, the following is assumed:
IName

The program control instructions are used,
to specify the end of an assembly, to set
the Location Counter to a value or word
boundary, to specify the placement of
literals in storaqe, to check the seguence
of input cards, to indicate statement
format, and to punch a card. Except for
the LTORG and CNOP instructions, none of
these assembler instructions qenerate
instructions or constants in the object
program.

I
,
I
I

ICTL -- INPUT FORMAT CONTROL
The ICTL instruction allows the programmer
to alter the normal format of his source
proqram statements. The IeTL statement
~~§1-~reced~ all other statements in the
source program and may be used only once.
The format of the IeTL instruction
statement is as follows:

.--IName
r--

i

I Operation

/Blank
I

I
1 ICTI,
I

L----

I

--r-

i

,

IOperand
I
I
11-3 decimal values ofl
Ithe form b,e,c,
I
~

I

Operand b specifies the beqin column of
the source statement. It must always be
specified, and must be from 1-40,
inclusive. Operand e specifies the end
column of the source statement. The end
column, when specified, must be from 41-79,
inclusive; when not specified, it is

assumed to be 71. The column after the end
column is used to indicate vhether the next
card is· a continu·ation card. Operand c
specifies the continue column of the source
statement. The continue column, vhen
specified, must he from 2-40 and must be
greater than b. If the continue column is
·not specified, the assembler assumes that
there are no continuation cards and all
statements must be contained in a single
card.
If no ICTL statement is used in the
source program, the assembler assumes that
1, 71, and 16 are the begin, end, and
continue columns, respectively.

The next example designates the begin
column as column 25. Since the end column
is not specified, it is assumed to be
column 71. No continuation cards are
recognized because the continue column is
not specified.

I

I ICTL

125

L-

I

I

I Operand
I

1-----+

Sequence checking is only performed on
statements contained in the source proqram.
Statements generated by a macro are not
checked for sequence.

The basic operating system Linkage Editor
requires Phase Definition (PHASE) and
Include Module (INCLUDE) cards. The REPRO
Assembler instruction aliows the inclusion
of such cards into the object proqram deck
to eliminate the necessity of manually
inserting them.
The REPRO Assembler instruction causes
the Assembler to punch a duplicate (in
80-80 format) of the card immediately
folloving the REPRO instruction. The
punched cards resulting from REPRO
instructions appear at the same point in
the assembled text as they appeared in the
source program. If any REPRO instructions
precede the START instruction, or the
implied start position (if no START
instruction is used), the cards punched
viII precede the ESD cards for the
assembly.

--,

r---~----------~------

I Operation

An ISEQ statement vith a blank operand
terminates the operation. Checking may be
resumed with another ISEQ statement

REPRO -- REPRODUCE FOLLOWING ·CARD

The ICTL card itself is processed under
normal format and any non-blank character
punched into column 72 indicates the
presence of continuation cards. Therefore,
column 72 should be left blank because
continuation cards are not required for the
ICTL card. If column 72 contains any
non-blank character, the card following the
ICTL card is treated as a continuation card
and reading begins in column 16, causing
columns 1-15, inciusively, to be ignored.

IName

Comparison of adjacent cards makes use of
the eight-bit internal collating sequence

I
I
I
---l

The format of the REPRO Assembler
instruction is as follows:
r------~----

IName
I
IBlank
I
I

ISEQ -- INPUT SEQUENCE CHECKING
The ISEQ instruction is used to c~eck the
sequence of input cards. The format of the
ISEQ instruction statement is as follows:

~

Operation I Operand
REPRO

L-_ _ _ -'-

+-

I Not used; any
I operand is treated
I as a comment

~

PUNCH -- PUNCH A CARD
r----r-

I

----,

IName IOperation IOperand
I
IBlanklISEQ
ITwo decimal values of
I the form l,r; or blank
I
I

r--+L.

I

I

The operands I and r, respectively,
specify the leftmost and rightmost columns
of the field in the input cards to be
checked. Operand r must be equal to or
greater than operand 1. Operand I must be
greater than the end column plus one. The
field specified by operands 1 and r must
not be greater than seven bytes.
Sequence checking begins vith the first
card following the ISEQ statement.

I
I
I
I

The PUNCH assembler instruction may be used
to perform the same functions as the REPRO
assembler instruction. The PUNCH assembler
instruction causes the data in the operand
to be punched into a card. As many PUNCH
statements may be used as are necessary.
The format is:
I

-Tj---

.IName I Operation I Operand
I
-+---------__+_
1Blank I PUNCH
t 'PUNCH A CARD'
I

Using character representation, the
operand is written as a string of up to 8"0
characters enclosed in single quotation
Assembler Instructions

49

marks.
A continuation card may be used, if
necessary.
Any characters in excess of 80
are ignored.
All characters, including
blanks, are valid.
The position
immediately to the right of the left
quotation mark is regarded as column one of
the card to be punched.
The assembly
program does not process the data in the
operand of a PUNCH statement other than
causing it to be punched in a card.
The punched cards resulting from PUNCH
instructions appear at the same point in
the assembled text as they appeared in the
source program. If any PUNCH instructions
precede the START instruction, or tne
implied start position (if no START
instruction is used), the cards punched
will precede the ESD cards for the
assembly.

I

II

I

IName

10peration

IOperand

I

IA relocatable exIpression or blank

I
1

.1----+---IBlank

1

~

___

+-----------1

IORG

1

~

_ _ _ _ _ _L -_ _ _ _ _ _ _ _ _ _ _ _ _ _ J

Any symbols in the expression must have
been previously defined.
The unpaired
relocatable symbol must be ~efined in the
same control section in which the ORG
statement appears.
The Location Counter is set to the value
of the expression in the operand.
If the
operand is omitted, the Location Counter is
set to a location that is one byte higher
than the maximum location assiqned for the
control section up to this point.

The main facility provided by the PUNCH
instruction over t~e REPRO instruction is
the capability of the macro generator to
substitute values for symbolic parameters
or SET variable symbols in the operand of a
PUNCH instruction appearing in a macro
definition. This allows such things as the
controlled generation of phase names.

An ORG statement must not be used to
specify a location below the beginning of
the control section in which it appears.
For example, the statement:
I

,

IName
IOperation
i - - - + I~---.
1
IORG

I

A transfer card is used by the basic
operating system Linkage Editor program to
define the transfer point or entry point of
a phase, or overlay.
The XFR Assembler
instruction is provid€d to cause the
generation of a tr~nsfer card in th~
assembled text in the same- location that
the XFR instruction appeared in the source
program.

r-

i

IName

I

XFR instruction is as

J

Operation I Operand

I----+-----+_
IBlank I
L-

XFR

1*-500

,

I

1

I A relocatable symboll

.I.--

ORG -- SET LOCATION C0UNTER
The ORG instruction is used to alter the
setting of the Location Counter for the
current control section.
The format of the
ORG instruction statement is:
S/360 BOS Assembler with I/O Macros

I

._ _ _ _ .J

If it is desired to reset the Location
Counter to a value that is one byte beyond
the highest location yet assiqned (in the
control section), the followinq statement
would be used:
rl------~i------------~

IName 1Operation IOperand
II+-I
IORG
I
___________ L-'--~

The symbol in the operand field must
appear within the assembly or b~ previously
defin~d as either an entry or external
symbol.

50

1

+--------------1

is invalid if it appears less than 500
bytes from the beginninq of the current
control section.

XFR -- GENERATE A TRANSFER CARD

t~e

,

IOperand

I

The format of
follows:

,

----------------,1
I
1

----J

If previous ORG statements have reduced
the Location Counter for the purpose of
redefining a portion of the current control
section, an ORG statement with an omitted
operand can then be used to terminate the
effects of such statements and restore the
Location Counter to its highest settinq.

LTORG -- BEGIN LITERAL POOL
The LTORG instruction causes all litelals
thus far encountered in the source proqram
up to the LTORG statement (either from the
beginning of the program or from a previous
LTORG statement) to be assembled at
appropriate boundaries starting at the
first double-word boundary following the
LTORG statement.
The format of the LTORG
instruction statement is:

...------T

~

lName

IOperation

IOperand

ISymbol
lor
,blank

ILTORG
I
I

INot used; any
loperand is treated
las a comment

I

I

1------+--------+-----------1
L--

I
,
I

Operand b specifies at which byte in a
word or double word the Location Counter is
to be set; b can be 0, 2, 4, or 6. Operand
w specifies whether byte b is in a word
(w=4) or double word (w=8). The following
pairs of band ware valid:

I

The symbol represents the address of the
first byte of the literal pool. It has a
lenqth attribute of one.

Any literals used after the last LTORG
statement in a proqram are placed at the
end of the first control section. If there
are no LTORG statements in a program, all
literals used in the program are placed at
the end of the first control section. In
these circumstances the pro~rammer must
ensure that the first control section is
always addressable. This means that the
base address register for the first control
section should not be changed through usage
in subsequent control sections. If the
programmer does not wish to reserve a
register for this purpose he may place a
LTORG statement at the end of each control
section thereby ensuring that all literals
appearing in that section are addressable.

0,4
2,4
0,8
2,8
4,8

Beginning of a word
Middle of a word
Beqinning of a double word
Second half word of a double word
Middle (third half word) of a
double word
Fourth half word of a double word

6,8

Fiqure
word that
Note that
locations

5 shows the position in a double
each of these pairs specifies.
both 0,4 and 2,4 specify two
in a double word.

Double Word
Word
Half Word
Byte

CNOP -- CONDITIONAL NO OPERATION

A

The CNOP instrqction allows the programmer
to align an instruction at a specific word
boundary. If any byt.es must be skipped in
order'to align the instruction properly,
the assembler insures an unbroken
instruction flow by generating no-operation
instructions. This facility is useful in
creating calling sequences consistinq cf a
linkage to a subroutine followed by
parameters such as channel ccmmand words
(CCW) •

II
I

Byte

I

Word
Half Word

Half Word

I

I

!

A

Byte I Byte
i

~

Figure--5'~

II
I

0,4
4,8

2,4
2,8

0,4
0,8

Byte

IName

L

I

2,4
6,8

IOperation

,Operand

---------------,

,

,

I
I

,0,8
12,14

I
I

I CNOP
IBALR

+-----------------~

I
I

I

I

I Operation
I

I

ICNOP
,BALR

I

I

1
I

ITwo decimal terms
lof the form b,w

I

+

I
I

ICNOP
I

I

~

~I----~I-

I

r-----.-----------~

IBlank
I

: Byte

has no effect; it is merely printed in the
assembly listing.
However, this sequence:

IName

~----+-

I

.L

The format of the CNOP instruction
statement is as follows:
IOperand

I

Byte I Byte

Assume that the Location Counter is
currently aligned at a double-word
boundary Then the CNOP instruction in this
sequence:

IName

I Operation

Half Word

CNOP Alignment

rl------.----------~

The CNOP instruction insures the
alignment of the Location Counter setting
to a half-word, wor9, or double-word
boundary.
If' the Location Counter is
already properly aligned, the CNOP
instruction has no effect.
If the
specified alignment requires the Location
Counter to be incremented, one to three
no-operation instructions are generated,
each of which uses two bytes.

I

I

IOperand

I

,,

------------~--------~
+16,8

,2, 14

____________________J

.L--

causes three branch-on-conditions
(no-operations) to be qenerated, thus
aligning the BALR instruction at the last
half-word in a double word as follows:
Assembler Instructions

51

•

i

i

IName

I operation

IOperand

r-~---------+I

I

I BCR
IBCR
IBCR
IBALR

I
I
I

L-__ ~

10,0
10,0
10,0
12,14

______~,~__________~--------~

After the BALR instruction is generated,
the Location counter is at a double-word
boundary, thereby insuring an unbroken
instruction flow.
END -- END ASSEMBLY
The END instruction terminates the assembly
of a program.
It may also designate a
point in the program or in a separately
assembled program to which control may be
transferred after the program is loaded.
The END instruction must always be the last
statemen t in the source program.
The format of the END instruction
statement is as follows:
r-

IName

T.------------~i----------------------~

,Operation

1-------+
IBlank
I
L-

52

lEND

I
~'

IOperand

+-- -.--------:1
IA relocatable exI pression or blank

____~ ___--L-

S/360 BOS Assembler with I/O Macros

The operand specifies the point to which
control is transferred when loading is
complete. This point is usually the first
machine-instruction in the program, as
shown in the following sequence

•IName

•IOperation

I
INAME
IAREA
IBEGIN
1
I
I

I
I CSECT
IDS
IBALR
IUSING
I
I

I

I

1
i

··

·
lEND

1

,

IOpe~and

I
I
ISOP
12,0
1*,2
I
I
I
IBEGIN
..L-

,I
I
I

I
I
I

I
I
1
.J

If the END statement contains a symbolic
address in the operand field, the Assembler
automatically inserts the transfer address
in the END card.
If the user plans to write his own
macro-instruction routines, the END
instruction may not be used as an
instructio~ within his ma6ro routines.
No~~:
If the operand contains an external
symbol, only a single-term relocatable
expression is allowed.

MACRO INSTRUCTION-STATEMENTS·

The assembler provides a macro· system to
reduce the amount of repetitive coding
required for general routines that must be
reused a number of times in the same or
different programs.
For example, the
routines for transferring records from disk
to main storage , checking for accuracy,
and deblocking to obtain a single· record
for processing are used for any logical
input file on disk.
such routines involve
many instructions that can be written once
and, with modification of addresses, can be
used repeatedly in any number of programs.
The macro system is ccmposed of two
basic parts:
instr~tiQll~.

1.

Source-program macro

2.

A ma~liE!:ar'y of prewrit ten flexible
routines (called ~efifi!tions).

A direct relationship exists between these
parts.
That is, a single macro instruction
written in the source program is replaced,
in the assembled object program, by the
routine taken from the macro library.
The
macro library routine consists of a
predetermined series of many instructions.
Thus, the system derives its name.
A
definition of macro is "of or involvinq
large 'quan ti ties. " For one in struction,
many instructions are assembled.
The proper routine is included in the
object program by the matching of mnemonic
operation codes. ~herefore, the exact same
Op code is used in the macro instruction
and in the identification of the
corresponding set of instructions in the
macro library.
As the macro-library instructions are
assembled, they are tailored to fit the
particular problem program. This is done
by a sUbstitution process.
The first
instruction of a macro routine (after the
macro definition header) in the macro
library is a .E!:0t0!:i.E~ stateme.nt. This is
a pattern that consists of variable
symbolic operands (called parameters) for
which values are substituted when the macro
routine is used by a specific program.
The
macro instruction that is included in the
user's program specifies the ~!:~mete!:
valyes (commonly a~breviated to the term
parameter) that are to be sUbstituted in
the macro-library routine when it is
assembled.
An example of this is:

MULT &MIER'&MCAND'&IPROD

Prototype in
Macro Library

Instructions to
perform the
multiplication
(Model Statements)
Macro In·structions
A MULT RATE, HOURS, GROSS
} in two
. different
B MULT COST,PIECES,TOTCOST problem
programs
(® and @ )

This illustrates the prototype statement of
a multiplication routine that could be u~ed
by any program to multiply any two factors
and store the product in a specified
loca tion.
Program ® might use the macro
to multiply !:~te times ho~ and store the
result in a.field labeled gEQ§§.
Program
@ might use the same macro from the macro
library to multiply cost times pieces-to
obtain total cost.
Each program specifies in the macro
instruction the values (parameters) that
are applicable to its own job (rate or
cost, hours or pie6es, gross or total
cost).
Then when the macro routine is
assembled, these parameter values are
substituted for the parameters in the
prototype statement.
The parameter values
are also substituted in all the
instructions that follow the prototype to
actually perform the multiplication.
The
statements following the prototype are
knovn as model statements. For the
multiplication example, the complete
routine might be:
MACRO -- Macro Definition Header
&NAME MULT

&MIER,&MCAND,&PROD

&NAME L

3, &MCAND
2,&MIER
3,&PROD

M

ST

J Model

Prototype
Statement
Statements

MEND -- Macro Definition Trailer
In both illustrations the & charact~r
preceding the symbolic name is part of the
syntax of the macro definition language
(see the Macro Defillition-Language
Macro Instruction Statements

53

publication, as listed on the front cover
of this manual).
IBM provides a number of prewritten
macro library routines and specifies the
macro instructions that can be used by the
programmer to call these routines from the
library.
Other routines can be written by
the user and stored in the macro library.
User-written routines must follow the same
rules as the IBM routines.
The macros
supplied by IBM and discussed in this
publication are grouped in four categories:
•
•
•
•

Input/output control macros
File definition macros
Supervisor-communication macros
Supervisor-assembly macros.

MACRO INSTRUCTION FORMAT
A macro instruction, whicb is a source
language statement, is interpreted by the
assembler.
The assembler us;es the macro
definition (macro library routine) to
replace the single statement with many
assembler language statements.
For correct
interpretation, the format of the macro
instruction must correspond to the format
of the prototype statement in the macro
definition. Therefore, the format of the
prototype'dictates the form in which the
macro instruction must be written in the
problem program.
The name field in the macro instruction
may contain-a-symbolic name if the name
field of the prototype has a parameter.
The Q.Eer~ti.2l!_iield in the macro
instruction must contain exactly the same
mnemonic operation code as the prototype
(for example, MULT).
This may be any
alphameric code with a maximum of five
characters, provided the first character is
a letter.
The parameters in the QE~!~n~iie!Q of a
macro instruction must be written in the
same format as those in the operand field
of the prototype. Either of two types of
formats can be used:
1.

positional format

2.

Keyword format.

Each type of parameter has a set of rules
that must be followed.

In this format the order and placement of
the parameter values in the macro
instruction must correspond exactly with
the order and plac~ment of the parameters
in the prototype statement. Each parameter
54

S/360 BOS Assembler with I/O Macros

except the last must be followed by a
comma.
Thus, in the previous illustration:
RATE
HOURS
GROSS

corresponds to MIER
corresponds to MCAND
corresponds to PROD

If a parameter is to be omitted in the
macro instruction, while forlowing
parameters are included, a comma must be
inserted to indicate the omission.
In this
way, the proper parameters both before and
after the omission correspond.
However, no
commas need to be included after the last
parameter used.
If the parameters cannot be contained in
the operand field of one card, up to 49
continuation cards may be used. The
continue column of each card (except the
last) must contain a continuation punch
(any nonblank character), as in any
assembler language card.
The maximum
length of a parameter is the same as for an
assembler symbol--eight characters.
When
one or more continuation cards are used,
parameters must fill each card to the
continuation column with no intervening
blanks.
(A blank indicates that the card
contains no more parameters.)
Keyword Format
This format provides a direct mnemonic
association between the macro instruction
and the prototype statement. The exact
parameters .used in the prototype are
specified (without the & ) in the macro
instruction, cwhere they are equated to the
value for this job. Thus, they have the
form of:
keyword followed by an equal sign
followed by the value to be substituted in
the assembled routine.
For example:
MIER=RATE, MCAND=HOURS, PROD=GROSS
Because the association of parameters is
performed through the use of the keywords,
the parameters in the macro instruction may
appear in any order, and any that are not
ne~ded may be omitted.
This association is
not dependent upon the order in which they
are written. The term to the right of the
equal sign must not exceed eight
characters.
Different keyword parameters may be
punched in the same card, each followed by
a comma, like the positional type.
Or,
they may be punched in separate cards.
(When continuation 'cards are used for a
keyword format macro, the parameters need
not fill the operand field to the
continuation column.)
MIER=RATE,
PROD=GROSS~

MCAND=HOURS

SOURCE PROGRAM
(After)

ASSEMBLER
OPERATIONS

SOURCE PROGRAM
(Before)

1
2

1

2-----Source
Program
Statements

Locate Macro
Library Routine
Source
Program
Statements

15----16 Macro Instruction
17-----

----I~

15----16 Macro Instruction

Perform Indicated Selection
and Substitution
Merge with
}
Source Program ~

~Macro

Routine

Source
Program
Statements

Figure 6.

{ 1:
•

-==_=~-_=~-_==-

: =_-:=_

Schematic of Macro Processing

WhftIl separate cards are used for a set of
parameter specifications each card except
the last must be punched with a comma
immediately following the parameter and a
continuation punch in column 72. ·Comments
may be punched in any card if at least one
space is left after the comma, or, in the
last card, after the parameter.

ASSEMBLY OF THE MACRO
At program assembly time, the macro
instruction specifies which routine is to
be called from the macro library. The
routine is extr~cted, tailored by the
parameters in the macro instruction, and
inserted in the program (Figure 6).
The
complete program now consists of both
source-program statements and tailored
model statements from the macro library in
asse~bler languaqe.
In subsequent phases
of the assembly, the entire program is
processed to produce the machine-language
object program.

•

Opening and closing files

•

Transferring records

•
•

Blocking and deblocking records
Checking and writing disk or tape label

•

Error

checkin~.

IOCS handles files of records in the
followinq I/O units:
IBM 1442 Card Read-Punetl
IBM 2501 Card Reader
IBM 2520 Card Read-Punch or 2520 Card
Punch
IBM 2540 Card Read-Punch
IBM 1403 Printer
IBM 1404 Printer (continuous forms
only)
IBM 1443 Printer

IN,RQT/OUTPUT CONTROL MACROS

IBM 1445 Printer

A number of macro routines are provided by
IBM for the input/output control (IOCS) of
records from various I/O units.
These
routines control such functions as:

IBM 2311 Disk Storage Drive
IBM 2401, 2402, 2403, 2404 Maqnetic
Tape Units (If
Macro Instruction Statements

55

variable-length records are
written on 7-track tape, the
Data Conversion special
feature is required.)
IBM 1052 Printer-Keyboard (One 1052 is
supported, for operator
communication only.
It is
attached to the m~ltiplexor
channel. )

Supervisor may be assembled to include
routines for a combination of units that,
in total, require more than 4096 bytes.
Similarly, the number and size of the
routines included in the Supervisor affect
the number of main storage positions
available for a user's problem program.
For detailed information about Supervisor
and logical laCS main-storage requirements,
see the Prog£ammer's Guide, as listed on
the front cover of this publication.

IBM 2671 Paper Tape Reader
IBM 1285, 1287 Optical Readers
STR (Synchronous Transmitter Receiver)
Devices connected by leased or dial
lines through·an IBM Synchronous Data
Adapter - Type I, on an IBM 2701 Data
Adapter Unit. ,The following devices
are supported:
a.
1009 Data Transmission Unit
b.
1013 Card Transmission Terminal
c.
1974 II Data Transmission Terminal
d.
1978 Print, Read, Punch Terminal
e.
System/360, Model 30, 40, 50, 65 or
75 with a 2701 Data Adapter Unit
attachEd.
f.
System/360, Model 20 with a
Communications Adapter
g.
7701 ~ 7702 Magnetic Tape
Transmission Terminal
h.
77" Data Communication Unit.
BSC (Binary Synchronous Communication) IBM
2701 Data Adapter Unit eguipped with an
IBM Synchronous Data Adapter--Type II,
connected by leased or dial line to a
remote IBM System/360, Model '30, 40,
50, 65, 67 (working in 65 mode), or 75.
The remote CPU is. equipped with an IBM
2701 Data Adapter Unit with an SDA II
or an IBM 2703 Transmission Control
Unit with Binary Synchronous featUres.
No1g:

When BSC support routines are used,
a minimum of 16~ of main storage is
required.

laCS supports any channel configuration
up to one multiplexor channel and two
selector channels.
Both IBM-supplied system programs and
user problem programs can use magnetic
tape. However, the main storage required
for physical and logical laCS for both tape
and disk will probably make this unfeasible
in systems with less than 16K bytes of main
storage. For example, IBM-supplied system
programs assume that the system Supervisor
(including physical but not logical laCS)
will occupy a maximum of 4096 bytes of main
storage, leaving 4096 bytes (in an 8K
system) available for the execution of the
system programs.
If, however, the user's
installation includes many different types
of I/O units and features, the system
56

S/360 BaS Assembler with I/O Macros

When the user's program is executed, the
portion of the problem program that
communicates with laCS and with the
Supervisor must be located in the first 64K
of main storage. This includes channel
command words (CCW), command control blocks
(CCB), file definition~ (DTF), and program
ch~ck, interval timer, and
operator-communication routines.
Furthermore, whenever the 'problem program
is executed in a disk-resident system, the
last two routines (interval-timer, arrd
operator communication), if used, must not
be located in the first 2500 main storage
positions above the end of the Supervisor.

The input/output control is considered to
consist of two parts:
physical laCS and
logical laCS. Physical IO~~ controls the
actual transfer of records between the
external medium and main storage.
That
is, it performs the functions of issuing
channel commands and handling associated
I/O interruptions.
Physical laCS consists
of the following routines:
Start I/O. routine
Interruption routine
Channel scheduler
Device error routines.
These physical laCS routines are part of
the Supervisor, which is permanently
located in lower main storage while problem
programs are being executed.
logical·IOCS controls those functions
that a user would have to perform to locate
a logical record for processing.
A logical
record is one unit of information in a file
of-like units; for e·xample, one employee's
record in a master payroll file, one
part-number record in an inventory file,
etc.
One or many logical records may be
included within one physical record, such
as a physical disk or tape record (from gap
to gap).
The term 1~ical~10CS-refers to
routines that perform the following
functions:
• Blocking and deblocking records
• switching between I/O areas when two
areas are specified for a file

• Handling end-of-file and end-of-volume
conditions
• Checking/writing labels.
The logical laCS routines required for
the execution of a problem program are
assembled with that program.
The
particular routines required are determined
from the definitions of the logical files
used by the program.
Logical IOCS uses physical laCS to
execute I/O commands whenever it determines
that a transfer of data is required.
For
example, if a file consists of blocked
records and a block has been read into main
storage (Figure 7), logical laCS merely
makes each record in succession available
to the u~er, until the end of the block is
reached.
No physical laCS is required.
When logical laCS determines that the last
record in the block has been processed,
however, i t requests physical laCS to start
an I/O operation to transfer the next
physical record. (gap t6 gap) into main
storage.
In the illustration, only logical
laCS (LIO) is required to make records 2
and 3 (and 5 and 6) available;
however,·physical laCS (PIO) is also
required to make record·4 available
(records 4 through 6 are transferred in one
block) •

Block of 3 Records in Main Storage
Rec~rd 3
(Record 6)

Record 2
(Record 5)

Record 1
(Record 4)

lIO
for
Record 2 (5)

LlO

for
Record 3 (6)

lIO and PIO
for
Record 4

UO = Logical IOCS
PIO = Physical IOCS

Figure .7.

Physical laCS vs Logical IOCS

Both logical IOCS macros (such as GET,
PUT, READ, WRITE, etc) and physical IOCS
macros (such as EXCP and WA~T) are
available to the programmer for handling
records.
The logical laCS macro routines
cause all the functions of both logical and
physical lOtS to be performed for the·
programmer.
When he issues an imperative
GET instruction for a record, for example,
that record is transferred to main storage
, if necessary, and it is available for the
execution of tbe next program instruction.
The physical laCS routines completely
bypass the logical laCS functions (for
example, blocking and deblocking).
They
permit the problem program to utilize
physical IOCS functions directly. To
transfer a physical record (such as a disk

or tape record), for example, the problem
program issues an EXCP macro ins~ruction
(execute channel program). This causes a
request for data transfer to be placed in
the channel scheduler, and program
execution immediately continues with the
next problem-proqram instruction.
However,
the disk or tape record will not be
available· in main storage until some later
time. Therefore when the record is needed
for processing, the program must test to
find out if the transfer has been
completed. This is accomplished by issuing
the WAIT macro instruction.
The functions of physical and logical
IOCS routines are shown schematically in
Figure 8.

The logical IOCS routines. process records
in· consecutive order, in random order by •
the Direc~ Access Method (DAM), or randomly
and sequentially by the Indexed Sequential
File Management System (ISFMS).
Consecutive processing applies to all files
in serial-..type I/O d:evices (such as card
reader, tape, printer, etc), and to records
on 2311' disk when they are processed in a
serial-type order.
The DAM and ISFMS types
of processing apply only to files of disk
records.
Other logical laCS routines allow
processing with STR (Synchronous
Transmitter Receiver) devices, or allow
CPU-to-CPU Binary Synchronous
Communication.
Consecutive Processinq~ Consecutive
processing is used to read/write and
process successive records in a logical
file.
For example, card records are
processed in the order the cards are fed;
tape records are processed starting with
the first record after a header label and
continuing through the records to the
trailer label; disk records are processed
starting with a beginning disk address and
continuinq in order throuqh the records 6n
successive tracks (and possibly cylinders)
to the ending address.
A consecutive file on disk is contained
within one or more sets of limits, which
are specified by Job Control XTENT cards.
If the logical file consists of more than
one set of limits, IOCS will automatically
process each set as needed by the user.
The records within each set must be
adjacent and contained within one volume
(disk pack).
However, the sets need not be
adjacent, and they may be on one or more
volumes.
A file written on disk by the
direct access method can also be processed
consecutively, if desired.
The basic macros used for consecutive
are GET and PUT.
These

~rocessing

.Macro Instruction statements

57

Using
Logical
10CS

Physical
IOCS
(Channel
Scheduler)

Logical
IOCS

Problem
Program

Issue GET ------~. {provide Record (Deblock)
~
and Return to Problem Program
-ORNext Instruction ~
If I/o Required, Issue EXCP ..
(after GET)
'"

and WAIT ...

' " { When I/o Ccxnplete,
Return to Problem
Program

-

Input
Device

Determine Channel.
place Request in Queue
if Channel Busy, and Return
to Logical 10CS.
If Channel Not Busy, }
Issue START I/O·
~I/o Starts
and Return to Logical 10CS.
When I/o Complete, .go } ......... I/O Com lete
p
through Interrupt Routine

--------- --------- --------- --------- --------Using
Physical
10CS

Set Up CCW and Issue

EXCP----------~

Next Instruction ...._ _ _ _ _ _ _ _ _ _ _ _ _ __
(after EXCP)

Next Instruction
(after WAIT)

Figure 8.

When I/o Complete, go }
through Interrupt Routine ~1/0 Complete

Schematic Example of Retrieving a Record Usinq Loqical IOCS (One I/O Area)
or Physical IOCS

instructions overlap data transfer and
processing as much as possible. The extent
of overlap depends on the user's I/O area
assignment.- In any case when a GET or PUT
has been executed, the tIansfer of data is
complete before the instruction followinq
the GET or PU~ is executed.·
Di~~~i~!cces~_~~!hod_1DAM1:

The direct
access method is used to process disk
records in a random order. Records stored
at any location within the logical file can
be processed at any time in the proqram.
IOCS locates a disk record for processinq
by referring to record-location references
supplied by the problem program.
The
location reference consists of two
parts:
a track reference and a record
reference. The !rack referenc~ specifies
the particular track, or the first of
multiple tracks, to be searched for a
specified record. The reccrd reference may
be the record key, if records contain key
areas, or the record ID (identifier), which
is available in the count area of each disk
record.
IOCS seeks the spEcified track and
searches for the specified record en that
58

Determine Channel.
Place Request in Queue
if Channel Busy, and Return
to Problem Program.
If Channel Not Busy, }~ I/o Starts
Issue START I/O
and Return to Problem Program.

S/360 BOS Assembler with I/O Macros

track, or on that track and on succeeding
tracks in the cylinder. Because reference
to the records is in random order, all
packs of a multipack file must be on-line
for any functions performed by the Direct
Access Method.
The basic macros used for the direct
access method of processing are READ and
WRITE.
Variations within these macros
permit records to be read, written,
updated, replaced, or added to a file.
Thus, this method provides a means of
creating and maintaining a logical file in
a random order.· When a READ or WRITE
instruction is executed, the actual I/O
operation is either started or placed in a
queue for later execution. Therefore, when
another problem program instruction
requires that the transfer of data be
complete, a test must be made.
A WAITF
macro is provided for this.
In£~~ed~~~gy~ntial Fil~~~n~ement-Svstem

(ISFMS) :
The indexed sequential file
management system is used to process disk
records either in random order or in

sequential order by control information.
Both orders utilize the centrol information
of the records (such as employee number,
part number, customer number, etc.), which
must be available in the key area of each
disk record. Random processing means that
any record stored at any location in the
logical file can be processed at any time
in the problem program. The user merely
supplies IOCS with the key (control
information) of the desired record. IOCS
searches for the record and makes it
available for processing.
In sequential processing, IOCS makes a
series of records available, one after the
other, in order by the control information
(key) in the'records. The user specifies
which record he wants first. Then IOCS
retrieves the succeeding records (cn
demand) from the logical file, in key
order, until the problem program specifies
that the operation is to be terminated.
ISFMS provides the means of creating an
organized file (loading) and then adding
to, reading from, and updating records in
that file. The file is organized
originally from records that have heen
pre-sorted by their control information.
As the records are loaded onto the disk
pack, IOCS constructs indices for the
logical file. These indices will permit
individual records to be found quickly and
easily in subsequent processing operations.
The indices are created in such a way that
specific records can be retrieved randomly,
or all records can be retrieved
sequentially. One method can be performed
as readily as the other. If records are
added to the file at some later time, IOCS
updates the indices to reflect the new
records.
The basic macros used for the indexed
sequential system of processing are
READ/WRITE and GET/PUT. READ and WRITE are
used for random opera±ions, and GET and PUT
are used for sequential operations. When a
READ, WRITE, GET, or PUT instruction for a
record is executed, the operation is
complete before the next instruction in the
problem program is executed~

conversion of the standard STR transmission
code (fixed count four-out-of-eight [4/8])
to or from EBCDIC (used internally in the
System/360) •
Where the STR devices are attached over
a dial network, logical IOCS provides the
macro instruction DIALO to aid in
establishing the connection.
Binar~_~nchronous

Logical IOCS provides macro support
routines for sending and receiving data in
a CPU-to-cPU communications environment.
Both CPU's use identical line control
procedures.
Logical IOCS provides READ/WRITE level
macro instructions, which simplify the
process of sending data to or receivinq
data from a remote System/360 by the
problem program. The CNTRL macro
instruction provides the facility for
handling basic BSC line control functions.
Where the CPU's' are connected by a dial
line, logical IOCS provides the IDIAL macro
instruction to handle establishinq the
connection and to provide the optional
facility for ID-verification.
Macro Instructions
Generally two types of macros are required
for processing the records in a logical
file: one declarative file-definition
macro, and one or more imperative macros.
The file-definition ,macro describes the

logical~~ indicateS~he-type of

processing to be used for the file, and
specified main-storage areas for the filer
Six file-definition macros are provided for
defiriing files processed by logical IOCS
mTFSR, DTFDA, DTPIS, DTFSN, DTFBS, and
DTFRF), and one for disk or tape files
processed by physical IOCS (PTFPH). Which
of these applies to a particular file is
determined by the type of processing used
for the file (see Types of processing).
The macros and their use are: '
DTFSR

Define The file in ~e]ial-~ype
device. This macro is used in
conjunction with consecutive
processing of records in any I/O
device.

DTFDA

Define The File for the Direc~
Access method of processinq. This
macro is used whenever disk
records are to be processed in a
random order by the direct access
method.

PrQ£essi~ith~~ynchronousTransmitter

Receiver . (STR) Devices: Logical IOCS
provides macro routines for the
transmission of data to, and the reception
of data from, an STR device. All STR
devices use identical data transmission
codes and line control procedures.
Logical IOCS provid€s READ/WRITE level
macro instructions to simplify the use of
STR devices by the problem program.
Another macro instruction, CNTRL, provides
STR line control. The CDCNV (code
conversion) macro provides for the

communication- (BSC)

DTFIS

Define The File for the Indexed

~equentIal system of processinq.

Macro Instruction statements

59

This macro is used whenever a file
is organized by the in~exed
sequential file management system
and is to be processed by that
system.
DTFSN

]!efine .The 1:ile for ~Yl!chronous
Transmitter-Receiver use.
This
macro is used for processing in a
Tele~processing environment with
STR devices.

DTFRF

Define The File for ReFerence.
This macro'Is used wIth the DTFSN
macro and the DTFBS macro to
permit the problem program to
reference the information in 'the
channel command block (CCB).

DTFBS

Qefine lhe file for ~inary
Communication use.
This macro is used for processing
in a CPu-to-cPU communications
environment.

user '·s problem program.
Imperative macros
executed by the Indexed Sequen~ial File
Management System (ISFMS) make use of
literals, and the literal pool must be
addressable any time these macros are
executed.
Thus the pool must be available
in each phase. Furthermore, it must be
available in each control section (CSECT)
within a phase if base registers are
changed between control sections.
Therefore, a LTORG statement should be
included at the end of each control section
whenever disk records are to be processed
by ISFMS. If a user defines only one·
control section, he must include a LTORG
statement to ensure the placement of
literals at the end of his control section,
because multiple control sections are also
generated by ISFMS.

~ynchronous

DTFPH

Define The File for processing by
g]ysical IOeS. This macro is used
only if ,a disk or tape file with
standard labels is to be processed
by physical IOCS.
No other files
processed by physical laCS require
definition.

Each file definition macro requires a
set of keyword parameter entry cards
~igure 9) to define the file.
At assembly
time these cards must precede the problem
program. The details of these entries are
described in the section entitled File
Definition Macros. The definition-oi-a
file-is utilized-when an imperative macro
instruction (such as GET, PUT, READ, WRITE,
etc.)
is issued in a prcblem program
statement.
If a GET "is issued, for
example, the file definition supplies such
factors as-:
•

Record type and length

•

Input device from which the record is
to be retrieved

•

Main-storage area where the record is
to be located for processing by the
problem program.

File definition macros and imperative
macros that refer to the file definitions
m~st be assembled together.
That is, all
file definitions must be asse~bled with the

60

S/360 BaS Assembler with

Iio

Macros

Imperative·macro·instructions are
included in the problem program,
They
perform such functions as opening a file,
making records available for proc~ssing,
writing records that have been processed,
etc.
The macro instructions provided by
IBM for input/output control (Figure 10)
are presented in this section in the
following groups.
Initialization:

OPEN and LBRET

Processing Records Consecutively: GET,
PUT, RELSE, TRUNC, READ, WAITF, RDLNE,
DSPLY, RESCN, CNTRL, CHNG, and PRTOV
Processing Disk Records by the Direct
Access Method: READ, WRITE, WAITF,
and CNTRL
Processing Disk Records by the Indexed
Sequential System: SETFL, ENDFL,
WRITE, READ, SETL, ESETL, GET, and PUT
Processing with STR Devices:
SOPEN,
DIALO, READ, WRITE, CNTRL, CDCNV,
SCLOS.
Processing Records by Physical
IOCS: CCB, EXCP, WAIT, WAITM, and
CHNG
Binary synchronous
Communication: BOPEN, IDIAL, READ,
W~ITE, CNTRL, BCLOS, and ERRPT.
Writing Checkpoint Records:
Completion:

CHKPT

CLOSE, LBRET, and FEOV.

IBM

........

IBM Sy.t11lll360 Aaembler CodtJIg PDI'III

......... U.L ...

l --PROGUM
_ _ _ _ _ _ _ _ _ _- - _ - . -_ _ _ _-.f PUNCHING
It-:GUI'::::-HIC--1I-t--tI-It--t--1I_t-I,,1'$i 1LAGl'iCiiOt" ,,-,

I:,:

~<

Ix

ICI~

j,<

1-; :,,,':'. Ar':;;','i:'"k;i.:.'~.

I'

I

I

:',
'.

I~

,~~~;iC('.:~

.'~-~ ~,~
i

Figure 9.

PI.a.

1

I'
i

ft

TI. 1"1' ,

i

~

,,' IX :':~:;': I ; ; ,
.; tx ,it' ~;,' ?- ~\ ;,

II

i

I

0'

I
ldefttificofion"

"c-

I

I

IPAGE

I
I

U

I

I

I
I

II

DIT IF 115

i

I I

II GRAPHIC

STA"MENT

.0 Opo~tJ

I'

:

'~";"

IBM Syatlml360 Aa18mbler Coding Farm

""-

"

I I

i
I I,

IPROGUM
I-- - - - - - - - - - - - - - - - - - r - - - - - - . f PUNCHING
INSTRUCTIONS
IPROGRAMMER
DATE

,

if' ';'

,':I·:} ;.I", ::"I·!.

IBM

I·

::,'"

I

IAT~lo,.

-,

'f."

X

I

-I

,:~f.;:;,,"

I

I

11 :

"i'l,

," :::Y,','
!

i

I

1

.... c -

"

vIL:=IY:E 51,

11 A,1. lAI J :c

'"

IAIL f"ls!l '7trl"

1/'

I
I

!
i

It

1... ,_, .. 1 . . .

I

,

,

·... 1"

"I«CI~

11.~i§"I.

I

.

,

:

'I.

1.1'~~~I~~!I.ftl-

Iftl'VII:

,,",

I

~.

..

60

.30

I

1

I

20

I'

I"~

1

I.

!

.:I

I

~~'~~;bf;'

r~

~~

I

I

,',

,,'~.

1<

r,

"

A'
~~

',' ' .. I.·" I'.:':':
~.~~~:

i

Sample DTFSR and DTFIS Macro Instruction

Macro

Inst~uction

Statements

61

TYPE OF PROCESSING WITH LOGICAL 10CS
Indexed Sequential
System

Consecutive

·c

MACRO INSTRUCTION
QI

.~

Q
~

0

::>
QI
a.
~
.~

"t
c

Cl

~

...r:::
0

c

d"I
l()

~Q;
ol() CQI
~"'O

~a:::

M
"I

"
.~

"E

~

~

E

>
.~

0

a.

4:

QI

I.()

I"-

t

-0 C
"I I-

~

~

0

.s

4:

~

V)

X

X

X

X

X

X

X

~

a..

to

to

~

~

iL
"'0
C

0
0

"'0
"'0

0
"'0
C

V)

U

"t

a:::

0

a.c

£~

>.. I"- a.

QI
~~

Q;
c

"'0

:::l

c..

.2
i:
QI

:::l
IT
Q)

~

.:;0
QI

0
a:::

lV)

Q

8.a.
:::l

V)

U

V)

a::I

..J

4:

u

Vi

>:r:
c..

Initialize
OPEN
SOPEN
BOPEN
DIALO
IDIAL
LBREP
Process
Transfer Records
GET
PUT
READ
WRITE
RELSE II
RDLNE
TRUNC7
WAITF
EXCP
WAIT
WAITM
CDCNV
DSPLY
RESCN
Set Mode
SETFL
ENDFL
SETL
ESETL
Non- Date Operations
CNTRL
CHNG 8
PRTOV
CCB
Write Checkpoint Records
CHKPT

X

X

X

X

X1
X
X
X
X

X

X

X
X4

X
X

X

X3
)(S

X

X

X
X

X

X

X1C
X11

X

X

X

X

X

X

X
X
X
X

X

X

X
X

X
X

X
X

X
X
X

X
X

X

X

X10
X

X

X11
X1
X
X
X
X
X

X
X

X

X

X

X

X

X

X
X
X

X

X

X

X

X

X

X

X

X

X

Complete
CLOSE
LBRET ~
FEOV
SCLOS
BCLOS
ERRPT
Notes:

62

X

X

X

X

X

X

X

X

Macro Instructions for Input/Output Control

S/360 BOS Assembler with I/O Macros

X1
X
g
X

X

1. Required only for disk or tape files with standard labels.
2. Applies only if DTFSR, DTFDA, or DTFPH LABADDR is specified.
3. In the 2540, GET normally reads cards in the read feed. If TYPEFLE=CMBND is specified, GET reads
cards at the punch - feed - ·read station.
4. PUT rewrites an input disk record if UPDATE is specified.
5. In the 1442, 2520, or 2540, PUT punches an Input card with additional information if TYPEFLE =CMBND
is specified.
6. Applies only to blocked input records.
7. Applies only to blocked output records.
8. Applies only when two selector channels and one or more 2- channel, simultaneous- read- while- write tape
contra I units are installed.
9. Applies only to output tape files with standard labels.
10. Applies only to journal tape processing.
11'. Applies only to document processing.

Figure 10.

X
X
X

X
X
X

INITIALIZATION
Before the first record can be read from
any input file or transferred to any output
file by logical IOCS macro instructions,
t~at file must be readied for use by
issuing an OPEN instruction. This applies
to logical files in all input/output units
available in the system:
card readers,
carrl punches, magnetic tape ·units, disk
drives, paper tape reader, printers,
optical readers, and display units.
When
physical IOCS macro instructions will te
used for a given file, OPEN is required for
that file only if standard labels on disk
or magnetic tape are to be checked or
written.

Whenever files of records are written en
disk, each disk pack (volume) must contain
standard labels to identify the-pack and
the logical files(s) on the pack. When
logical IOCS is used for a file, the laCS
routines read, check, and/or write standard
disk labels.
When physical IOCS is used,
laCS processes the labels if the DTFPH
macro instruction is included in the user's
program.
The entry TYPEFLE must be
specified to indicate whether the file is
an input file (rea~ and check labels) or ~n
output· file (read and check old labels and
write new labels).
The standard labels include one volume
laRg1 for each pack and one or more-iIlelaR~1§ for each logicq,l file on the pack.
The following paragraphs describe briefly
the organization of labels on disk packs.
Additional information about disk labels is
given in the BOS Prog~~m~~£~_Guide.
Volume Labels:

The standard volume label
(pack) and
offers volume protection.
It is always the
third record on cylinder 0, track O.
The
first two records on this track are Initial
Program Loading (IPL) records.
The
volume-label record consists of a count
area, a 4-byte key area, and an aD-byte
data area.
Both the key area and the first
four bytes of the data area contain the
label idsntifier VOLle The remaining 76
bytes of the data area contain other
identifying information such as the volume
serial number, and the address of the set
of file labels for the pack (See Standard
Fi1g LaQ€ls). The volume label is
generally written once, when the disk pack
is received, by an IBM-supplied utility
program.

identIfies~he entire volume

The standard volume label may be
followed by one to seven additional ~2lu~g
laQ~l§ (starting with record 4 on cylinder
0, track 0).
These labels must contain the
label identifier VOL2, VOL3 etc in the

fou~-byte key areas and in the first four

bytes of the data areas.
The other 76
bytes may contain whatever information the
user requires. The additional volume
labels are also written by the utility
program that writes the standard volume
label.
However, IOCS does not· make them
available to the user for checking or
rewriting when problem programs are
executed.
These labels are always bypassed
by the OPEN routines.
Standard File Labels: The standard file
labels identify the logical file, give its
loc~tion(s) on the disk pack, and offer
file protection.
The labels for all
logical files on a pack are grouped
together and stored in a specific area of
the pack_
The number of labels required for any
one logical file is affected by the file
organization (see ~~~rd_fil~~Label
Formats) and by the number of separate
areas of the pack (extents) used by the
file.
The data records for a logical file
may be contained within one area of the
pack, or they may be scattered in different
areas of the pack.
The limits (starting
and ending addresses) of each area used by
the file are specified by the standard file
label (s) •
Because each file label contains file
the group of labels on the pack is
essentially a directory of all data records
on the pack (volume). Therefore, it is
known as the Volume Table of contents
(VTOC). The VTOC itself becomes a file of
records (one or mOIe standard-label records
per logical file) and, in turn, has a
label. The label of the VTOC is th~ first
record in the VTOC. This label identifies
the file as the VTOC file, and gives the
file limits of the VTOC file.
The Volume
Table of Contents is contained within one
cylinder of a. disk pack.
It does not
overflow onto another cylinder.
li~its,

If a ~ogical file of data records is
recorded on more than one disk pack
(volume), standard labels for the file must
be included in the VTOC of ~h pack used.
The label(s) on each pack identifies the
portion of the logical file on that pack
and specifies the extent(s) used on that
pack.
Standard File Label-Formats:
All
standard-file-label records have a count
area and a 140-byte key/data area.
Three
standard-label formats are provided.
Format'. This format is used for all
logical files, and it has a 44-byte key
area and a 96-byte data area. It is always
the first of the series of labels when a
Macro Instruction statements

63

file requires more than one label on a disk
pack (as discus'sed in Forma-:ts 2 and 3).
The Fermat 1 label identifies the
logical file (by a file name assigned by
the user and included in the Q4-byte key
area), and it contains file- and
data-record specifications. It also
provides the addresses for three separate
disk areas (extents) for the file.
If the
file is scattered over more than three
separate areas on one pack, a format 3
label is also required.
In this case, the
Format 1 label points to the second label
set up for the file on this pack.
If a logical file is recorded on more
than one disk pack, the Format 1 label is
always the first label for the file in the
VTOC on each· pack.
r~1-~
This format is required for
any file that is organized by the Indexed
Sequential File Management System.
The
44-byte key area and the 96-byte data area
contain additional specifications unique to
this type of file organization (such as the
highest record in the overflow area).

If an indexed sequential file is
recorded on two or more packs, the Format 2
label is used only on the pack containing
the indices.
This pack may, or may not,
contain data records.
The Format 2 label
is ~ot repeated on the additional packs (as
the F0rmat 1 label is).
Format 3.
If a logical file uses more
than-three-extents on any pack, this format
is used to specify the addresses of the
additional extents.
It is used £nly for
extent information.
It has a 44-byte key
area and a 96-byte data area that provide
for 13 extents.
The Format 3 label is pointed to by the
Format 1 label for the logical file.
It is
included as required on the first pack, or
on additional packs if the logical file is
recorded on two or more packs.
UseI,=Standard File L.212els: The user may
include labels to define his file further,
if he desires, provided the file is
processed consecutively (DTFSR macro
specified), by the direct access method
(DTFDA macro specified), or by physical
laCS (DTFPH macro specified). A file
organized and processed by the indexed
sequential file management system (DTFIS
specified) permits standard labels only. A
file that is to be processed in consecutive
order may have up to eight user-header
labels and up to eight user-trailer labels.
The trailer labels Cqn be written to
indicate an end-of-volume condition. That
is, when the end of an extent on one volume
(pack) is reached and the next extent is on
64

S/360 BOS Assembler with I/O Macros

a different volume, or when the end of the
file is reached, user-trailer labels can be
included to contain whatever trailer
information the user desires (for example,
a record count for the completed volume).
User-standard labels are not stored in
the Volume Table of Contents-:--Instead,
they are written on the first·trac£ of the
first extent allotted for the logical-file
data records.
In this case, the user's
data records start with the second track in
the extent, regardless of whether the
labels require a full track. If a file is
written on two or more packs, the labels
are written on each of the packs.
All labels must be eighty bytes 'lonq and
they must contain standard information in
the first four bytes. The remaining 76
bytes may contain whatever information the
user wants.
The standard information in the first
. four bytes is used as a record key when'
reading or writing the labels.
The header
labels are identified by UHL1,
UHL2,---UHL8. The trailer labels, when
applicable, are identified by UTLO,
UTL1,---UTL7.
Each user-label set (header
or trailer) is terminated by an end-of-file
record (a record with data len~th 0), which
is written by laCS. For example, if a file
has five header labels and four trailer
labels, the contents of the user-label
track is:
RO
R1
R2
R3
RQ
R5
R6
R7
R8
R9
R10

R11

I

Standard information
UHL1--user's 1st header label
UHL2--user's 2nd header label
DL=80
UHL3--user's 3rd header label
UHL4--user's 4th header label
UHL5--user's 5th header label
UHL6--end-of-file record
--DL=OO
UTLO--user's 1st trailer la,bel}
UTL1--user's 2nd trailer label
UTL2--user's 3rd trailer label
DL=80
UTL3--user's 4th trailer label
UTL4--end-of-file record
--DL=OO

When files are processed by the direct
access method, (or processed by physical
laCS defined with DTFPH with MOUNTD=ALL)
only user-standard header labels can be
written.
In this case, the user-label
track contains:
RO

R1
R2

Standard information
UHL1--user's 1st header label
UHL2--user's 2nd header label

l

DL=80

UHL(n)--user's nth header
label where ~8
R(n+1) UHL(n+1)--end-of-file record} DL=OO
R(n+2) UTLO--end-)-file record
R (n)

The user's label routine can determine
if a label is a header or trailer label by
testing the first four bytes of the label
(see QPE N Macr.Q) •
St~ndard

TalliL1~~~ls

When a tape input or output file that has
standard labels is opened, Toes can hand1~
the label checking (on input) or vritinq
(on output).
When logical Ioes macros are
used in the program, the DTFSR entry
FILABL=STD must be included to specify
IOeS-processing of labels.
When physical
Ioes macros are used, the DTFPH entry
TYPEFLE must be included to indicate
whether this is an input file (check
labels) or an output file (write labels).
If an input tape contains standard
labels but the user does not want Ioes to
check th em·, FILABL=N STD should be specified
in the file definition.
The standard labels for a tape file
are:
a volume label, a file header label,
and a file trailer label.
Volume Labels:
The standard volume·label,
whIc~is the-first record (eighty
characters) on a reel of tape, identifies
the entire volume (reel) and offers volume
protection. It contains the label
identifier VOL1 in the first four
positions, and other identifying
information such as the volume serial
number.
This is a unique number generally
assigned to the reel when it is first
received in the installation. The volume
label is generally written once, when ·the
reel of tape is· received, by an
IBM-supplied utility program. The standard
volume label may be followed by a maximum
of seven additional volume labels if
desired.
These must be identified by VOL2,
VOL3, etc, in the first four positions of
each succeeding label.
However, IOCS does
not permit the checking or writing of
additional volume labels by the user in the
problem program.
These labels are always
bypassed on input.

additional file header labels must be
identified by UHL1, UHL2, etc.
A tape mark
follows the last file header label.
A standard file trailer label is located
at the end of a logical file (EOF), or at
the eRd of a volume (EOV) if a loqical file
is continued on another volume. The
trailer label has the same format as the
header label.
It is identified by EOFl or
EOV 1 (instead of HDR 1) and contains a
physical record count (block count). I·ike
the file header label, the standard file
trailer label on an input file may be
followed by seven additional standard
trailer labels identified by EOV2-EOV8 or
EOF2-EOF8, whichever is applicable. IOCS
~ypasses these labels.
If desired, the
standard trailer label{s) may be followed
by a maximum of eight user-written standard
trailer labels, which must be identified by
UTL1-UTL8.
All user-written standard labels must be
eighty characters long and must contain the
standard identification in the first four
positions. The remaininq 76 positions may
contain whatever information the user
wants. Additional information about tape
labels is given in the £roqrammer's Guide,
listed on the front cover of this manual.
Nonstandard Tape Labels
Any tape labels that do not conform to the
standard-label specifications are
considered nonstandard and, if desired,
must be read, checked, or written by the
user. On input the nonstandard labels may,
or may not, be followed by a tapemark.
This choice, combined with the user's
requirements to check the labels, or not,
tesults in the following four possible
conditions that can be encountered~
1,

Label(s), followed by a tapemark, are
to be checked.

2.

Label(s), not followed by a tapemark,
are to be checked.

3.

Label(s), followed by a tapemark, are
not to be checked.

4.

Label(s), not followed by a tapemark,
are not to~e checked.

File labels:

The volume label set is
foliowed by a standard 1ile head~abel.
This label (eighty characters) identifies
the logical file recorded on the tape and
offers file protection. It contains the
label identifier HDR1 in the first four
positions, and other identifying
information such as file identifier, file
serial number, creation date, etc. An
input tape may contain standard header
labels HDR1-HDR8. If so, IOCS checks only
label HDR1 and bypasses HDR2-HDR8.
The standard file header label(s) may be
followed by a maximum of eight user-written
standard labels if desired. If so, the

For conditions 1 and~ the DTFSR entries
FILABL=NSTD and LABADDR=Name must be
specified in the file· definition. For
conditi~ the DTFSR entry FILABL=NSTD
must be specified.
DTFSR LABADDR is
omitted and Ioes skips all labels, pa~ses
the tapemark, and positions the tape at the
first data record to be read. For
conditiQn~L the DTFSR entries FILABL=NSTD
and LABADDR = Name must be specified. In
this case IOCS cannot distinguish labels
Macro Instruction statements

65

from data records because there is no
tapematk to indicate the end of the labels.
Therefore, the user must read all labels
even though checking is not desired. " This
positions the tape at the first data
record.
For output files created by logical
IOeS, a tape mark always follows the last
nonstandard label, unless the user
specifies the DTFSR entry TPMARK=NO.

On input, unlabeled tapes (DTFSR FILABL=NO)
mayor may not contain a tapemark as the
first record.
If the tapemark is present,
the next record is considered to be the
first data record.
If there is no
tapemark, Ioes reads the first record,
determines that it is not a tapemark, and
backspaces to the beginning of the first
record which it considers to be the first
da.:!:~ record.
For unlabeled output files
~TFSR FILABL=NO) created by logic~l IOeS,
the first record is always a tapemark,
unless the user specifies otherwise.
If
the user does not wish to have a tapemark
written, h~ must specify DTFSR TPMARK=NO.

r---~

IName I Op

Operand

r---4-----~----

I
I

I OPEN
I OPEN

'-----'-

I

-1

filename
I
filename1,filename2,------ I
,

The OPEN macro instruction is used to
activate each file that is to be utilized
in the problem program. The symbolic name
of the logical file (assigned in the D~FSR,
DTFDA, DTFIS, or DTFPH header entry) is
entered in the operand field of this
instruction.
As many as 16 files may be
opened by one instruction, by entering
additional file-name parameters. In this
case, the files are opened in the same
order as they are specified in the OPEN
instruct ion.
For the card r~aders, card pUnches,
printers, and paper-tape readers, OPEN
simply makes the file ava{lable for input
or outpu to.
When LIoes is
journal tapes on
Reader, the OPEN
the beginning of

used for processing
the 1285 and 1287 Optical
macro must be issued at
each input roll.

If certain procedures are followed when
an end-of-tape condition occurs, it is
possible to process two or more rolls on
the '287 as one file.
The method is to
press the Optical Reader start key
(creating an intervention required
66

S/360 BOS Assembler with I/O Macros

condition) instead of the end-of-file key
to run out this tape. The next tape can
then be loaded and processed as a
continuation of the previous tape.
However, since OPEN is not reissued, no
header information can be entered between
tapes.
When LIoes document processing, OPEN
must be issued to make the file available.
OPEN allows header (identifying)
information to be entered at the 1285 or
1287 keyboard, if desired, for journal tape
or cut documents (1287).
When header
information is entered, it is always read
into IOAREA1, which must be large enough to
accommodate the desired information.
OP"EN does not clear the eight binary
counters used in the optical readers.
These coun ters a"re initially zeroed.
They
accumulate error statistics, as listed
under eOREXIT=Name, in the section on DTFSR
detail entries.
When a magneti~tSB~fi!~ with standard
labels (ST~ specified in DTFSR FILABL) is
opened, Ioes expects the first record read
to be a label.
T~e first record is a label
if the tape file being opened is the first
file on the reel and if Ioes rewinds the
reel (see DTFSR REWIND).
If, however,
other specifications are given in DTFSR
REWIND or if a file starting in the middle
of the reel is opened, it is the user's
responsibility to position the tape
properly so that the first record read is a
label. If the first record is not a label,
Ioes indicates an error condition by
issuing a message to the operator.
An
unlabeled file (DTFSR FILABL=NO) can,
however, be opened in the middle of data
records without causing an error condition.
If a file with nonstandard labels (DTFSR
FILABL=NSTD) is opened, all label
processing is the responsibility of the
user's routines (see
Initialization..!l!Qn.§tandard Tape·· Labels}.
Whene~er an input/output disk or tape
file is to be opened and the user plans to
process user-standard labels or nonstandard
labels, he must provide the information for
checking or building the labels.
If this
information is obtained from another input
file, that file must be opened ahead of the
disk or tape file.
This is done by
specifying the input file ahead of the disk
or tape file in the same OPEN instruction,
or by issuing a separate OPEN instruction
preceding the OPEN for the disk or tape
file.

The specific functions that occur on an
OPEN for a disk or tape file vary with the
type of operation (input or output) and
with the use of file labels. These

functions are discussed in the following
sections.
When building an output file and IOREG
is specified, OPEN positions IOREG to the
beginning of IOAREA1.
In addition to the registers used by
logical IOeS, OPEN also uses register 5.
The programmer may use register 5 because
the OPEN macro routine saves and restores
this register.
However, if the programmer
plans to use register 5 as a base register,
he should be aware that register 5 is
dropped at the end of the OPEN routine.
For a discussion of reoFening a file
after it has been closed, see CL~Macro.
For a discussion of SOPEN, to initialize
the adapter for STR devices,
see: Processing with STR DellQ~.
For a
discussion of BOPEN, to initialize the data
adapter for BSC, see: Binary SynchrQn~2
CO!!l!!ly'nication..
Disk.lnput.Pile
W~en

an input file that is recorded on disk
is opened, the OPEN routines:
•

Check the standard label(s)
file.

for the

•

Make any user-standard labels available
to the user for checking, if the DTPSR,
DTFDA, or DTFPH entry LABADDR is
included in the file definition.
The
indexed sequential system (DTFIS) does
not permit user-standard labels.

•

Locate the area(s) of the disk pack
(extent) where the file is written.

•

Make the file records available for
processing.

For these functions, the OPEN routines
refer to the information supplied by the
user in Job Control VOL, XTENT, and DLAB
cards.
A VOL card and a DLAB card must be
supplied for each logical file, and an
XTENT card must be supplied for each
separate area (in each volume) used by the
file.
The functions of the OPEN routines may
occur at different times during the job,
depending on the type of processing
specifi~d for the file by the·
file-definition macro instruction.
If a
file is to be processed consecutivel~
~TFSR specified), OPEN initially checks
the standard label(s) on the pack or on the
fi£2!·pack of a multipack file, makes any
user-standard labels on the firs1 pack
available for checking, and then Iodates
and makes available the first extent on the

first pack. IOCS processes one extent at a
time, in the sequence specified by the
user's control cards. When IOCS· detects
the end of the current extent, it branches
to the end-of~extent routine. OPEN then
locates the next extent specified by the
control cards, makes sure it is on-line and
ready, and makes it available for
processing.
If the next extent is the
first extent of a different pack used by
th~ file, OPEN checks the standard labels
on that pack ans makes any user labels on
that pack available to the user for
checking.
If the user has included
user-trailer labels for a consecutive file,
they-ire-made available for checking when
the last extent on one pack is completed
and before the first extent on the next
pack is opened (see ComEletion:--Disk-Input
Fi1gl..
When a file is to be processed by the.
direct access method (DTFDA specified) or
by the y!de,!g~2equential.syste.!!! (DTFIS·
specified), all disk areas specified by
theuser's control cards for the file must
be mounted and ready when the file is first
opened. Therefore, the OPEN routines
initially check all standard labels on all
packs used by the file, make ~ll-user
labels (if any) available for checking, and
check all specified extents and make them.
available for processing. For a multi-pack
file, OPEN processes the standard labels
followed by all user labels on the first
pack, then processes standard labels on the
second pack, etc.
Therefore, the user's
label routine is entered for each user
label on each pack in turn, afte~ the
standard label on that pack has been
checked.
If a file is to be processed by £hysical
(DTFPH specified) and if the DTFPH
.
entry MOUNTD=SINGLE is specified, the file
is treated as consecutive at the initial
opening.
That is, only the pack containing
the first extent specified by the user's
control cards must be on-line when the
initial OPEN is issued~
The labels on this
pack are processed, and the first specified
extent is made available for processing.
Thereafter the user must keep track of the
extents and issue an OPEN foi each
succeeding extent when it is required for
processing.
Each additional time that OPEN
is issued for the file, IOCS locates and
makes available the next extent specified
by the user's control cards.
If the DTFPH
entry MOUNTD=ALL is specified, all extents
spe~ified for the file must be mounted and
ready when the initial OPEN is issued.
All
labels are checked (or made available for
user-checking) and all extents are qhecked
and made available for processing. Only
one OPEN is issued for the file, the
function for MOtiNTD=ALL are similar to
IOC~

Macro Instruction statements

67

those performed when a diDect access or
indexed sequential file:is opened.

pacKs are opened and all standard labels
are written at the initial OPEN for the
logical file.

ChQ£fill~User-Standard-Labels:

When a disk
file contains user-standard iabels, the
programmer can check them in his own
routine if the DTFSR, DTFDA, or DTFPH entry
LABADDR is included in the file definition.
The OPEN routines branch to the -~ser's
routine after each user's label has been
read.
IOCS reads each label into the label
read-in area. The address of this area is
supplied to the user in register 1 upon
entry into his routine. The user's routine
can identify the various labels (and
distinguish between header and trailer
lahels) by testing bytes 1-4 of the read-in
area.
After checking each label, the user
must return to the OPEN routines by use of
the LBRET macro.

When an output file that is to be recorded
on disk is opened, the OPEN routines:
•

Audit the extents specified by control
cards to make sure that any data
previously recorded is no longer active
and may be destroyed.

•

Create and write required standard
label sets.

•

Permit the user to create user-standard
labels and write those labels, if the
DTFSR, DTFDA, or DTFPH entry LABADDR is
specified. The indexed sequential
system (DTFIS) does not permit
user-standard labels.

•

Locate the area(s) of the disk pack
where the records are to be written.

•

Make the area(s) available to logical

Ioes.

Similar to the opening functions for an
input file, the OPEN routines refer to the
information supplied _by the user in the Job
Control VOL, XTENT, and DLAB cards for the
output file.
For the creation of the
standard labels, OPEN also uses information
supplied by the file-definition macro
(DTFSR, DTFDA, DTPIS, or DTFPH).
As each pack is opened for a file, IOCS
constructs and writes the standard label
(5) for that pack.
For consecutive
processing (DTFSR specified) only the first
pack is opened at the initial OPEN.
After
the first, each other pack is opened and
the standard labels are written when,
during execution, the processing of records
for one.pack is completed and the file is
to be continued on a different pack.
For
the direct access method (DTFDA) or the
indexed sequential system ~TFIS), all
68

S/360 BOS Assembler with I/O Macros

After the standard labels are written
for any pack, IOCS branches to the user's
label routine (if one is specified by the
DTFSR, DTFDA, or DTFPH entry LABADDR) and
the user can construct his label(s).
The extents specified by the user are
checked in turn.
That is, they are checked
as they are ready to be written when
processing consecutively.
Or, they are
checked, one after the other, at the
initial OPEN when the direct access method
or the indexed sequential system is used.
This checking is based on the expiration
dates in the existing standard file labels.
If any files are to be partially or wholly
destroyed, their standard-labels are
removed from the Volume Table of contents.
This, in effect, deletes the entire file
from this pack.
If an output file is to be processed by
physical IOCS, both the initial and
subsequent opening functions are similar to
those described for an input file (see OPEN
Ma£~Q~_Dis~Input~Fi!~, except that
labels are written rather than checked.
Thus, the file is treated like a
consecutive file if DTFPH MOUNTD=SINGLE is
specified.
It is treated like a direct
access or indexed sequential file if DTFPH
MOUNTD=ALL is specified.
Writing~~Standa~~HeadQ~_1~Qel~:
When
the user specifies that user-standard
labels are to be written (by including the
DTFSR,DTFDA, or DTFPH entry LABADDR), the
user constructs the labels and IOCS writes
them.
The OPEN routines branch to the
user's routine after the standard label(s)
is written. OPEN prepares for the user's
label(s) by setting up a label area where
the user can construct the label(s),
supplying the address of the area in
register 1, placing UHL 1 (for the first
label) in the first four bytes of the area,
and storing a return addr~ss in register
14. In his routine the user constructs a
76-byte label and returns to IOCS by use of
the LBRET macro.
IOCS checks for a
set-completed indication, writes the label,
determines if eight labels have been
written and, if not, increases the UHL
identification by 1 and returns to the
user's label routine.
Because a maximum of
eight user-standard labels is permitted,
IOCS automatically terminates the label set
after a label with UHL8 is written.
If the
user requires fewer labels, he can force
the end of the label set by issuing the
LBRET macro with the operand "1". Whenever
the DTFSR, DTFDA, or DTFPH entry LABADDR is
specified, at least one additional label
~§i be written.
Upon return to IOCS, the

set is terminated and IOCS writes an
end-of-file record.

When an input file is recorded on magnetic
tape, OPEN rewinds the tape according to
the specifications in 'the DTFSR entry
REWIND.
(No rewind is performed if the
file is defined by DTFPH.)
Standard Labels:
Both the first volume
label (VOL~l) and first file header labels
(HDR1) are automatically read and checked
if standard label checking is specified
(~!Q specified in DTFSR FILABL or INPUT
specified in DTFPH TYPEFLE) and if the tape
is read forward (!ORR!RD specified in DTFSR
READ).
The fields are checked with the
information supplied by the Job Control VOL
and TPLAB cards.
By this label checking, IOCS locates the
file to be processed if more than one file
is written on a tape reel (multifile reel).
For this"laCS compares the file sequence
number in the label with that in the TPLAB
card. The file sequence number gives the
sequential position of the file on the
reel. For example, if the first file on a
multifile reel has file seguence number 1,
the third file has file sequence number 3.
If the first file is numbered 15, the third
file is numbered 18. The OPEN routines
bypass all files until a header label with
the matching file sequence number is read,
or until the end of the ta~e is reached.
Several files on a reel may be processed in
succession without rewinding the tape if
the file sequence numbers ar~ specified in
ascendinq sequence. if not, the tape must
be rewound before the file to be processed
is opened.
If the tape is positioned
beyond the desired file when the OPEN for
that file is executed, message 4114A is
given to the oper~tor.
If a tape file that will be read
<'~ACK - specified in DTFSR READ) is
opened, the file-trailer-label-is
automatically read and checked,if label
checking is specified.
The volume label is
not repeated at the end of the tape.
Because the file trailer label i i processed
at this time, it must be complete and
contain both t~e trailer and header
information (except HDR) to identify the
file.
If the file labels were originally
written by laCS routines, the trailer label
will be complete. If the tape is not
positioned at the trailer label (EOF1) when
the file is opened, the user is notified
and reading continues.
This situation is
possible if the user begins reading
backwards in the middle of his file.
When
physical IOCS macros are used to read
records backwards, labels cannot be checked
ba£~J!ard§

and the 'file must not be defined with DTFPH
statemen-t;,s.
If a tape contains user-standard-header
labels (UHL1-UHL8) following the standard
file header label (or user-standard trailer
labels, UTL1-UTL8, preceding the standard
trailer when reading backwards), the
programmer can check them in his own
routirie.
Tha OPEN routine branches to the
user's routine (identified by the DTFSR or
DTFPH entry LABADDR) after each user's
label has been read.
Each label is read
into the label read-in area used by IOCS.
The address of this area is supplied in
register 1 upon entry into the user's
routine. ,After checking each label, the
user must return to the OPEN routine by
useof the LBRET macro. If user-standard
labels exist but the user does not specify
LABADDR, the user labels are bypassed by
laCS.
When the tapemark at the end of the
labels is read, laCS 9pens the next file
specified in the OPEN macro, or returns
control to the problem proqram if all files
have'been opened.
After the labels (if any) for a file
have been processed, that file is ready for
the first GET instruction.
Nonstandard-Labels: To process nonstandard
labels, the user must specify FILABL=NSTD
and LABADDR=Name, and he must define his
own label read-in area. To read-the
n~nstandard labels, physical IOCS macro
instructions must be used instead of
logical IOCS instructions.
A 'Command
Control Block (CCB) and a Chaanel Command
Word (CCW) must be established, and an EXCP
instruction must be issued for each label
must be issued for each label record (see
Processing Records with Physical . IOCS).
In his label routine, the user issues
the EXCP and WAIT macro instructions and
then performs whatever checking he desires
for the labels.
After all labels have been
read and processed, the user returns
control to the OPEN routines by use of the
LBRET macro.
If a file with nonstandard labels
utilizes an alternate tape drive (DTFSR
ALTTAPE=SYSnnn), IOCS supplies a code
identifying the symbolic unit (see Figure
26) of the drive currently beinq used in
the two low-order bytes of register
1. This value must be moved to bytes 4 and
5 of the Command Control Block (CCB) used
by the EXCP macro for label reading.

For a magnetic tape output file, OPEN
rewinds the tape as specified in the DTFSR
Macro Instruction Statements

69

entry. REWIND.
(NO rewind is performed if
the file is defined by DTFPH.)
Stang~~g_Lab~!§:
When standard labels are
to be written (STD specified in DTFSR
FILABLE, or OUTPUT in DTFPH TYPEFLE), the
volume label is checked and the old file
header is read and checked to make sure
that the data on the tape is no longer
active and may be destroyed. The tape is
then backspaced and the new file header
label i~ ~ritten with the information
supplied by the ~ob Control TPLAB card.
The volume label is not· rewritten.

If user-standard header labels
(UHL1-UHL8}-are to~e-written following the
standard header label, the OPEN routine
branches to the user's routine (specified
by the DTFSR or DTFPH entry LABADDR) after
each standard label.
In his routine, the
programmer can build a· maximum of eight
user-standard labels. Each label must be
built in the label output area used by
IOCS. The address of ~his area is·supplied
to the user in register 1 upon entry into
his routine.
IOCS also supplies the letter
o in the low-oider byte of Register 0, to
indicate that a header label should be·
built.
After building each label, he must
return to the OPEN routine by use-of the
LBRET macro. Then IOCS writes. the label.
When the user determines that the last user
label has been written, he must issue the
LBRE T macro with. the operand II 1". Whenever
the DTFSR or DTFPH entry LAEADDR is
specified, at least on~ additional label
,!!U!st be written.
After the header labels (if any) for a
file. have been written, the tape is ready
for the first PUT instruction for that
file.
.
Multifile Reels.
More than one file of
recordsmay-be'":"written on cne reel of tape
{multifile reel}, if desired.
If this is
planned, the DTFSR entry REWIND=NORWD
should be spec~fied for each file.
With
this specification, the tape is located at
the correct position for tbe OPEN routines
to write the standard file header label for
each additional file (after the first) on
the reel. For the first file, the
programmer can include a CNTRL macro
instruction (with the operand REW) ahead of
the OPEN instruction. Or, the operator can
position the tap~ at the load point.
For the standard file header label of
each file after the first, t~e O~~N
routines obtain the file serial number,
volume sequence number, and file sequence
number from the preceding standard trailer
label.
They increase the file sequence
number by 1 for the new file.
OPEN writes
the remaining fields of the header label by
using the information supplied in the
70

S/360 BOS Assembler with I/O Macros

corresponding ~ob Control TPLAB card. As
with the first file on the reel,
user-standard header labels may follow the
standard header label.
If a tape is rewound or repositioned
after a file is closed, it is the user's
responsibility to properly position the
tape for writing any additional file.
The
tape must be positioned so that· the file
header label is written immediately after
the tape mark that follows the last file
currently on the tape.
The header label
will replace the second tape mark that
norm~lly follows the trailer label(s} of
the last file on a tape (see £LOSE·
Macro:
Tape output-File). The tape can be
advanced from the load point to the correct
position by skipping three tape marks for
each file presently on the tape.
The
layout of tape records is:
Load
Point
v
I<-----------File 1
i

•

I

i

I

I

1,_

lVOL1IHDR'1 UHL ITMIDATA RECORDSITM'IEOFI
1
I,
I (1-8) .,I
I· ,1
1,
I
,
,
-------->I<--------File
'-----1)

1

L

,

~

2------------------NI

I UTL ITMIHDR.I UHL ITMIDATA RECORDS1~Ml
1(1-8}1
1(1-8}1
I
II
'

"

I

,

------->1
I

Ii

iii

IEOF, UTL ITMITMI

I

I

I

I

(1- 8)

I
I

t
Replaced if another file
is added to the tape.
A Job Control FILES card should be used
to skip the required number of tape marks~
When the tape has been positioned and the
file is opened, the OPEN routines· obtain
the information for the standard file
header label from the preceding standard
trailer label and the ~ob Control TPLAB
card, as described in the preceding
paragraphs. The DTFSR entry REWIND=NORWD
must be·included for this file.
Nonstandard Labels: To process nonstandard
labels, the user must specify FILABL=NSTD
and LABADDR=Name, and he must define hi~
own label read-out area.
To write-the
nonstandard labels, physical IOCS macro
instructions must be used instead of
logical IOCS macro instructions.
A Command
Control Block (CCB) and a Channel Command
Word (CCW) must be established, and an EXCP
instruction must be issued for each label
record (see Processing Records with
Physical IO£§L.

Upon branching to the user's label
routine, Ioes supplies the letter 0 in the
low-order byte of Register 0 to indicate
that a header label(s) should be written
~ee DTFSR LABADDR).
In his routine, the
user issues the EXCP and WAIT macro
instructions after he has built each label
record.
After all labels have been
written, the user returns control to the
OPEN routines by use of the LBRET macro.

Nonstandard labels:· Operand
is invalid for files that
contain nonstandard labels
(Flf.,ABL=NSTD) •
QEg!:~nQ_l

If a file with nonstandard labels
utilizes an alternate tape drive (DTFSR
ALTTAPE=SYSnnn), Ioes supplies a co~e
identifying the symbolic unit (see Figure
28) of the dr~ve currently being used in
the two low-order bytes of register
1.
This value must be moved to bytes 4 and
5 of the Command Control Block (CCB) used
by the EXCP macro for label writing.

..-----,rIName 1 op
1 Operand
I
1-----+-----+---------------1
II

~

I

I LBRET I 1
2

I
I

J LBRETI
'-_--L...
I

I

I

The LBRET (label return) macro instruction
applies only to disk or tape files that
contain user-standard labels, or
nonstandard labels, that the user wants to
check or build/write. It must be issued at
the end of tbe user's label routine
(specified by the DTFSR, DTFDA, or DTFPH
entry LABADDR), to return to Ioes after
header or trailer labels have been
processed. This instruction requires ~
of the following operands:
Q.Q~!:anQ-1

User=St~ndard

Iabels~~

File:To return to Ioes when the
user wants to eliminate the
checking of one or more
user-standard labels. IOCS
then skips the remaining labels
in the set, and processing
continues.
If all labels are
to be checked, operand • is not
used and Ioes terminates label
processing when the disk
end-of-file record or the
tapemark following the last
label is read.
User-standard Labels, Output
File: To return to IOCS when
the-user determines that the
last user-standard label has
been built.
Ioes writes the
last label (from the label
output area). and processing
continues.
Operand 1 is always
required to terminate the
output label set.

~§er-StEndard 1~~~1~Eut.

File:
To return to IOCS after
each user-standard label has
been checked.
Ioes makes the
next label, if any, available
for checking in the label input
area.
When IOCS senses the
endof the label set (disk
end-of-file record or
tapemark), it terminates label
processing.
User-standard Labels,output·
File: To return to Ioes after
each user-standard label except
the last has been built.
roes
writes the label from the label
output area and returns to the
user's label routine to permit
him to build his next label •
The label set is terminated by
1BRE.'Lj.
Nonstandard labels: To return
to IoeS-after al~nonstandard
labels have been-checked or
written. For nonstandard
labels, IOCS branches to the
user's label routine only once,
and the problem program must
read or write every reguired
label before issuing LBRET to
return to IOCS.
The LBRET routine requires the values
that the IOCS has placed into registers 14
and '5. Hence, if the user requires one or
both of these registers in his routine, he
must save the value placed into these
registers by the IOCS before he starts
using them.
He must restore this value
prior to issuing the LBRET macro
instruction •.
PROCESSING RECORDS CONSECUTIVELY
Records in serial-type devices (such as
card reader, tape unit, printer) and
records in a 23'1 disk file used in a
serial-type order can be processed
consecutively.
In this type of processing,
successive records are processed, starting
at the beginning of a logical file and
continuing, one record after the other~ to
the end of the file (see Types-of
Pro~ing:
Consecutive Processing}.
In
this method the user issues GET.or PUT
macro instructions to transfer records.
Whenever a file of records is to be
processed in consecutive order, the logical
file, the device used for the file, and the
Macro Instruction Statements

71

main-storage areas allotted to the £ile
must be defined by the declarative macro
DTFSR (Qe~ine The rile in a ~eBial-type
d~vice).
The detail parameter entries for
this definition are described under File
J2gfiniti.Q!LHacIQ,§.
---

Ioes handles records that are:
•

Blocked - two or more logical records
in one physical record, such as a tape
record

•

Unblocked - one logical record per
physical record

•

Fixed-Length - all records the same
length

•

Variable-Length - the records differ in
length

•

Undefined - the record characteristics
are unknown to laCS.

laCS can process all the different types
in the same program.
However, all the
records in a given file must be the same
type, and this must be defined in the DTFSR
entry RECFQRM for that file. The types of
records that can be processed vary with the
"type of I/O device used for reading/writing
the file of records, as shown in the
illustration (Figure 11).

72

5/360 BaS Assembler with I/O Macros

When an application using bloskedplanned, the number of records
that can be allocated for a block depends
on the size of the records and the amount
of main storage that can be reserved for
the block. The programmer must
predetermine the maximum block size and
specify this in the DTFSR entry BLKSIZE.
All records within the block may be fixed
length or variable length. If the records
are fixed length, the length of the records
is specified in DTFSR RECSIZE.

~sOtds-is

If the blosked·records are variablelength, the-Size-of each reGord-must be
included within the record itself (Fiqures
12 and 13). This record-length field must
occupy. the first four bytes of each record.
The first two bytes specify the length of
the record (including the four bytes for
the record-length field itself), and the
next two are blank. In addition, the
actual length of each bl£~~-must be
recorded on disk or tape, preceding the
first record in the block. Block length is
also a four-byte field. The first two
bytes specify the length of the block
~ncluding the four bytes for the
block-length field itself}, and the next
two ~re blan~. Both block length and
record length are expressed in 16-bit
binary form.

.--

i

I
I

I

,

1
1
I

I

I

I
I

TYPES OF RECORDS

1
,I

l - i

I

I

I

Variable-Length 1
I
I
I
,
IUnblocked I Blocked I Unblocked I Blocked I

I

J

I

I

I

,

12311 Disk Storage Drive

I
I
I

I

TYPE OF I/O DEVICE

I

I

1--

12400 Series
IMagnetic Tape Unit

Fixed-Length

X
X

I

I-

11442, 2501, 2520, 2540
ICard Reader
I
1'442, 2520, 2540 Card Punch

-+-1

1
I

f
I

I-

11403,1404,1443,1445, printerl

l
11052 printer-Keyboard

I-

12671 Paper Tape Reader

I
11285 Optical Reader

I
I

I

I
I

I
I
I
I
I
I

X

1
I
I

I
I
I

1
X
X

I

I

I

I

1

1

I

I

+--

I

I

X

I
I

1
I

I

I

X

I

X

I
-f
I

I

I
I

I

1

I

I
J

I

I
I
I
I

X

X

I
1

I

X

I

X2

-+

I

X

I

I
I

I

I

I
1

X

I
I

1

X

I

I

I

I

I
I

1
I
I
I
XII
X

+1
X
I
+-----+__

11287 Optical Reader
INOTES:
I
I

X

I

J

II

1
I
I

1

I

I

I

1

1

1

I
X

I

I
1

I

,
X

1
~

X

I

X3

1

X

--I
I
,

1

1

I

X

.L-

1.

For disk or tape records, each record must contain a record-lenqth field
and' each block must contain a block-lenqth field.
In the case of
ysblocked-records, block length is a block of , record and it equals
record length +4.

2.

Read backwards must not be specified.

3.

Each record must contain an end-of-record character as the last character
in the record.

I

I
I

I-

Figure 11.

Types of

Re~ords

and

t/o

Devices for Consecutive Processinq

Macro Instruction statements

73

BLOCKED RECORDS

I

Data

Data

Data

BL=234

Record 3

Record 2

Record 1

RL = 80

RL = 100

Record 1

RL = 50

Record 2

Data

Record 3
Data

Data

I

.BL =

I

84J

RL = 100

RL = 80

BL = 541

RL

= 50

BL is Block Length}.
.
•
• R
d L th In Binary Half-word (16-Blt) Format
RL IS ecor eng
IRG is Interrecord Gap

Figure 12.

Schematic of Variable-Length Eecords on Tape

BLOCKED RECORDS
Record 1
Data
I

Record 2
Data

I

BL=l841

RL=80

RL=100

UNBLOCKED RECORDS
Record 1
Data

Record 2
Data
103:

I

RL=80

RL=100

I

I

BL is Block Length } In Binary Half-word (16-Bit) Format
RL is Record Length

Figure 13.

74

Schematic of Variable-Length Records on Disk (Consecutive processing)

5/360 BOS Assembler with I/O Macros

When unblocked-variable-length-records
on disk-orta~e.are processed, each record
must contain the record-length field in the
first four bytes, the same as for blocked
variable-length records.
Also, a
block-length field must precede each record
(a block of one record).
This four-byte
field always specifies the record length
plus 4.
Because a block-length field must
precede the first data record whenever
variable-length records (either blocked or
unblocked) are processed, this must be
included in the BLKSIZE specification and
in the amount of main storage allotted to
the input/output area.
When unblocked-variable-len9th records
are specified for the card-punch or
prillter, a record-length field must be
1ncluded in the first four bytes of each
output record in main storage. The first
two bytes must specify the length of the
record (including the four bytes for the
record-length field itself), and the next
two are blank. The user must supply the
record length in this field when he builds
the record.
Punching, or printing, of the
actual· data record starts with the first
position after the record length field,
unless a control character is included in
the record (see PUT Macro: Punch-and·
Printer-Control). The amount of main
storage allotted for the punch .or printer
output area must allow for the 4-byte
record-length field, and the DTFSR BLKSIZE
specification must include thes~ four
bytes.
When undefined records are to be read or
written, the DTFSRentry RECSIZE must
specify a register. On input, IOCS
supplies the physical record size in this
register. For output, the programmer must
load the length of each record in this
register before he issues the PUT for that
record.
Record·Sizes: The m1n1mum size physical
tape record (gap to gap) that can be
handled is 12 characters (11 characters or
less are considered a noise record).
The
maximum size tape record is 32K. The
maximum size input/output record for the
IBM 1052 printer-~eyboard ~s 256
characters; the minimum size input record
is one character. The maximum siZE card or
printer record cannot exceed the capacity
of the corresponding I/O unit.

built in a work area or directly in an
output area.
.
Input/output areas and work areas for a
particular file can be specified and
handled by IOCS in any of the following
combinations:
1.

One I/O area

2.

One I/O area and one work area

3.

Two I/O areas

4.

Two I/O areas and one work area.

If one I/O area (combination 1) is used,
a register must be specified in DTFSR IOREG
whenever blocked records are processed or
unblocked variable-length records are r~ad
backwards. The register is used to point
to the beginning of each record and thus
locate the record for processing. A
register must also be specified whenever
two I/O areas (combination 3) are used,
regardless of whether the records are
blocked or unblocked. If the blocked
records are variable leng!h-and are being
built in the output area(s), an additional
register must be specified in DTFSR VARBLD.
This register provides the programmer with
the remaining space in the output area each
time a PUT instruct10n is executed.
Whenever a work area (combinations 2 and
4) is used, a register is not required and
IOREG should be omitted.
Instead, DTFSR
WORJA must be specified and the work area
must be named in each GET or PUT
instruction.
The various ~ombinations are
discussed further in the BOS Programmer'sGutde, as listed on the front cover of this
publication.

•IName
I

Op

Operand

GET
GET

filename
filename,workname

Storage· Areas

This instruction makes the next consecutive
logical record from an input file avai'lable
for processing in either an input area or a
specified work area. It is used for any
input file in the system, and for any type
of" record:
blocked or unblocked, fixed or
variable length, and undefined.
When the
GET macro detects an end-of-file condition,
IOCS branches to the user's end-of-file
routine (specified by DTFSR EOFADDR) •

When logical IOCS macro instructions are
used, each input record can be made
available to the program for processing
either in an input area or a work area.
Similarly, on output, each record can be

The GET macro instruction is written in
either of two forms, depending on the area
where the records will be processed.
Either form, but not both, can be used for
one DTFSR-specified logical file.
The
Macro Instruction Statements

75

first form is used if records are to be
procesSeddirectly in the input area(s),
and it reguires only one'parameter. This
parameter specifies the name of the file
from which. the record is to be retrieved.
The file name must be the same as the one
specified in the DTFSR header entry,for
this file.
The input area must be specified in the
DTFSR entry TOAREA1.
Two input areas may
be used to permit an overlap of data
transfer and processing operations. The
second area is specified in DTFSR IOAREA2.
Whenever two input areas are specified, the
IOCS routines transfer records alternately
to each area. They completely handle this
"flip-flop" so that the next consecutive
record is always available to the problem
program for processing.
When records are processed in the input
area(s), a general purpose register must be
specified in the DTFSR entry IOREG if:
1.

Records are blocked,

2.

Variable-length unblocked tape records
are read backwards, or

3.

Two input areas are used, for either
blocked or unblocked records.

This register identifies the next single
record to be processed.
It always contains
the absolute base address of the currently
available record. The GET routine places
the proper address in the register.
The second form of the GET instruction
is used-if-records are to be processed in a
work area.
Tt causes the GET macro to move
each individual record from the
DTFSR-specified input area to a work area.
As in the first form, the file name must be
entered as the first_Earameter. The name
of the work area must be entered as the
se£Qng~aram~!~~, and X~ must be specified
in the DTFSR entry WORKA. The work-area
name must be the same as that specified in
the DS instruction that reserves this area
of main storaqe. All records from a
logical file may be processed in the same
work area, or different records from the
same logical file may be processed in
different work areas. In the first case,
each GET foi the file specifies the same
work area.
In the second case, different
GET instructions specify different work
areas.
It might be advantageous to plan
two work areas, for example, and to specify
each area in alternate GET instructions.
This would permit the programmer to compare
each record with the preceding one, for a
control change. Only one work area can be
specified in anyone GET, however.
Whenever this·form·of the GET instruction
76

S/360 BOS Assembler with I/O Macros

is used for a logical file, a register is
required for indexing (as it is when
records are processed directly in the input
area) •

llQ~

The GET macro is used to acquire data
from journal tapes from 1285/1287 optical
reader files.
processinq overlap is
obtained by using multiple input areas.
IBM, 2611 ' Pa~r . Tape~Read~: Whenever a GET
instruction is issued for the 267', bits 6
and 7 of main-storage location filename+~~
should be tested to determine if an error
is detected when a record is read. If a
data check or equipment check is detected,
an error message is issued to the operator.
The operator's~eply to this message
determines if bit 6 or 7 is turned on.
If bit 6 is on, the record has been
read, but one or more characters in the
record are in error.
Bit 6 is turned on by
an operator reply (4) to continue reading
the record and ignore the character that
caused the error.
If bit 7 is on, the operator has
positioned the tape either at the beginninq
of ~he same record or at the beqinning of
the next available record.
Bit 7 is turned
on by.an operator reply (other than 0-5)
either to reread or ignore the record
containing the error. The next GET
attempts another read operation on the
current record or reads the next available
record. If a torn tape prompts the
operator to advance the tape, more than one
record may be lost.
As another choice for a data check, the
operator may backspace two characters and
attempt another read operation (replY.5)·.
If this read is correct, no data check has
been detected and processing continues.
Neither bit 6 n'or 7 is turned on.
If an
error is detected, however, the operator
may reply with a 4 that turns on bit 6, or
with any character other than 0-5 that
turns on bit 7.

.Records retrieved from any input file
except disk or magnetic tape are always
considered unblocked (specified as
unblocked or undefined).
Records on disk
or tape are treated as unblocked if this is
specified in the DTFSR entry RECFORM.
Whenever records are unblocked (either
fixed or variable length) and only one
input area is used, each GET transfers a
single 'record from an I/O device to the
input area, and then to a work area if one
is specified in the GET instruction.
If
twginEut areas are specified, each GET
makes the last record that was transferred

to main storage available for processing in
the inp~t area or work area.
The same GET
also starts the transfer of the following
record to the other input area.
When an IBM-2540 Card Read-Punch is used
for a card input file, each GET instruction
normally reads the record from a card in
the read feed~ However, if the 2540 has
the punch-feed-read special feature
installed and if CMBND is specified in the
DTFSR entry TYPEFLE, each GET reads the
record from a card in the punch-feed, at
the punch-feed-read station. This record
can be updated by additional information
and punched back into the same card, when
that card passes the punch station and a
PUT instruction is issued.
(See
PU Tl._!!B1 at.!.n.g. )
On the IBM 1285 and 1287 Optical
Readers, fixed unblocked records should be
used when processing journal tapes
containing lines with an equal number of
characters.
For documents on the 1287,
processing is similar to _that of undefined
records, because the fields read may be
treated as either fixed- or variable-length
by setting the suppressed length indicator
(SLI--flag bit 34) in the CCW used to read
the document field.
However, the user is
not required to use RECSIZE and IOREG, and
can eliminate these two registers if he
desires.

definition.
GET treats undefined records
as unblocked, and the proqrammer must
locate individual records. and fields.
Undefined records are considered to be
variable in length by IOCS. No other
characteristics of the record are known by
IOCS. They are the responsibility of the
user.
Journal tapes containing lines of
variable character length are processed in
this manner on the 1285 and 1287. When
documents specified as undefined are
handled by the 1287 reader, the entry
RECSIZE pertains only to the last field
read by the channel command word chain.

If records on tape are to be read backwards
(]!CK-specified in DTFSR entry READ),
unblocked records or blocks of fixed-lenqth
records are transferred from tape to main
storaqe in reverse order.
The last block
is read first; the next-to-the-last block,
second; etc. For blocked redords, each GET
instruction also make~ the individual
records available in reverse order.
The
last record in the input area is the first
record available for processing (either by
indexing or in a work area).
Variable-length blocked records cannot be
read cacKwards.
Nine-track tape can be read backwards
without qualification, but 7-track tape can
be read backwards only if:

When records on disk or tape are specified
as blocked in the DTFSR entry RECFORM, each
individual record must be located for
processing (deblocked).
Therefore, blocked
records (either fixed or variable length)
are handled as follows:
,.

The first GET instruction transfers a
block of records from disk or tape to
the input area.
It also initializes
the specified register to the absolute
address of the first data record, or it
transfers the first record to the
specified work area.

•

the tape was originally written on a
magnetic tape unit of the IBM
System/360,

•

the Data Conversion special feature was
not used when the tape was written, and

•

a tape mark was written at the
beginning of the tape preceding the
data records.

I

2.

3.

Subs€quent GET instructions either add
an indexing factor to the register or
move the proper record to the specified
work area, until all records in the
block have been processed.
Then the n~xt GET makes a new block of
records available in main storage , and
either initializes the register or
moves the first record.

When undefined records are to be handled,
the DTFSR entries RECFORM=UNDEF and
RECSIZE=n must be included in the file

II

IName I Op

I
I
I

I
I PUT
I PUT

,
I Operand

+-filename

I
I filename,workname

L-

This instruction writes, punches, or
displays logical records that have been
built directly in the output area or in a
specified work area.
It is used for any
output file in the system, and for any type
of record:
blocked or unblocked, fixed or
variable length, and undefined. It
operates much the same as GET but in
reverse.
It is issued after a record has
been built.
----Macro Instruction Statements

77

Similar to GET, the PUT macro
instruction is written in either of two
forms, depending on the area where the
records are bui~t.
Either form, but not
both,· can be used for one DTFSR-specified
logical fi1~~ The first form is used if
records are built directly in the output
area(s), and. it requires only one
parameter. This parameter specifies the
name of the file to ~hich the record is to
be transferred. The file name must be the
same as the one specified in the DTFSR
header entry for this file.
The output area must be specified in the
DTFSR entry IOAREA1.
Two output areas may
be used to permit an overlap of data
transfer and processing operations. The
second area is specified in DTFSR IOAREA2.
Whenever two output areas are specified,
the IOCS routines transfer records
alternately from each area. They
completely handle this "flip-flop" so that
the proper output-record area is always
available to the program for the next
consecutive output record.
When records are built in the output
area(s), a general-purpose register must be
specified in the DTFSR entry IOREG if:
1.

Records are blocked, or

2.

Two output areas are used, for either
blocked or unblocked records.

This register always contains the
absolute base address of the currently
available output-record area. The PUT
routine places the proper address in the
register.
The §econd t~xm of the PUT instruction
is used if records are built in a work
area. It causes the PUT macro to move a
record from a specified work area to the
proper location in the DTFSR-specified
output area.
As in the first form, the
file name must be entered as the first
parameter. The name of t~e work area is
entered as the second parameter, and YES
must be specified in the DTFSR entry WORKA.
The work-area name must be the same as that
specified in the DS instruction that
reserves the area of main storage •
Indi vidual records for a logical file may
be built in the same work are~ or in
different work areas.
Each PUT instruction
specifies the work area where. the completed
record was built. However, only one work
area can be specified in anyone PUT
instruction.
Whenever this form of the PUT
instruction is used for ~ logical file, a
register is not· required for indexinq.
Whenever an output data record is
transferred from an output area to an I/O
device (by a PUT instruction), the data
78

S/360 BaS Assembler with I/O Macros

also remains in the output area until it is
either cleared or replaced by other data.
IOCSdoes not clear the output area.
Therefore, if the user plans to build
another record whose data does not use
every position of the output record area,
he must clear that area before he builds
the record. If this is not done, the new
record will contain interspersed characters
from the preceding record. For example; in
the case of output to a printer, the forms
design may require printing in selected
positions on one print line and in
different positions on another line.
In
this case, the output area for the printer
file should be cleared between lines.
Unb10ck~ecorg§

Records transferred to any output file
except disk or magnetic tape are always
considered unblocked (specified as
unblocked or undefined).
Records for disk
or tape recording are treated as unblocked
if this is specified in the DTFSR entry
RECFORM.
Whenever records are unblocked (either
fixed or variable length), each PUT
transfers a single record from the output
area (or input area if updating is
specified) to the file.
If a work area is
specified in the PUT instruction, the
record is first moved from the work area to
the output area (or input area) and then to
the file.
Blocked Records
When blocked records are to be written on
disk or tape (as specified in DTFSR
RECFORM), the ihdividua1ly built records
must be formed into a block in the output
area. Then the block of records ~s
transferred to the output file.
The
blocked records may be either fixed or
variable length.
Fix~d-length blocked records can be
bui~t directly in the output area or in

a
work ar~a.
Each PUT instructi~n for these
records either adds an indexing factor to
the register, or moves' the completed record
from the specified work area to the proper
location in the output area.
When an
output block of records is complete, PUT
causes the block to be transferred to the
output file and initializes the register if
one is used.
Variable-l~.illl!.h.:..blocked.:...£§.£Qrds can also
be built in either the output area or a
work area. The length of each
variable-length record must be determined
by the problem program and included in the
output record as it is built. The problem
program can calculate the lenqth of the
output record from the lenqth of the

corresponding input records.
That is,
variable-length output records are
generally developed from previously written
variable-length input records, perhaps
modified by current- records. Each
variable-length input record must include
the field that contains the length of the
record (see Figures 12 and 13).
When variable-length blccked records are
built in a work area, the PUT instruction
performs approximately the same functions
as it does for fixed-length blocked
records.
The PUT routines check the length
of each output record to determine ~f the
record will fit in the remaining portion of
the output area. If the record will fit,
PUT immediately moves the record.
If it
will not fit, PUT causes the completed
block to be written and then moves the
record.
Thus, this record becomes the
first record in a new block.
If variable-length blocked records are
to be built directly in the output area
however, an additional DTFSR entry, a TRUNC
macro, and additional user programming are
required. The user's program must
determine if each record to be built will
fit in the remaining portion of the output
area. This must be known E~fore processing
of the record is started so that, if the
record will not fit, the completed block
can be written and the record can be built
at the beginning of a new block.
Thus, the
length of the record must be pre-calculated
and compared with the amount of remaining
space.
The amount of space available in the
output area at any time can be supplied to
the program (in a register) by the IOCS
routines. For this, the user must specify
a general-purpose register in the DTFSR
entry VARBLD. This register is in addition
to the register specified in DTFSR IOREG •.
Each time a PUT instruction is executed,
Ioes loads into this register the number of
bytes remaining in the output area. The
problem program uses this to determine if
the ~xt variable-length record will fit.
If it will not fit, a TRUNC macro
instruction must be issued to transfer the
block of records to the output file and
make the entire output area available for
building the next block.

When undefined records are handled, PUT
treats them as unblocked. The programmer
must provide any blocking he wants. He
must also determine the length of each
record (in bytes) and load it in a register
for IOCS use, before he issues the PUT
instruction for that record.
The register
that will be used for this purpose must be
specified in the DTPSR entry RECSIZE.

A consecutive file on 2311 disk, a card
input file in a 1442 or 2520, or a card
file in the punch feed of a 2540 equipped
with the punch-feed-read special feature,
can be updated. That is, each disk or card
record can be read, processed, and
transferred back to the same disk location,
or card, from which it was read.
This
function must be specified in the file
definition. For a disk file, the DTSFR
entry UPDATE must be specified. In the
case of a card file, the file must be
specified as a combined file (CMBND) in the
DTFSR entry TYPEFLE.
One I/O area can be specified (DTFSR
entry IOAREA1) for both the input and
output of a disk or card record.
If the
IBM 1442 is used, however, separate areas
can be specified for input and output
(DTFSR entries INAREA and OUAREA ).
Each
disk or card record is transferred to the
specified input area (IOAREA1 or INAREA) by
a GET instruction.
After the record is
processed, the next PUT instruction causes
the updated record to be written in the
same disk location, or punched in the same
card, from which the record was read.
PUT
transfers the record from the main storage
area specified by IOAREA1 (same area for
both input and output) or by OUAREA
(separate input and output areas).
If a
work area is specified in the PUT
{nstruction, PUT first moves the updated
record from the work area to the area
specified by IOAREA' or OUAREA, and then
writes the disk record or punches the card.
A GET instruction must always precede a
PUT instruction for a disk or card record,
and bnly one PUT can be issued for each
record.
For a file in a 2540 or 2520 with
the punch-feed-read special feature, a PUT
instruction must be issued for ~ach card~
and between jobs the 2540 punch must be run
out.
A PUT instruction may be omitted,
however, if a particular disk record or a
card record in a 1442 does not require
updating.
The user, while using logical IOCS
(TYPEFLE=CMBND), is provided with the
standard read error recovery procedure when
reading and punching into the same c~rd.
No punch error recovery procedure, however,
is provided.

Card selection in a card read-punch and
line spacing or skipping in a printer can
be controlled either by specified
characters in the data records or by the
CNTRL macro instruction. Either method,
but not both, may be used for a particular
logical file.
Macro Instruction statements

79

When control characters in data records
are to be used, the DTFSR entry CTLCHR must
be specified, and ev~z record must contain
a control character in the main-storage
output area.
This must be the first
character of each fixed-length or undefined
iecord, or the first character following
the record-length field in a
variable-length record.
The DTFSR BLKSIZE
specification for the output area must
include the byte for the control character
and, if undefined records are specified,
the DTFSR RECSIZE specification must also
include this byte.
The particular character included in the
record is determined by the function to be
performed. For example, if double spacing
is to occur after a particular line is
printed, the code for double spacing must
be the control character in the output line
to be printed.
The contrcl-character codes
are the same as the command codes
(including the modifier bits) used for a
punch or delayed-print command.
When a PUT instruction is executed, the
control character in the data record
becomes the command code (byte) of the
Channel Command Word (CCW) that laCS
establishes. The first character after the
control character in the output data
becomes the first character punched or
printed.
If the CNTRL macro instruction is used
for non-data orders to the punch or printer
(see £NTRL~~~Q), the DTFSR entry CONTROL
is specified and DTFSR CTLCHR must be
omitted.
In this case, any control
characters included in data records are
ignored when the PUT instruction is
executed. They are treated as data.

r-----~----~il~------

IName t Op

I Operand

~--~---+-----

t

I RELSEI

L

I

filename

I

The RELSE macro instruction is used in
conjunction with blocked input records read
from disk or tape.
It allows the
programmer to skip the remaining records in
a block and continue processing with the
first record of the next block when the
next GET instruction is issued. This
function can apply to a job in which
records on disk or tape are categorized.
Each category (perhaps a major grouping) is
planned to start as the first record in a
block.
For selective reports, specified
categories can be located readily by
checkinq only the first record in each
block.
80

S/360 BaS Assembler with I/O Macros

The symbolic name of the file, specified
in the DTFSR header entry, is the only
parameter required for this instruction.
The release instruction discontinues the
deblocking of the present block of records,
which may be either fixed or variable
length. RELSE causes the next GET
instruction to transfer a new block to the
input area, or switch I/O areas, and make
the first ~ecord of the next block
available for processing.
GET initializes
the register or moves the first record to a
work area.

rj-----,-------TI-----

IName

Op

----------------------,

I Operand

J~----+------+I----

I

TRUNCI

filename

~I----~~__--~I-----

I

,

I
~

The TRUNC (truncate) macro instruction is
used in conjunction with blocked output
records that will be written on disk or
tape.
It allows the programmer to write a
short block of records.
(Blocks do not
include padding.)
Thus the TRUNC macro can
be used for a function similar to the RELSE
instruction for input records, but in
reverse.
That is, when the end of a
category of records is reached, that block
can be written and the new category can be
started at the beginning of a new block.
The symbolic name of the file, specified
in the DTFSR header entry, is the only
parameter required in this instruction.
If
this macro is issued for fixed-length
blocked disk records, the DTFSR entry
TRUNCS mast be included in the file
definition.
When TRUNC is issued, the short block is
written (on disk or tape) and the output
area is made available to build the next
block.
The last record included in the
short block is the record that was built
before the last PUT instruction precedinq
TRUNC.was executed.
Therefore if records
.are built in a work area and the problem
program determines that a record belongs in
a new block, the TRUNC instruction should
be issued first, followed by the PUT
instruction for this particular record.
If
records· are built in the output area, however, the programmer must determine if a
record belongs in the block before he
builds the record.
When"ever variE!:.bl~-l~n.gth blocked records
are built directly in the output area, this
TRUNC instruction must be used to write a
completed block of-records.
When the PUT
instruction is issued after each
variable-length record is built, the output
routines supply the programmer with the

space (number of ~ytes) remaining in t~e
output area.
From this the programmer
determines if his ne.!!. variable7'"length
record will fit in the block., If it will
not fit, he issues the TRUNe instruction to
write out the block and make the entire
output area available to build the record.
The amount of remaining space is supplied
in the register specified in the DTFSR
entry VARBLD (see PUT_~and QTFSR

VA.R!!112> •

,-----,--

I

IName I Op

I

I

Operand

I

i---t----t-----------------t
I
I

I READ t
I
I

I

filename,OR,

n~

(r)

I

I
I
I

The READ macro is used to transfer records
from the IBM 1287 Optical Reader operating
in document mode. All operands are
required. The f~rst Earam~ter specifies
the symbolic name Gf the file as given in
the DTFSR header entry.
The second
~£~mete£, OR, indicates an optical
character reader. The t~~£Q Eg£~metg£
specifies the address of the user-provided
channel command word list.
The first
channel command word in the list cannot be
a transfer-in-channel CCW. To designate
the aodress of the channel command word
list, a register entry is used in this
parameter~

Note:

Document ejection and/or stacker
and document increment functions
can also be accomplished by including the
appropriate eCW(s) within t~e channel
command word list addressed by the READ
macro rather than by using the CNTRL macro.
This technique results in increased
document throughput.

'~election

READ generates an EXCP and a CCB macro,
cause a branch to the user-provided
channel com~and chain. 'When ~ocuments are
being precessed, only one input area may be
used. The contents of the input, area may
later be moved to a user-defined work area.
Overlap can thus be obtained by processing
the contents of the work area as the
subseguent' document is being read into the
input area.
Dividing the fields in a
document into blocks, and processing one
block while reading the rest, is another
means of achieving overlap.
whic~

At least one reference mark is required
for all documents.
New coordinates for the
reference mark must be specified whenever a
rotation in printing occurs or when a
document is incremented.
For this reason,
a load format CCW that specifies the
coordinates of the reference mark
associated with a particular group of

fields must be the first ecw in'all user
channel command word chains.

i

I

I

I Name

Op

I
IL-____

Operand

I

I
~

filename

WAITFI '
____

I

-1
I

~

The WAITF macro instruction is used only
with the 1287 Optical Reader in document
mode for consecutive processing.
It
ensures that the transfer of a record has
been completed. One parameter, the
symbolic name of the file, is required.
With this instruction, the program waits
until data transfer is complete.
Therefore, the instructi9n must come after
a READ and before the next READ for the
same file.
It must be issued before the
problem program attempts to process an
input record 'for that file.

r--

II

lNa~e

10perationiOperand

I

I

L--

I

,

l[name]IRDLNE

-+-

tfilename

I

I
--t
I
I

The RDLNE macro selectively performs
on-line correction when journal tapes are
processed on the IBM 1285 or 1287 optic~l
Reader.
This macro causes the reader to
read a line in the on-line correction mode
while-processing in the off-line correction
mode.
If the reader cannot read a
character, IOCS retries the line that
contains the unread character.
If this
retry is unsuccessful, the user is informed
of the condition in his error correction
routine (specified in DTFSR COREXIT).
He
may then issue the RDLNE macro causing
another attempt to read the line.
If the
character in the line cannot be read during
this attempt, the character is displayed on
the 1285 or 1287 display scope and the
operator, if possible, keys in the correct
character.
If the operator cannot readily
correct the error by keying in the correct
character, he may enter the reject
character in the line in error. This
condition is posted in Filename+17 and is
available for the user to examine.
Wrong-length records or incomplete reads
are also posted in Filename+17.
See the
description of COREXIT for hexadecimal
indications. RDLNE should be used only in
eOREXIT.
Otherwise, the line following the
one in error is read in the on-line
correction mode.
The macro requires o~ly one parameter
(the symbolic name of the 1285 or 1287 file
Macro Instr~ction statements

81

from ~hich the r~cord is to be retrieved).
This name is the same· as that specified in
the DTFSR header entry for this file.

is command chained to
that field.

th~

ccw

used to read

~:

Note:

When the RDLNE macro is used, the
must include the' parameter OFFLINE=YES
in his DTFSR· entries~

user
•

i

i

IName IOperationlOperand
lI
I
l[name]IDSPLY
IFilename,r,r
L---_~

-L

The DSPLY macro is used to display a
document field on the display scope of the
1287. The field is displayed for the
purpose of keying in a complete field cn
the'keyboard when a 1287 read error makes
this type of correction necessary.
If a
1287 read error occurs and the reject
character is entered in the field in error
(either by the operato~ if processing in
the on-line correction mode or by the
device if processing in the off-line
correction mode), the user may use the
DSPLY macro to display the field in error.
When the 1287 display tube displays the
full field, the operator, if possible, ~eys
in the correct field from the keyboard.
The field read from the keyboard is always
read into the a4dress specified in the CCW
(normally within IOAREA1) that was
originally intended for the field.
The
macro first blanks this field.
At
completion of the operation, the data is
left-justified in this field.
This instruction always requires three
parameters •. The first parameter specifies
the symbolic name of the 12'87 file from
which the record is to be retrieved. This
name is the same as that specified in the
DTFSR header entry for this file~ The
second parameter specifies a general
purpose register (2-11) into which the
problem program has plac ed the address of
the Load Format CCW that provides the
document coordinates for the field to be
displayed. The address of this Load Format
CCW is obtained by subtracting 8 from the
address found in a half-word core location
at Filename+10 when the macro is used in
the COREXIT routine.
Otherwise the user
must determine the Load Format CCW address.
The third parameter specifies a general
purpose register (2-11) into which the
problem program has placed the address of
the Load Format CCW that provides the
coordinates of the reference mark
associated with the field to be displayed.
When using the DSPLY Macro, the user must
ensure that the Load Format CCW that
provides the document coordinates for the
field to be displayed (second parameter),
82

The contents of Filename+17 are
meaningful only for X' 40' (1287 scanner
cannot locate the reference mark) and X'04'
(wrong length record), after issuing the
DSPLY macro. Therefore the user must
determine whether the operator was able to
recognize the unreadable line of data.

S/360 BOS Assembler with I/O Macros

r--

I

I

IName I Operation I Operand
.I
-t-._-l[name]IRESCN
Ifilename,r,r,n,F
________.________________ J
'----~--------~-

The RESCN macro selectively rereads a field
on a document when a defective character
makes this type of operation necessary.
The field read is always read
right-justified into the address specified
in the CCW (normally within IOAREA1) that
was originally intended in the field.
The parameter filename specifies the
symbolic name of the 1287 file from which
the record is to be retrieved. This name
is the same as that specified in the DTFSR
header entry for this file.
The second
parameter specifies a general purpose
register (2-11) into which the problem
program has placed the address of the Load
Format CCW that provides the document
coordinates for the field to be read. The
address of this Load Format CCW is obtained
by subtracting 8 from the address found in
a half-word core location at Filename+10
when the macro is used in the COREXIT
routine. otherwise the user must determine
the Load Format CCW address.
The third
parameter specifies a general purpose
register (2-11) into which the problem
program has placed the address of the Load
Format CCW that provides the coordinates of
the reference mark associated with the
field to be read.
The previous three
parameters are always required, and result
in one reread of the unreadable field.
The fourth parameter is required if the
user wishes to attempt more than one reread
of the unreadable field.
This parameter
(n) is the number of additional retries
(nine maximum) to be attempted. The fifth
parameter (F) indicates one more reread.
It forces on-line correction of any
unreadable characters by individually
projecting the unreadable character(s) on
the 1287 display scope.
The operator must
then key in a correction (or reject)
character(s). The user must determine
whether the read operation generated by
RESCN has resulted in a more satisfactory
read.
If the reread of the field results
in a wrong length record, incomplete read,

or an unreadable character error condition,
it is posted in Filename+ 17.
(See
description of COREXIT for hexadecimal
values. )
When using the RESCN macro, the user
must ensure that tbe Load Format CCW, which
provides the document coordinates for the
field to be read (second parameter), is
command chained to the CCW used to read
that field.

r---"-T----~

i

I Name

I

lOp

I-----+I

ICNTRL

IOperand

t--------------.
Ifilename,code,n,m

'-_---1.,

for STR devices.
The fou£1h E~£am~ter (m)
applies only to printer control and is
required for delayed spacin~ or skippinq.
A number specified as either the third or
fourth parameter must be a self-defininq
vallle.
Whenever CNTRL is issued in the problem
program, the DTFSR entry CONTROL must be
included in the file definition.
The CNTRL macro instruction must not be
used for printer or punch files if the-data
records contain control characters and the
DTFSR entry CTLCRR is included in the file
definition.

I

I

The CNTRL (control) macro instruction
provides orders for these input/output
units:
maqnetic tape units, card
read-punches, printers, optical readers,
and disk drives.
Orders apply to physical
non-data operations of a unit (with the
exception of the 1285 and '287 Optical
Readers) and are peculiar to tbe unit
involved. They specify such functions as
rewindinq tape, card stacker selection,
line spacing on a printer, etc. For
optical readers they specify marking an
error line or keyboard correcting a line
for journal tapes, and stacker selecting,
ejecting, and incrementinq documents.
When
a CNTRL macro instruction is executed,
except for certain mnemonics used for
optical re~ders, operation does not wait
for completion of tbe order before
returning control to the user.
CNTRL is used in conjunction with a
logical file in a unit, and it requires
either two, three, or four parameters. The
fi£2~rameter must be tbe name of the
file specified in the DTFSR header entry.
The ~nd-Earame!~·is the mnemonic code
for the order to be performed.
This must
be one of a set of predetermined codes
(Figure 14). The thi~arameter (n) is
required whenever the UCS (Universal
Character Set) feature is used, or a number
is needed for stacker selection, immediate
printer carriage control or signal count

The CNTRL macro instruction is used to
control magnetic-tape functions that are
not concerned with readinq or writinq data
on the tape.
These functions are grouped
in the following categories:
Rewinding tape to the load point
REW - Rewind
RUN - Rewind and unload
Movinq
BSR BSF FSR FSF -

tape to a specified position
Backspace to interrecord qap
Backspace to tapemark
Forward space to interrecord qap
~orward space to tapemark

Writing a tapemark
WTM - Write tapemark
Erasing a portion of the tape
ERG - Erase gap (writes blank tape)
The tape rewind CREW and RUN) and tape
movement (BSR,BSF,FSR,and FSF) functions
can be used before a tape file is opened.
This allows the tape to be positioned at a
desired location for opening a file under
conditions such as:
•

The file is located in the middle of a
multifile reel.

•

The DTFSR entry REWIND specifies NORWD,
but for some conditions rewindinq is
required for the file.

Macro Instruction statements

83

UNIT
2400 Series
Magnetic Tape Units

MNEMONIC
CODE

n*

m**'

-

-

ORDER

REW
RUN
ERG
WTM
BSR
BSF
FSR
FSF

-

-

Rewind Tape
Rewind and Unload Tape
Erase Gap (Writes Blank Tape)
Write Tape Mark
Backspace to Interrecord Gap
Backspace to Tape Mark
Forward Space to Interrecord Gap
Forward Space to Tape Mark

1403, 1404, 1443, 1445 Printers

SP
SK

a
b

d
e

Carriage Space n Lines
Skip to Channel n

1403 Printer with UCS Feature

UCS
UCS

YES
NO

-

Ignore Data Checks
Accept Data Checks

2540 Card Read - Punch

PS

c

-

Select Stacker n

1442, 2520 Card Read - Punch

SS

c

2311 Disk Storage Drive

SEEK

1285 Optical Reader

READKB
MARK

1287 Optical Reader

STR Devices

t

BCS Support

t

READKB
MARK
EJD
SSD
ESD
INC

c
c

-

-

-

-

-

Select Stacker n
Seek
Read 1285 Keyboard
Mark Error Line

-

Read 1287 Keyboard
Mark Error Line in Journal Tape Mode
Eject Document
Select Stacker n
Eject and Select Document
Increment Document at Read Station
End of Transmission
Inquiry
Prepare
Alternate Mode

EOF
INQ
PREP
TEL

f
f
f
f

-

PRP
EOT
WABT
DSC
ENQ

-

-

-

Prepare
End of Transmission
Wait before Transmitting
Disconnect
Inquiry

* a = Number of lines to be spaced immediately
b = Number of the carriage tape channel to skip to immediately
c = Number of the stacker to which a card or document is to be selected
** d = Number of Iines to be spaced after printing
e = Number of carriage tape channel to skip to after printing
* f = Count to be used if other than:
EOF
INQ
PREP
TEL

t

-

2
10
Not applicable
2

See Input/Output Control Macros

Figure 14.

84

-

CNTRL Macro Instruction Codes

S/360 BOS Assembler with I/O Macros

The t ape movement functions (B'SR, BSF,
FSR, and FSF) apply to input files only,
and the following factors should be
cons ider ed:
Th~

1.

FSR (or BSR) function permits the
user to skip over a physical tape
record (from one interrecord gap to the
next). The record is passed without
being read into main storage.
The PSF
(or BSP) function permits the user to
skip to the end of the logical file
(identified by a tapemark) •

2.

The functions of FSR, FSP, BSR, and BSF
always start at an interrecord gap.

3.

If blocked input records are being
processed and if the user does not want
to process the remaining logical
records in the block, as well as one or
more succeeding blocks (physical
records), he must issue a RELSE macro
before the CNTRL macro. Then the next
GET viII make the first record of the
new block available for processing. If
the CNTRL macro,' with FSR for example,
were issued withQ~~ a preceding RELSE,
the tape would be advanced but the next
GET would make the next record in the
old ' block available 'for processing.

4.

For any I/O area combination except one
I/O area and no work area, IOCS is
always reading one physical tape record
ahead of the one that is being
processed.
Thu~, the next physical
record (block) after the' one being
processed will be in main storage ready
for processing. Therefore if a CNTRL
FSR function is performed, the §econd
physical tape'record beyond the present'
one will be passed without being read
into main storaqe.

5.

If an FSR function (or BSR in a read
backwards file) passes a tape mark,
IOCS branches to the end-of-volume
routine.

6.

If any of these four functions is used
during the processing of a file, the
block count accumulated for checking
standard labels, or accumulated for the
checkpoint macro, could be wrong. The
operator can bypass an erroneous block
count when checking standard labels.
However, since it is impossible to
reposition the tape correctly if ·the
block count is wrong in a checkpoint
record, these commands should not be
issued when using the checkpoint macro.

The CNTRL macro instruction is used for any
printer forms control other than the
standard single spacing.
The CNTRL macro codes for printer
operations cause spacing (SP) over a
specified number of lines, skippiriq (S~) to
a specified location on the form
(represented by a carriage-tape channel) ,
or ignoring/accepting data che~ks for
unprintable characters when the Universal
Character set (UCS) special feature is
installed in a 1~03.
The third parameter
is required for immediate spacing or
skipping (before printing), or to ignore
(YES) or accept (NO) data checks.
The
fourth parameter is required for delayed
spacing or skipping (aft~r printinq).
The SP and SK operations can be used in
any seguence. However, two or more
consecutive immediate skips (S~) to the
same carriaqe channel on the same printer
have the same effect as the i!rst skip
only. That is, any skip order after the
first is ignored. Two or more consecutive
delayed'spaces (SP) and/or skips (SK) to
the same printer result in the las! space
or skip only. Any other combination of
consecutive controls (SP and SK), such as
immediate space followed by a delayed skip
or immediate space followed by another
immediate space, causes both specified
operations to occur.
The CNTRL UCS macro instruction
generates a command code to ignore, or
accept, data checks for unprintable
characters.
If the parameter YES is
specified, data checks resulting from
unprintable characters are ignored and
processing continues. If the parameter NO
is specified, an unprintable character data
check causes processing to stop and a
message to be issued to the operator. The
generated command code remains fixed until
another CNTRL UCS instruction is issued, or
until the command code is changed by an
ASSGN control card or the UCS load buffer
program.
If CNTRt UCS is issued for.a
printer without the Universal Character ,Set
special feature, a command reject occurs
and the system enters the wait state.
IBM 2540 Card Read-Punch
Cards fed into the IBM 2540 read feed are
normally selected by IOCS to stack in th~
Rl pocket, and those fed in the punch feed
are selected to stack in the P' pocket.
The CNTRL macro code PS is used to select a
card into a different stacker, specified
by the third parameter(n) in this
instruction.
Whenever CNTRL is used for
any cards in a file, all cards must be
selected by this macro. For an input file,
Macro Instruction statements

85

each GET instructiQn must be followed by a
CNTRL instruction to properly select the
card just read.
For an output file, each
PUT must be preceded by a CNTRL instruction
to properly select the card' that will
contain the record beinq built. The
possible selections are:

processed by the indexed sequential system
(ISFMS).
This macro permits access
movement to begin for the next READ, WRITE,
GET, or PUT instruction for a file.
While
the armis movinq, the programmer may
process data and/or request I/O operations
on other devices.

Sel~£tion

To use CN~RL for seeking in the direct
access method, the user must first specify
a track address to which access movement
should begin. This address must be stored
in the track-refe-rence field specified by
the' DTFDA entry SEEKARD.
(The user must
supply this address before issuinq the
CNTRL macro instruction.)
For consecutive
files, IOCS seeks the track that contains
the next block (or physical record) for the
file.
The user does not supply a track
address.

Fe~~

pockel·

Read
Read
Read
Punch
.Punch
Punch

R'
R2
RP3
P1
P2
RP3

,

Number

2
3
1
2
3

For input files, the CNTRL macro can be
used only when one I/O area, or one I/O
area and one work area, is specified for
the file.
For output. files, the CNTRL
macro may be used in conjunction with any
of the permissible I/O area and work area
combinations (see PrQ£essin~Qrds
Con§ecutively: storage A~) •

If the CNTRL macro is not used, IOCS
performs the seek operation when a READ,
WRITE, GET, or 'PUT instruction is executed.

IB1!...;.1442-2L~21Q~ar.2.Read-PuI;lch

IBM '285 or 1287 Optical Reader-

Cards fed in the IBM 1442 or 2520 are
normally stacked in pocket 1.
However,
they may re selected' to stack in pocket 2
by using the CNTRL macro code SSe

The CNTRL macro instruction with the READKB
mnemonic allows the user to read a complete
line from the 1285 or 1287 keyboard when
processing journal tapes.
This permits the
user to key in a complete line on the
keyboard when a read error makes this type
of correction necessary.
When IOCS exits
to the user's COREXIT routine, the user may
issue the CNTRL macr~ instruction to read
the keyboard. The display tube will
display the full line and the operator
will, if possible, key in the correct line
from the keyboard.
The line read from the
keyboard will be'available in the area that
previously contained the erroneous record,
i.e., the area that the GET macro
instruction was serving when the error
occurred.
The READKB mnemonic causes the
problem program to wait for completion of
the operation before control is reqained.

In a card-reag operation (input or
combined file), a card can be selected to
pocket 2 by .issuinq t~e CNTRL instruction
after the GET instruction for that card,
and before the GET instruction for the
following card is issued.
When the
following card is read, the first card is
stacked in pocket 2.
Whenever CNTRL is
used for any card in an input file with a
work area, gIl-cards must be selected by
this macro.
Whenever CONTROL = YES is specified in
DTFSR (Output File), the first PUT for that
file must be. preceded by a CNTRL macro.
For input files, the CNTRL macro can be
used only when one I/O area, or one I/O
area and one work area, is specified for
the file.
For output files, the CNTRL
macro may be~sed in conjunction ~ith any
of the permissible I/O area and work area
combinations (see Processing Records
Co~utivelY.i.__ storgge A~).
For
combined files (DTFSR TYPE~LE=CMBND), the
CNTRL macro can be used only when one I/O
area (no work area) is specified for the
file.

The CNTRL macro for seeking on the 231'
applies only to files processed
consecutively or by the direct access
method (DAM). It does not apply to files
86

S/360 BOS Assembler with I/O Macros

If an error (data transfer error) occurs
while processing in the journal tape mode,
the CNTRL macro instruction used with the
MARK code can provide a program-controlled
means of marking lines resulting in actual
or suspected errors.
To ensure that the
proper line is marked, the user must issue
the CNTRL macro in his COREXIT routine. If
the CNTRL macro is issued at any other
time, the line following the line in error
will be marked.
When processing in the document mode,
the CNTRL macro may be used with the EJD
mnemonic to eject each document.
The EJD
mnemonic ejects the current document and
feeds the next document.
The CNTRL macro
with the SSD mnemonic may be used to
perform the stacker selection function.

It is possible to combine the ejection
and selection functions by using the ESD
mnemonic. In such cases, the combined
mnemonic ~us1 not be immediately preceded
by an eject command or immediately followed
by a stacker select command.
A selection number of ~, 2, or 3 will
direct the document to stacker A, B, or R
~eject) ,respectively.
It is also
possible to select stacker A a~d B in an
alternate stacking mode.
In this mode,
stacker switching is automatically
initiated when one stacker becomes full.
The selection number for alternate stacking
is 4. Stacker A fills first when selection
number 4 is used in the first stacker
selection macro.
If selection number 4 is
used subsequently to other selection
numbers, the selection number immediately
preceding number 4 determines the stacker.
Ejection and selection of documents ~st
occur alternately.
For documeats with a scannable length
greater than 6 inches, the INC mnemonic
effects document incrementation, which is
forward document movement of 3 inches. It
may be used only once for each document.

Document ejection and/or stacker selection
and document increment functions can also
be accomplished by including the
appropriate CCW(s) within the channel
command word list addressed by the READ
macro rather than by using the CNTRL macro.
This technique results in increased
document throughput.
The stacker select command must follow the
eject command within 270 milliseconds if
the document was incremented or within 295
~illiseconds if' the document was not
incremented.
If timing requirements are
not met, a late stacker selection condition
occurs (see COREXIT routine).

The CNTRL macro for STR devices is
described under Processing· with STR
Devices: CNTRL Macro.

A system may have one or more 2-channel,
simultaneous read-while-write tape control
units, which must be connected to selector
channels 1 and 2 (special feature).
When
it does, the programmer should assign all
tape in£Q! files for a job to one channel,
and all tape output files to the other
channel~
This utilizes the maximum
reading-while-writing capability of such a
system. During the job, however, the
program may require that 'a particular tape
unit be switched from one channel to the
other. For example, an output file of
records may be completed during one phase
of the job, and then be needed as input to
a subsequent phase. Conversely, after the
records from an input file have been
processed, that same file may become an
output file to write changed, or different
records.
The CHNG (change) macro instruction can
be used to switch a tape unit from one
selector channel to the other (from input
to output status, or vice versa). The
symbolic unit, specified in the DTFSR entry
DEVADDR and named in the Job Control ASSGN
car~, is the only parameter required in
this instruction. The CHNG macro merely
switches channel assignments; it does not
change the symbolic reference to the unit.
This macro may be used in conjunction with
either logical or physical IOeS
i~structions.
.
This macro instruction must not-be
issued while the file(s) associated with
the symbolic unit is Qpen.

rl----~------~i-------------------------------,

IName

op

I

I

I

I

PRTOVI

i

Operand

I

filename,n,routine-name

,
I

'

,

The PRTOV (printer overflow) macro
instruction is used in conjunction with a
logical file in a printer to specify the
operation to be performed on a ca~riaqe
overflow condition. Whenever this macro
instruction is to be issued in a problem
program, the DTFSR entry PRINTOV must be
included' in the file definition.

BSC SU.E£.Qrt
The CNTRL macro for BSC support is
described under ~inall' Synchronous
C01!!!!LY1!i£ati.Q'!!: ~NTR1-Macro.

•

I

0 perand
r
.-,----r---------+---------------------.----------~.

I Name

Op

I

CHNG

SYSnnn

I

PETOV requires two or three parameters.
The first parameter·must be the name 0f the
logical file specified in the DTFSR header
entry. The second_ parameter must specify
the number of the carriage tape channel {9
or ~2} used to indicate the overflow. This
is entered as immediate data 9 or 12. The
channel 9 or 12 overflow signal is turned
on by any PUT macro insfruction that causes
printing on the overflow line, or by a
CNTRL SP macro instruction that causes
spacing over the overflow line of the form.
Macro InstructLon Statements

87

When the first two parameters are specified
and an overflow condition occurs, IOCS
restores the printer carriage to the first
printing line on the form (Channel 1), and
printing of detail lines continues.

PUT

FILEA

-for Line X
Process

PRTOV

FILEA,12
Process

A third parameter is entered in this
instru~tion if the programmer prefers to
branch to his own routine on an overflow
condition, rather than skipping directly to
channel 1 and continuing with the detail
printing., It specifies the symbolic name
of the user's routine.
In this case, IOCS
does not restore the carriage to channel 1.
In his routine, th.e user may issue any
IOCS macro instructions (except PRTOV) to
perform whatever functions he desires. For
example, this allows him to print total
lines, skip to channel 1, and print
overflow page headings.
At the end of his
routine, the user must return to IOCS by
branching to the address in register 14.
TOCS supplies this address upon entry to
the user's routine. Therefore, if IOCS
macros are used in the routine, the address
must be saved.
If the user requires register 15 in his
routine, he must also save this register
and restore it prior to returning to his
main program.
The PETOV macro instruction may be
issued anywhere in the problem program.
The macro causes a skip to channel 1, or a
branch to the user's routine, only if an
overflow condition (a punch in carriage
channel 9 or 12) was previously detected as
a line was printed.
{An overflow punch is
nQi recognized during a carriage skip
operation.}
An overflow condition that is
detected as any' line is printed (PUT) is
recognized by the PRTOV macro after the
followinB-line is printed. For example in
the following program steps, if a channel
12 punch was read as line X was printed,
PRTOV causes a skip to channel 1 after lin~
X+ 1 is printed.
Thus, one extra line is always printed
after the overflow punch (9 or 12) is
detected and before the overflow functions
can occur.
Therefore, in planning a
printer operation, the overflow punch must
coincide with next-to-the-1ast line to be
printed on the form.

88

S/360 BOS Assembler with I/O Macros

PUT

FILEA

-for Line X+1
Process

PRTOV

FILEA,12

Skips to channel 1 if
overflow punch was
detected as Line X was
p'rinted
Process

PUT

FILEA

-for Line X+2

IOCS causes Line X+2 to be printed on
the first line of'the following page
whenever PRTOV specifies only the first two
parameters.
If a user's routine is
specified, however, the functions performed
ii that r6utine affect the positioning of
the form and thus determine where IOCS will
prini Line X+2 when the following PUT is
executed.
The channel 9 ~r 12 overflow signal is
turned off after the PRTOV macro has been
executed, or wb~n a CNTRL macro instruction
is issued to cause skipping to the first
printing line on the form (channel 1).
If a channel 9 punch is used in the
carriage tape, the PRTOV macro must request
posting of device end in the Command
Control Block (CCB) or a physical IOCS
error message will result.

PROCESSING DISK RECORDS BY THE DIRECT
ACCESS METHOD
Disk records can be processed in a random
order ,by the Direct Access Method (DAM).
In this method the user specifies the
address of the record to IOCS, and issues a
READ or WRITE macro instruction to transfer
the specified record.
Variations in the
parameters of the READ or WRITE
instructions permit records to be readi
written, updated, replaced, or added to a
file.
Whenever this method of processing
records is used, the logical file and
main-storage area(s) allotted to the file
must be defined by the declarative macro
DTFDA (Define the File for Direct Access).
The detail parameter entries for this
definition are .described under FileDefinition Macros.
----

Records on disk that will be processed by
DAM can have either of two formats:
with a
key area, or without.
with key area

.----,

r

I Key

I Data

L---I

L

L-

I count I

Wi thout key area

,

r--,

IL count
- -____.JI

L _ _ --'

i

i

I Datal

Whenever records in a file have keys
that are to be processed:

•

Ev,gU record must have a key,

•

All keys must be the same length, and

•

The length of the keys must be
specified in the DTFDA entry KEYLEN
(maximum length is 255 bytes).

Whenever the DTFDA entry KEYLEN is n01
specified for a file, IOCS ignores keys and
the disk records may, or may not, contain
key areas.
IOCS considers all records as unblocked
(one logical record per one physical
record).
If the user wants blocked
records, he must provide his own blockinq
and deblocking.
Records are also
considered to be either fixed length or
undefined.
(!!ndefin.§Q includes
variable-length records.)
The type of
records in the file must be specified in
the DTFDA entry RECFORM.
Whenever records
specified as undefinEd are to be loaded,
added, or written in a file, the user must
determine the length of each data record
and load it in a register (specified by the
DTFDA entry RECSIZE) before he issues the
WRITE instruction for that record.
IOCS
adds the length of the key when required.

Records in one logical file are transferred
to or from one I/O area in main storage.
This area must be large enough to contain
the larqest record in the file.
If
disk-record key areas are to be transferred

by a READ/WRITE instruction, the I/O area
must also provide space for the the length
of the key (specified in DTFDA KEYLEN).
Furthermore, if a file is to be created or
if records are to be added to a file, the
main-storage I/O area must include an
eight-byte £QQnt area.
The I/O area
requirements are illustrated schematically
in Figure 15 and described in detail in the
DTFDA entry IOAREA1.

With the direct access method of
processing, each record that is to be read
or written is specified by providing IOCS
with two references:

•

Track reference.
This gives the track
on which the desired record is located.

•

Record reference. This may be either.
the record key (if the records contain
key areas) or the record identifier
(ID) •

IOCS seeks the specified track, searches it
for the individual record, and causes the
record to be read or written, as indicated
by the macro instruction.
If a specified
record is not found, IOCS sets a
no-record-found indication in the u'ser' s
error/status field, which is specified by
the DTFDA entry ERRBYTE.
This indication
can be tested by the problem program, and
additional processing can be programmed to
suit the user's requirements.
Multiple tracks can be searched for a
record specified by key, if the DTFDA entry
SRCHM is included in the file definition.
In this case, if the record is not found
after an entire cylinder is searched, the
end-of-cylinder bit (instead of the
no-record-found bit) is set on in the
error/status field.
When the I/O operation is started,
control is returned immediately to the
problem program.
Therefore when the
program is ready to process the input
record, or build the succeeding output
record for the same file, a test must be
made to ensure that the previous transfer
of data is complete.
This is done by
issuing a WAITF macro instruction in the
problem program.

Macro Instruction statements

89

CREATE A FilE OR ADD RECORDS TO A FilE: RECORDS WITH KEY AREAS

I

Key

Count

I

I

Data

I

I

I

~11~------~I--------~i-------BlKSIZE=n-------------------------'~1

length ---+-I
8
{Bytes}'
I
IOAREAl

t

I KEYlEN=n I
I

I

largest Record

I

I

CREATE A FilE OR ADD RECORDS TO A FilE: RECORDS WITHOUT KEY AREAS

I

Count

I

.Doro

.I--------:~----- BlKSIZE=n --------------------~.

""'I

I

length ---+1
8
(Bytes)
I
IOAREAl

t

I

largest Record

I

READ OR WRITE (UPDATE) BY KEY, OR BY 10 WITHOUT DTFDA KEYlEN

I

I

Data

I

I"

I

BlKSIZE=n
largest Record

length ~
(Bytes)
I
IOAREAl

t

t

I
I

I

READ OR WRITE (UPDATE) BY 10 WITH DTFDA KEYlEN

I.

Key

I

Data

I

I

11--------;..---------- BlKS IZE=n ---------------------M.I
length --+I KEYlEN=n
:largest Record
I
(Bytes)
I
I
1-011

t

'IOAREAl '

READ OR WRITE (UPDATE) BY KEY AND BY 10 WITH DTFDA KEYlEN*

I~_,(_un_:_:_d_)*~i~

______~or ___:_:_:____________~1

I

I

I

11-----.---;I~-------BlKSIZE=n -------------------.~I
length ~ 'KEYlEN=n I
largest Record
I
(Bytes)
I
I
I
IOAREAl
,

1-01/

t

* DTFDA specifies READKEY (or WRITEKY), READID (or WRITEID),
and KEYlEN for a file. The first n bytes are unused when
a READ (or WRIT~) by key is executed.

Figure 15.

90

Schematic of I/O Area in Main

S/360 BOS Assembler vith I/O Macros

St~raqe,

for DAM

-l

· Pack
Number

Cell
(BB)

·-(M)

Bytes~

1

0

I

_1

Cylinder
(CC)
2

3

I

May

:

Contain~1

0-254

0

o

o

I

I

4

Head
(HH)

5

Record
(R)

I

6

I

7

I

_-1

I

0-202

o

0-9

I
I

0-255

:
I

I
I

I
I

I

I

I

t

t

Address
Specified by
SEEKAOR=Name
Fig~re

I

16.

Required
for Record
Reference
by 10

Track Reference Field

After a READ or WRITE instruction for a
specified record has been executed, IOCS
can make the ID of the next record
available to the problem program.- When
record reference is by key and multiple
tracks are searched, the ID of the
specified record (rather than the next
record) is supplied.
The function of
supplying the ID is useful for a random
updating operation or for the processing of
successive disk records.
If the user is
processinq consecutively on the basis of
the next lD and does not have an
end-of-file record, he can check the ID
supplied by lOCS aqainst his file limits to
determine when he has reached the end of
his loqical file.
To request that IOCS
supply the ID, the user must set up a
5-byte field (in which IOCS can store the
ID) and specify the symbolic address of
this field in the DTFDA entry IDLOC.
Tr~£~Re!~ren~:
To provide IOCS with the
track reference, the user sets up an 8-byte
track-reference field in main storage ,
assigns a symbolic name, and specifies the
symbolic name in the DTFDA entry SEEKADR.
Before issuing any read or write
instruction for a record, the user must
store the proper track infcrmation
(MBBCCHH) in the first seven bytes of this
field.
The field (Figure 16) contains the
followinq seven bytes for track reference.
The eighth byte (R), listed here and shown
in the figure, is used when reference to
records is by record number (see Recg~£
Referen£~~~ntifi~~l.
All numbers must
be supplied in binary notation.

~1~

Con11ent. tenl§

o

M

0-254

Number of the pack
(0-254) on which the
record is located.
All packs for a file
must be numbered
consecutively startinq
with O.
That is, the
first pack must be
number 0, the second
pack number 1, etc.
This number relates to
a numbered symbolic
unit (SYSOOO-SYS254).
Two or more symbolic
units for a file must
be numbered
consecutively, but the
numberinq may start
with any SYSnnn
number.

1-2

B,B

0,0

Reserved for cell
number, which relates
to the IBM 2321 Data
Cell Drive.
These two
bytes are always zero
for 2311 disk-storaqe
references.

3-4

C,C

0,0-202

Number of the cylinder
(0-202) in which the
record is located.
The first byte is
always zero, and the
second byte specifies
one of the 203
cylinders in a disk
pack. These two bytes
with the next two

Macro Instruction statements

91

(HH) provide the track
identification.
5-6

H,H

0,0-9

Number of the
read/write head (0-9)
that applies to the
record. The £irst
byte is always zero,
and the second byte
specifies one of the
ten disk surfaces in a
disk pack.

7

.R

0-255

sequential number of
the record on the
track.

When the READ or WRITE is executed, IOCS
refers to this field to select the specific
track on the appropriate disk pack.
Record-Reference: The Direct Access Method
allows records to be specified by record
key or by record identifier.
Key.:.. - If records contain key areas, the
records on a particular track can be
randomly searched by their key numbers.
This allows the user to refer to
records by the logical control
information associated with the
records, such as an employee number, a
part number, a customer number, etc.
For this type of· reference the
programmer must specify, in the DTFDA
entry KEYARG, the symbolic name of a
main-storage ~~ field. He then stores
each desired key in this field.
IdgU1!fi~_Jl~:

Records on a particular
track can be randomly searched by their
position on the track, rather than by
control information.
This is
accomplished by using the record
identifier (ID).
The record
identifier, which is part of the count
area of any 2311 disk record, consists
of five bytes (CCHHR). The first four
bytes (cylinder and head) refer to the
location of the track, and the fifth
byte (record) un~quely identifies the
particular record on the track.
When
records are specified by ID, they must
be numbered in succession, and without
missinq numbers, on each track.
The
first data record on a track must be
record ~umber 1~ the second number 2,
etc.
Whenever records are to be
identified by the record ID method, the
eighth byte (R) of the track-reference

92

S/360 BOS Assembler with I/O Macros

field (Figure 16) must contain the
number o£ the desired record.
When a
READ or WRITE instruction that searches
by ID is executed, IOCS refers to the
track-reference field to determine
which record is requested by the
program.
The number in this field is
compared with the corresponding fields
in the count areas of the disk records.
The R byte specifies the particular
record on the track.
Creating a File or

Addin~Records

to a-File

In addition to readinq, writing, and
updating records randomly, the direct
access method permits the user to create a
file or add records to a file.
When this
is done, all three areas of a disk record
are written: the coun! area, the ~§y area
(if present), and the da~ area. The new
record may be written after the last record
written on a specific track. This may be
done by using the WRITE initruction with
the parameter AFTER. The remainder of the
track ~s erased.
When records are to be added to a disk
file by the AFTER method (specified by
DTFDA'AFTER=YES), IOCS ensures that each
record will fit on the track specified for
it.
If the record will fit, IOCS writeS
the record; if it will not fit, Ioes sets a
no-room-found indication in the user's
error/status field (specified by the DTFDA
entry ERRBYTE). In the AFTER method IOCS
determines the location where the record is
to be written.
For this, IOCS uses the first record on
each track (RO) to maintain updated
information about the data records on the
track. Record 0 (Figure 17) has a count
area and a data area, and contains the
following:
count Area
Flag (not normally transferred to main
storaqe )
Identifier
Key Lenqth (KL)
Data Length (DL)
Data Area (8 bytes)
5 Bytes - ID of last record written on
track (CCHHR).
2 Bytes - Number of unused bytes
remaining on track.
Byte - (Un used)
Each ~ime WRITE AFTER is executed, IOCS
updates the data area of this record.

COUNT AREA

DATA AREA

C)
C)

0
~

Bytes --..

0

Identifier

-s

1

DL

KL

6

7

I

I
I

I

lc
I

Standard Information

I

I
I

I

!

I

-,

,I

Operand

I-----t----+-I
I READ
filename,KEY
I

J

L--_~

READ

2>"'(1)E

:;

al 0::

2-



.1 •

IOAREAR
or
IOAREAS
SL = S~quence Link

Figure '8.

98

I

Schematic of I/O Areas in Main Storage, for ISFMS

S/360 BOS Assembler with I/O Macros

I

The indices are made up of a series of
entries, each of which includes the address
of a disk track and the highes~ key on that
track, or cylinder.
Each entry ~s a
separate disk record composed of both a key
area and a data ar€a.
The key area
contains the highest key on the track or
cylinder, and its length is the same as
that specified for logical data records (in
the DTFIS entry KEYLEN).
The data area of
each index is ten bytes long, and it
contains track information including the
track address.

.-------,

Highest I
Key
I
.J

L-.._ _ _ _

Key Area

.------..
I Track
I Address
L

Data Area

Track Index: The track index is the lowest
level index for the logical file.
A
separate track index is built for each
cylinder used by the file, and it contains
index entries for that cylinder only. Each
track index is located on the cylinder that
it is indexing. It is always on the first
track of that cylinder. Track indices are
considered part of the prime data area
specified by a Job Control XTENT card.
When the track indices are originally
constructed, they contain two entries
(normal and overflow) for each track
utilized on the cylinder. For example, if
the prime area of the logical file utilizes
eight tracks on a cylinder, the track index
might contain the entries shown in Figure
19. The use of two index records for each
track is required because of overflow
records that will occur if more records are
inserted in the file at a later time (see
AdQbtion~Re£ords,·and Overflow Areas) •
When overflow reGords for a track exist,
the second (overflow) index record contains

the ~~~ of the h~gh~~~ record in the
overflow chain for this track and the
address of the lowest record in the
overflow chain.--The-dummy ent£yindicates
the end of the track index.
Any following
records are logical- file data records.
The COCR entry is required whenever a
cylinder overflow area is specified (see
Example of an~anizeiLFilel.
~lindgr·Index:

The cylinder index is an
intermediate-level index for the logical
file.
It contains an index entry for each
cylinder occupied by the file~
This index
is built in the location specified by the
user in a Job Control XTENT card. The
cylinder index may be built wherever the
user chooses, but it may not be on one of
the cylinders that contains data records
for this file.
It mus± be on a separate
cylinder, or it may be on a separate disk
pack that will be on-line whenever this
logical file is processed.

The cylinder index may be located on one
or more successive cylinders.
Whenever the
index is continued from one cylinder to
another, the last index entry on the first
cylinder contains a linkage field that
points to the first track of the next
cylinder. A cylinder index may not be
continued from one ~£~ to another,'
however.
It must be.completely contained.
within one disk pack.
This ind~x contains one entry for each
cylinder occupied by the data file.
The
key area contains the highest key
associated with the cyling~£, and the data
area contains the address of the track
index for that cylinder.
For example if a
fil~'requires nine cylinders, the cylinder
index might contain the entries shown in
Figure 20. The dum~~try indicates the
end of the cylinder index.

Macro Instruction statements

99

TRACK INDEX
COCR

[!J

D

K

~

Track 0
Address

75

I ~~ I

Track 0
Address

K

D

D

240

Track 2
Address

u;]

K

D

K

~

D

150

Track 1
Address

K

D

Track 7
Address

[;u

Track 7
Address

D

K

D

Track 1
Address

K

D

--------1 ~:; 1

240

~

150

K

980

[AliI
~
K

D

Dummy Entry
K = Key Area
D = Data Area
COCR = Cylinder Overflow Control Record (RO)

Figure 19.

Schematic Example of a Track Index

CYLINDER INDEX

lliiJ

Cylinder 1
Track 0
Address

980

D

K

~
1850
K

Cylinder 2
Track 0
Address

---------1 ~;rO 1

D

I~~~;ts I
K

D

Dummy Entry
K = Key Area
D = Data Area

Figure 20.

100

Schematic ExamFle of a Cylinder Index

S/360 BOS Assembler with I/O Macros

K

Cylinder 9
Track 0
Address
D

MASTER INDEX

§

4730

Track X + 1
Address

0

K

~
8560

Track X + 2
Address

K

0

~
12750

Track X + 3
Address

0

K

----------I~~o I
K

Track X + 20
Address

0

[AiIl
~
K

0
Dummy Entry

K = Key Area
D = Data Area

Figure 21.

Schematic Example of a Master Index

Ma§ter-Ind~:
The master index is the
highest level index for a logical file
built by the IBM System/360 Basic Operating
System. This index is optional and it is
built only if it is specified by the DTFIS
entry MSTIND. It is built in the location
specified by a Job Control XTENT card.
Like the cylinder .index, it may be located
on the same disk pac~ with the logical-file
records or on a different pack that will be
on-line whenever the records are processed.

The master index must immediatelY
cylinder index on a disk pack,
and it may be located on one or more
successive cylinders. Whenever .it is
continued from orie cylinder to another, the
last index entry on the first cylinder
contains ,a linkage field that points to the
first track of the next cylinder. A master
index may not be continued from one ~ck to
another, however.
It must be completely
contained within one~isk pack.

.E!:ec~de-the

The master index contains an entry for
each track of the£y!inder index. The key
area contains the highest key on the
cylinder~index track, and the data area
contains the address of that track.
For
example, if a master index is located Qn
track X a.nd a cylinder index is loca ted on
tracks X + 1 through X + 20, the master
index miqht contain the entries shown in
Figure 21.
The dummy entry indicates the
end of the master index.
Adgi ti21L_Q.LRecQf:g§.L.-£nd~verflQw Area.§
Some time after a logical file has been
organized on disk it may become necessary
to add records to the file. These records
may contain keys that are above the hiqhest
key presently· in the file, and thus

con~titute an extension of the file~
Or,
they may contain keys that fall between
keys already in the file and therefore
require insertion in the proper sequence in
the organized file.

If all records to be added have keys
that are higher than the highest key in the
organized £ile, the upper limit of the
prime area of the file can be adjusted (if
necessary) by the specification in a Job
Control XTENT card. Then the new records,
which must be presorted, can be added by
lo~dinq them into the file.
No overflow
area is required.
The file is merely
extended further on the disk pack.
If records must be inserted among tpose
already organized, however, an overflo~­
ar~-will be required.
The ISFMS system
uses the overflQw area to permit the
insertion of records without necessitating
a complete reorganization of the
established file.
The fast random and
sequential retrieval of records is
maintained by inserting references to the
overflow area in the track indices, and by
using a chaining technique in the overflow
records.
For chaining, a sequence-link
field is prefixed to the user's data record
in the overflow area. The sequence-link
field contains the address of the record in
the overflow area that has the next-higher
key.
Thus a chain of sequential records
can be followed in a search fora
particular record.
The sequence-link field
of the highest record in the chain
indicates the end of the chain._ All
records in the overflow area are unblocked,
regardless of the specification (in DTFIS
RECFORM) for the data records in the
logical file.

Macro Instruction Statements

101

DATA RECORDS

[;]

Data

[]i]

Data

Track 2 [ ; ]

Data

[}ill

Data

Track 1

100

200

Figure 22.

125

205

1-------1 ~:; i
1-------1 ~;; 1

1.

The last key is higher than the
insertion, and

2.

The last key of the preceding track is
lower than the insertien.

For example, assume Tracks 1 and 2 are
organized with the record keys shown in
Figure 22.
Then records with keys such as
151,175, 199, 215, and 239 are inserted on
Track 2 (or in the related overflow chain
that has developed).
Any key lower than
150 is added to either Track 0 or Track 1;
any key hig~er than 240 belongs to Track 3
or above. The track indices always retain
the highest key of each track as it was
originally organized.
After the proper track is determined,
ISFMS searches the individual records on
the track or overflow area (if necessary)
to find where the record belongs in key
order.
This results in either of two
conditions:

102

@J

Data

Data

am

Data

150

240

Example of Data Records, as Originally Organized on Tracks 1 and 2

To add a record by insertion, ISFMS
searches the established indices first to
determine on which track the record must be
inserted. The keys-of~he las! records on
the tracks in the orig!~~llY-2~g~nized file
determine the track where an inserted
record belongs. A record is always
inserted on the track where:

1.

Data

The record falls between two records
presently on the track.
ISFMS adds the
record by inserting it in the proper
sequence and shifting each succeeding
record one record location higher en
the track, until the end record is
forced Qff the track.
ISFMS transfers
the end 'record to the everflow area,
and prefixes the record (data area)
with a sequence-link field. The first
time a record is inserted on a track,
the sequence link of the overflow
record indicates that this is the
highest record associated with the
track. Thereafter, the sequence-link
field of each ove~flow record points to
the next-higher record for that track.
S/360 BOS Assembler with I/O Macros

ISFMS also updates the track index
to reflect this change.
The first
index record for the track has the key
field-Changed to indicate the new
last-record located on the track.
The
second index record for the track has
the~rack address (in the data area)
changed to point to the address of the
overflow record.
If ~ record wit~ key
105 is added to a file organized as
shown in the previous illustrations and
if the overflow area is located on
Track 8, the track index records
contain the information shown in Figure
23.
INDEX ENTRIES FOR ONE TRACK
Before
Addition

After
Addition

@]
@]
150

Track 1
Address

140

Track 1
Address

Figure 23.

2.

@]
@]
150

150

Track 1
Address

Track 8
Record X
Address

Example of Track Index Entries
Before and After Addition of a
Record on Track 1

The record falls between the last
record presently on the track and the
last record or~ginally on the track~
Thus, it belongs in the overflow area.
ISFMS writes the record in the overflow
area followinq the last record
previously written.
ISFMS searches
through the chain of records associated
with the corresponding track for this
record and identifies theseguential
position the record should take.
Then
the sequence-link fields of the new
record, and of the record precedinq it
by sequential key, are adjusted to
point to the proper records.
If
records 150, 140, and 130 are already
in the overflow area and record 135 is
to be added, for example, the
sequence-link fields of records 130 and
135 must be adjusted (Figure 24).

RECORD

SEQUENCE-LINK FIELD
Before Addition

After Addition

130

140

135

13.5

-

140

(New Record)

Figure 24.

Example of Sequence-Link Fields
Adjusted for Addition of a
Record (135)

A simplified example of a file orqanized on
disk by the Indexed Sequential File
Manaqement System is shown schematically in
Fiqure 25.
The assumptions made and the
items to be noted are:
1.

2.
Overflow-Area Option: The location of the
overflow area(s) for a logical file may be
specified by the user. The overflow areas
may be built by one of three methods:
1.

Overflow areas for records may be
located on each cylinder within !he
E£im~~ that is specified by a Job
Control XTENT card for the data file.
In this case the user must specify the
number of tracks to be reserved for
overflow on each cylinder occupied by
the file.
The overflow records that
occur within a particular cylinder are
written in the f~linde~£flow ~
for that cylinder.

3.

An independent overflow area may be
specified for storing all overflow
records for the logical file.
This
area may be on the same pack with the
data records, or on a different pack
that is on-line.
However it must be
contained within one disk pack. A Job
Control XTENT card must be included
when the program is ex~cuted to specify
the area of the disk pack to be used
for this overflow area. This card must
be the last XTENT card that Job Control
reads for the file.
Both cylinder overflow areas (method 1)
and an independent overflow area
(method 2) may be used. In this case
overflow records are placed first in
the cylinder overflow areas within the
data file.
When any cylinder overflow
area becomes filled, the additional
overflow records from that cylinder are
written in the independent overflow
area. The specifications required for
both methods 1 and 2 must be included
for this combined method of handling
overflows·.

The data records occupy part of Track
and all of Tracks 1-7. Tracks 8 and
9 are used for overflow records in
this cylinder.

o

3.

The master index is located on Track X
on a different cylinder. The cylinder
index is located on Tracks X+1 throuqh
X+20.

4.

A dummy entry siqnals the end of each
index.

5~

The file was 6riginally orqanized with
records as follows:
Track
-0-

The number of tracks to be reserved
for each cylinder overflow area must be
specified in the DTFIS entry CYLOFL
when a file of records is to be loaded
and when records are to be added to an
orqanized file.
2.

The track index occupies part of the
first track, and data records fill the
rest of the track.

1
2

Records
5-75100-150
200-240

7

900-980

6.

The track index oriqinally had two
entries for each track.
It now shows
that overflow records have occurred
for Tracks , and 7.

7.

Records 150, '40, and 130 were forced
off the track by insertions on the
track. Record 135 was added directly
in the overflow area.
.

8.

A sequence-link field (SL) has been
prefixed to each overflow record.
The
records for Track , can be searched in
sequential order by·followinq the SL
fields:
Record Seguence-Link field·· {SL}
SL points to record with key
130
135.
SL points to record with key
135
'40.
SL points to record with key
140
150.
End of search.
(Key 150 was
150
the hiqhest key on Track 1
when the file was loaded.)

Macro Instruction statements

'03

-'

o

.t=
til

"W
0'1

o

I-zj
.....

LO
t::
H
CD

.

til

:r::Ul
Ul
CD

E3
0"
I-'
CD
H
~
.....

t+

;:r'

DATA RECORDS

Track

~
0

tv

0

0

,K,

Track

I

til

1.00

o

I

CD
Track

2

o
o

1'DO !

7

I~O I

D

E

Ooro

K

0

I'"

D

I(

00'0

K

I-zj

.....

0

II

0.0

ro i

00'0

o
Track

0

O

"o
::Ji:

o

III

t1

H

Ul

o
o

Ul

I~O

D

K

,
Track

8

150:

~

SL

:

*

I

SL
to

150

Data

I

130

000
0

1,<0

000

-I

00'0

1 W5

Ooro

Ooro

OK,D

--------------------

D

D•

I

SL
to

Data
:

980 1 SL

135

Data

'

SL
to

135 I

I

i

Data

140 '
D

K

D

D

OVERFLOW DATA RECORDS

~

o

140

Data

.....

.

120

OVERFLOW DATA RECORDS

CD

t:I

1

000

D

I(

00'0

K

1no

I-'
H

0

0

DATA RECORDS

H1

III

0

o

DATA RECORDS

E3

t+
.....

I'~

0",0

;:r'

III

0

DATA RECORDS

U1

ttl

o

TRACK INDEX

~--~------

-

-

-

- -

- -

-

-

-

Track
9

H

;,Q

III
::l

MASTER INDEX

.....

N
CD
0.

Track

X
K

0"

~

H
til
I-zj

o

o

Track

X+1
L-~

:3
til

o

D

K

D

CYLINDER INDEX

______

o

~

__

~

____

o

~

______________________

(

~,~

:l' ,
Cylinder
4730, Track 0

______________________________________________________

I

9.1

! Address

------------------~--~----~

o

9.

When the file was loaded, the last
record on Cylinder 1 was Record 980,
on Cylinder 2 Record 1850, and on
Cylinder 9 Record 4730.
This is
reflected in the cylinder index.

10.

When the file was loaded, the last
entry on track X+ 1 (first track of
Cylinder Index) was Record 4730, on
track X+2 Record 8560, on track X+3
Record 12750, and on track X+20 Record
856'0. This is reflected in the
master index.

11.

When cylinder overflow areas are used,
the first record (Record 0) in the
track index for a cylinder is the
Cylinder Overflow Control Record
(COCR).
It contains the address of
the last overflow recerd on the
cylinder arid the number of tracks
remaining in the cylinder overflow
area.
When the number of remaining
tracks is zero, overflow records are
written in the independent overflow
area.

MACRO INSTRUCTIONS TO LOAD OR EXTEND A DISK
FILE BY ISFMS
The function of originally loadinq a file
of presorted records onto disk and the
function of extending the file by adding
new presorted records beyond the previous
high record are essentially the same. Both
are considered a LOAD operation (specified
by the DTFIS entry rOROUT), and they both
use the same macro instructions in the
preblem . program.
The areas of the disk packs used for the
file are specified by Job Control XTENT
cards.
The areas are:
the E£im~ area
where the data records are written, a
£Y!in~~£_ind~ area where the user wants
ISFMS to build the cylinder index, and a
master index area if a master index is to
be-built-Cspecified by the DTFIS entry
MSTIND) •
Durinq the load operation, ISFMS builds
the track, cylinder, and master (if
specified) indices.
If either the data
records, the cylinder index, or the master
index exceeds the area provided for it,
ISFMS branches to a user's routine
(specified by the DTFIS entries DTAREX,
CYNDEX, and MANDEX, respectively).
If the
dai~_~~~ has been exceeded, an ENDFL
instruction may be included in the DTAREX
routine to prepare the file for closing.
This permits the remaining records to be
treated as extensions.
To continue
loading, the user must supply a,new XTENT
card for the area exceeded and restart the
job.

Whenever ~nY type of processinq is beinq
done for an Indexed Sequential file, all
packs of a multipack file must be on-line.
Whenever an organized file is to be
extended, the identical Job control DLAB
card that was originally used when the file
was loaded must be used aqain.
However, if
an organized file is to be loaded on the
same disk pack a second time, the user
should prepare a new Job control DLAB card
to prevent his file from beinq treated as
an extension of itself.
In the new DLAB
card, the user must chanqe either the
filename, creation date, or expiration
date.
Name of First Control Section:
Whenever
theLOADfunctionisspecIfied, the user
must place a name in the START card in his
source deck to define the first control
section.
This permits ISFMS to use an
ENTRY statement to identify a linkaqe
symbol defined in this control section and
used in subsequent control sections.
However, the user-written portion of the
proqram will not be in the control section
named by the START card.
Instead, it will
be in a centrol section named by ISFMS.
The name assiqned by ISFMS is Filenaill§~.
Filename is the name of the last file for
whIch-r.OAD is specified, unless sequential
retrieval is specified for another file in
the program (see !1~£roJn§:truction~iQ!:
SegQ~nlial B§lri~Y~l_RY-ISE]kl.
As a result of these conditions, the
programmer must be sure to use the
applicable name if he wishes to continue
his first control section after it has been
Interrupted by a dummy section or a
different control section.
He must use the
name assigned by ISFMS (rather than the
START card) whenever LOAD is specified for
any file in the source proqram.

Three different macro instructions are
always required in the problem proqram to
load original or extension records into the
logical file on disk.

,.---

,I

--,--

,

I
r---+I
--+------------~
ILISETFL
I -_
filename
---i
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _JI
IName

lOp

I Operand

The SETFL (set file load mode) macro
instruction causes ISFMS to set up the file
so that the load function can be performed.
The symbolic name of the file to be loade~
is the only parameter required in this
instruction.
This name is the same as that
Macro Instruction Statements

105

The ISFMS routines move each data record to
the I/O area. After the block of records
in the data portion of the I/O area is
completed, ISFMS moves the key of the
highest record in the block into the key
portion of the I/O area. Then ISFMS
constructs the count portion and transfers
the records to disk storage.

specified in the DTFIS header entry for
this file.
When a file is being created, ISFMS
formats the track index, cylinder index,
and master index (if used) with dummy
entries.
When a file is being extended,
the SETFL macro simulates a restart
condition so that the load function can
proceed as if it were making its initial
run.

.----.
IName

lOp
I
I ______
WRITE

j

I

L---~

As records are transferred, ISFMS
performs both a sequence check (to ensure
that the records are in order by key) and a
duplicate-record check.
If an
out-of-sequence record or a
duplicate-record key is detected, ISFMS
branches to the corresponding user's
routine (specified by the DTFIS entries
SQCHEX and DUPREX, respectively).

Operand
~

filename,NEWKEY,IS
________________
.____________

~

When a WRITE macro instruction with the
parameter NEWKEY is issued in the problem
program between a SETFL instruction and an
ENDFL instruction (the third macro reguired
for loading), it causes ISFMS to load a
record onto disk. It reguires three
parameters. The first specifies the
symbolic name of the file, as specified in
the DTFIS header entry. The §~~nd
parameter must be the word NEWKEY. The
thir,Q. parameter must be the letters IS to
indicate processing by the indexed
sequential system.
Before issuing the WRITE instruction for
an unblocked record, the problem program
must store the key of the record followed
by the data in a work area (specified by
DTFIS WORKL).
WORKL - Unblocked Records
J

1

IKey I
I
I

'---_-1.-

Data
(With or without embedded key)

After each record is written, ISFMS
makes the ID of that record available to
the problem program. The ID is located in
an 8-byte field labeled fi!~na~eH.
In this
case filename·must be 5 characters long.
For example; if the file name in the D~FIS
header entry is PAYRD, the ID field is
addressed by PAYRDH. By reference to this
field, the ID of any selected records can
be punched Or printed 'for later use. This
will be required if the user plans to
retrieve records in sequential order
starting with the ID of a particular record
(see SETL..J1acro).
As records are loaded onto disk, ISFMS
writes track-index records each time a
track is filled, writes a cylinder-index
record each time a cylinder is filled, and
writes a master-index record (if DTFIS
MSTIND is specified) each time a track of
the cylinder index is filled.
When a track
index is completed, ISFMS writes a dummy
record following the last index record.
This is used in subsequent operations to
indicate the end of the index and the
beginning of data records.

----I

The ISFMS routines construct the I/O area
(see Figure '8) by moving the data record
to the data area, moving the key to the key
area, and building the count area.
Then
they transfer the record to disk storage.
For blocked records, the problem program
must store only the logical record in a
work area (specified by DTFIS WORKL). The
key must be part of the data record
(location specified by DTFIS KEYLOC), but
it must not be stored separately as it is
for unblocked records.

I

IName

I

Op

Operand

ENDFL

filename

~----~---~

The ENDFL (end file load mode) macro
instruction ends the mode initiated by the
SETFL macro. The symbolic name of the file
that has been loaded is the only parameter
required in this instruction. This name is
the same as the name specified in the DTFIS
header entry and the SETFL instruction for
this file.

WORKL - Blocked Records
r-

I
I
L-

106

---,

Data
I
(With em bedd ed key) I
---'

S/360 BOS Assembler with I/O Macros

The ENDFL macro performs a close-like
operation for the file that has been
loaded. It ~rites the last block of data
records, if necessary, and then writes an

end-of-file record after the last data
record.
It also writes any index entries
that are needed.

IOROUT specifies ADD (or ADDRTR) instead of
LOAD.

Note: At least one or more records must be
loaded before the ENDFL macro instruction
can be executed. If no records are loaded
before the ENDFL mac~o is issued, the ENDFL
macro returns control immediately to the
user's program without writing an
end-of-file record. The file then has to
be reloaded with a new DLAB (disk label)
card.

For adding records, the problem program
must store the key of the record followed
by data in the work area specified by DTFIS
WORKL, before issuing the WRITE
instruction. ISFMS then constructs the I/O
area and· transfers the record to disk
storaqe.
As records are transferred, ISFMS
checks for duplicate record keys and
branches to the user's routine (specified
by DTFIS DUPREX) if a duplication is found.

MACRO INSTRUCTIONS TO ADD RECORDS TO A FILE
BY ISFMS
After a file has been organized on disk,
new records can be added to the file.
Each
record is inserted in the proper place
sequentially by key.
This function is
controlled by specifying ADD or ADDRTR in
the DTFIS entry TOROUT.
The file may contain either blocked or
unblocked records, as specified by the
DTFIS entry RECFORM.
When the file
contains blocked records, the user must
provide ISFMS with the location of the key
field within each record.
This is
specifiea-in the DTFIS entry KEYLOC.
The
records to be added, however, must be
inserted one record at a time, and they
must contain a key field in the same
location as the records already in the
file.
Whenever the addition of records is to
follow sequential retrieval
(IOROUT=ADDRTR), the sequential-retrieval
instruction ESETL must be issued before the
first record is added to the file (see
ES]11- Macrg) •

One macro instruction is available for use
in the problem program, for adding records
to a file.

r--~------~---------

IName

j

Op

Operand

~~----~------

IL-____LI - WRITE

filename,NEWKEY,IS

When a WRITE macro instruction with the
parameter NEWKEY is issued in the problem
program and the DTFIS entry IOROUT
specifies ADD (or ADDR~R), ISFMS adds the
record to the previously organized file.
This is the same instruction, and requires
the same parameters, as the WRITE
instruction that is used for loading a
file.
The only difference is that DTFIS

To insert the new record properly, ISFMS
searches the indices to find the correct
track for the record.
If the correct track
is not an overflow track, ISFMS then
searches the track for the correct position
sequentially. The record is -inserted, all
following records are shifted, and the
highest record on the track is transferred
to the appropriate overflow area.
This is
the cylinder overflow area if CYLOFL has
been specified and if t~e area has not been
filled.
If the cylinder overflow area does
not have space available, or if only an
independent overflow area has been
specified by an XTENT card, the overflow
record is transferred to the independent
overflow area. If the cylinder overflow
area has been filled and an independent
area has n01 been specified, however, there
is no place to store the overflow record.
ISFMS then branches to the user's routine
specified by the DTFIS entry ADAREX. The
user should specify an independent overflow
area to store this and other overflow
records.
ISFMS also branches to the ADAREX
routine if an independent overflow area is
specified but has become filled.
In either
case the job should be restarted with a new
XTENT card included for the independent
overflow area.
Whenever records are to be inserted into
a logical file of Rloc~~~ records, ISFMS
first locates the correct block on the
track (after the proper track has been
found).
The block is determined by
checking the key areas of the disk records.
Each key area contains the key of the
highest logical record in the corresponding
block.
Then ISFMS examines the key field
wi~h!n each logical record in the block to
find the exact position to insert the
record.
After the record is inserted, the
following logical records on the track are
shifted and reblocked, and the key areas
are adjusted. The last logical record on
the track is moved to the overflow area.
If the proper track for a record is an
ovgrflow track, ISFMS writes the record,
preceded by a sequence-link field in the
data area of the record, and adjusts the
appropriate linkages to maintain sequential
order by key.
Similar to the operation
Macro Instruction Statements

107

described for the end record in the
preceding paragraphs, ISFMS writes the new
record in either the cylinder overflow area
or the independent overflow area, or .i t
branches to the user's routine if
necessary.
If the new record is higher than all
records presently in the file, ISFMS checks
to determine if the last track containing
data records is filled.
If it is not, the
new record is added, replacing the
end-of-file record. The end-of-file record
is written in the next record.location on
the same track, or on the following track
in the prime data area.
Another track must
be available within the file limits.
If
the end-of-file record is the first record
on a track, the new record is written in
the appropriate overflow area.
After each
new record is inserted in its proper
location, ISFMS adjusts all indices that
are affected by the addition.
MACRO INSTRUCTIONS FOR RANDOM RETRIEVAL BY
ISFMS
When a file has been organized by ISFMS,
records can be retrieved in random order
for processing and/or updating. Retrieval
must be specified in the DTFIS entry
IOROUT.
Random processing must be
specified in the DTFIS entry TYPEFLE, and
updating (if used) must be specified in
DTFIS UPDATE.
If a multipack file is being
processed, all packs must be ·on-line.
Because random refererice to the file is
by record key, the problem program must
supply the key of the ~esired record to
ISFMS.
To do this the key must be stored
in the main-storage key field specified.by
the DTFIS entry KEYARG.
The specified key
designates both the record to be retrieved
and the record ~o be written back into the
file in an updating operation.

I

Op

IName

I
L -_ _ _ _

Operand

READ

~

___

filename,KEY,IS

~

The READ instruction causes ISFMS to
retrieve the specified record from the
file.
This instruction requires three
parameters. The fi£st~~meter-specifies
the symbolic name of. the file from which
the record is to be transferred to main
storage.
This name is the same as the
name specified in the DTFIS header entry
for this file.
The second~ramet~-must
be the word KEY.
The thir~rameter-must
be the letters IS to indicate processing by
the indexed sequential system.
To locate the record ISFMS searches the
indices to determine the track on which the
record is stored, and then searches the
track for the specific record.
When the
record is found, ISFMS transfers it to the
I/O area specified by the DTFIS entry
IGAREAR.
The IOCS routines also move the
data portions of the record to the
specified work area if the DTFIS entry
WORKR is included in the file definition.
Wh~n records are blocked, ISFMS
transfers the block that contains the
specified record to the I/O area. It makes
the individual data record available for
processing either in the I/O area or the
work area (if specified). For processing
in the I/O area, ISFMS supplies the address
of the record in the register specified by
DTFIS IOREG.

If ISFMS does not find the specified
record, it branches to the user's routine
specified by the DTFIS entry RTRVEX.
WRITE Macro
r-----~-------,---------------------------,

IName

Name of First Control Section:
When DTF
IOROUT=RETRVEand-TYPEFLE=RANDOM are used,
ISFMS names the first CSECT in the DTFIG
macro IICSCT • . If this DTF is used alone,
the user's program will come under this
CSECT name.
If it is used in the same
program with other DTFs, the name of the
user's first control section will be
determined as explained under ~~££Q
Instructions for S~uential Retrieval by
ISf~~.

------

<

Two macro instructions are available for
use in the problem program for retrieving
and updating records randomly.
108

S/360 BOS Assembler with I/O Macros

Op

r----~----~

I

WRITE

Operand

I

,

filename,KEY,IS_ _ _ _ _ _ _ _ .JI

The WRITE instruction with the parameter
KEY is used for random updating.
It causes
ISFMS to transfer the specified record from
main storage to disk storage. This
instruction requires three parameters. The
fi£st~Earamete~ specifies the symbolic name
of the file to which the record is to be
transferred. This name is the same as the
name specified in the DTFIS header entry
and in the preceding READ instruction for
this file.
The §econd~~~~eter-must be
the word KEY. The 1hird £arameter-must be
the letters IS.

ISFMS rewrites the record retrieved by
the previous read instruction for the same
file.
The key specified in the key field
for the READ instruction determines where
the record is written.
The key need not be
specified again, ahead of the WRITE
instruction.
MACRO INSTRUCTIONS FOR SEQUENTIAL RETRIEVAL
BY ISFMS
When a file has been organized by ISFMS,
records can be retrieved in sequential
order by key for processing and/or
updating. Retrieval must be specified in
the DTFIS entry IOROUT.
Sequential
processing must be specified in the DTFIS
entry TYPEFLE, and updating (if used) must
be specified in DTFIS UPDATE.
Although records are retrieved in order
by key, sequential retrieval can §ta£1 at a
record in the file identified either by key
or by the ID (identifier in the count area)
of a record in the prime data area.
Or,
sequential retrieval can start at the
beginning of the logical file.
The user
specifies, in the SETL macro, the type of
reference he will use in the problem
program.
Whenever the starting reference is by
key and the file contains B!g£~~g records
(RECFORM=FIXBLK), the user must also
provide ISFMS with the position of the key
field within the records. This is
specifiea-Ifi the DTFIS entry KEYLOC.
To
search for a record, ISFMS first locates
the correct block by the key in the ~~~
~~2. of the disk record.
(The key area
contains the key of the highest record in
the block.)
Then, ISFMS examines the key
field within each record in the block to
find-the-specified-record.
Whenever ~n~ type of processing is being
done for an Indexed Sequential file, all
packs of a multipack file must be on-line.
Name of First Control Section:
When
sequential-retrIevalisspecified, the user
must place a name in the START card in his
source deck to define the first control
section.
This permits ISFMS to use an
ENTRY statement to identify a linkage
symbol defined in this control section and
used in subsequent control sections.
However, ~he user-written portion of the
program will not be in the control section
named by the START card.
Instead, it will
be in a control section named by ISFMS.
The name assigned by ISFMS to the user's
first control section is Filename3 whenever
sequential retrieval alone-CIOROUT=RETRVE
and TYPEFLE=SEQNTL or RANSEQ) is specified
for ~n~ file in the source program.
Fi!~n~me is the DTFIS header name of the

fi£st file (in input sequence) for which
sequential retrieval is specified.
If sequential retrieval alone
(IOROUT=RETRVE) is not specified for any
file, the name assigned to the user's first
control section depends upon the other
functions (IOROUT) and/or types of
processing (TYPEFLE) specified for the
files in the source program.
If either
sequential add-retrieve (IOROUT=ADDRTR and
TYPEFLE=SEQNTL or RANSEQ) or load
(IOROUT=LOAD) is specified for any file,
ISFMS names the user's first control
section.
If both are specified, for
different files in the source program, the
naNing function that occurs !~st (in input
sequence) determines the name that ISFMS
assigns, as follows:

•

If sequential add-retrieve
(IOROUT=ADDRTR and TYPEFLE=SEQNTL or
RANSEQ) occurs last, the control
section name is Filename3.
Filename is
the DTFIS header-name-o~the l~st fIle
for which sequential add-retrieve has
been specified.

•

If the load function (IOROUT=LOAD)
occurs last, the control section name
is FilenameU.
Filename is the DTFIS
header-name-of the-last file for which
the load function has-been specified.

If neither sequential retrieval,
sequential add-retrieve, nor load is
specified for any file in the source
program, ISFMS does nQl name the user's
first control section.
In this case, the
first control sect~on is named by the name
(if any) specified in the START card.
As a result of these conditions, the
programmer mus~ be sure to use the
applicable name if he wishes to continue
his first control section after it has been
interrupted by a dummy section or a
different control section.
He must use the
name assigned by ISFMS (rather than the
START card) whenever sequential retrieval,
sequential add-retrieve, or load is
specified for any file in the source
program.

Four macro instructions are available
for use in the problem program for
retrieving and updating records
sequentially.

Macro Instruction Statements

109

the second extent
number 3, etc.
r-----~

IName I
~
I
I
I
I
I
I
I
L--~

I

Operand

Op
SETL
SETL
SETL

______

I

filename,BOF
filename,KEY
filename,idname
~.

1-2

B,B

0,0

Reserved for cell
number, which relates
to the IBM 2321 Data
Cell Drive.
These two
bytes are always zero
for 2311 disk-storage
references.

3-4

C,C

0,1-199

Number of the cylinder
(1-199) in which the
record is located.
The first byte is
always zero, and the
second byte specifies
o~e of the 199
cylinders avail~ble
for data records in a
disk pack.
These two
bytes with the next
two (HH) Frovide the
track identification.

5-6

H,H

0,0-9

Number of the
read/write head (0-9)
that applies to the
record.
The first
byte is always zero,
and the second byte
specifies one of the
ten disk surfaces in a
disk pack.

7

R

1-254

Sequential number of
the record on the
track.

~

I
I
I
J

The SETL (set limit) macro instruction
initiates the mods for seguential
r~trieval, and initializes the ISFMS
routines to begin retrieval at the
specified starting address.
It requires
two parameters.
The iir§i-parameter
specifies the symbolic name of the file
(specified in the DTFIS header entry) from
which records are to be retrieved.
The specification entered as the ~~£Qnd
E£££mete£ depends on the starting reference
that is used for the file:
beginning of
the file, key, or ID.
BOF:
If retrieval is to start at the
beginning of the logical file, the letters
BOF (beginning of file) must be entered as
the second parameter.
KEY: If retrieval is to start at the
record that contains a specific key
(control information), the word KEY must be
entered as the second parameter.
In this
case, the key of the desired record must be
stored in the main-storage ~gy field
specified by the DTFIS entry KEYARG.
The
key must be supplied in this field before
issuing the SETL instruction for the file.
If ISFMS cannot find the starting record,
it branches to the user's routine specified
by the DTFIS entry RTRVEX.
idname:
if retrieval is to start at the
record that has a specific disk address
(identifier - ID), the second parameter
must specify the symbolic name of a field
in main storage.
The disk address of the
first record to be retrieved must be stored
~n this field before the SETL instruction
is issued for the file.
This idname field
must be eight bytes long and the user must
supply the record identification (MBBCCHHR)
as listed here.
All numbers must be
supplied in binary notation •.
ConByte Ident. tents

,

•

rIName 1 Op
I Operand
J
I
+I
I ESETL I filename
L----

. I

~

,I
I

---J

The ESETL (end set limit) macro instruction
ends the sequential mode initiated by the
SETL macro.
The symbolic name of the file,
which must be the same as the name
specified in the DTFIS header entry and in
SETL, is the only parameter required in
this instruction.
If blacked records are specified, ESETL
writes the last block back into the disk
file in its previous location, if
necessary_

Information

o

M·

11Q

S/360 BOS Assembler with I/O Macros

2-255

ESETL Macro

Number of the extent
in which the starting
record is located.
The extents for the
file must be numbered
so that the first
extent is number 2,

When the program requires sequential
retrieval followed by the addition of
records to a file (IOROUT=ADDRTR), the
ESETL macro instruction must be issued at
the end of the sequential retrieval and
before a WRITE instruction is issued for
the first addition. If sequential
retrieval is to be restarted after the

additions are completed, the key or ID of
the last record retrieved must be saved.
To return to sequential retrieval, the SETL
macro instruction must be issued again.

Ir--~----r

,Name I Op

,Operand

,

r-----~-------,I-

,

I----+----+---------------~

,

I

,GET, filename", IS
,GET, filename,workname,IS

' -_ _ _..L-

in the block.
If no PUT instructions have
been issued, updating is not required for
this block and GET does ll2i write the
block.

I
,

The GET macro instruction causes ISFMS to
retrieve the next record in sequence from
the file.
It can be written in either of
two forms, dependinq on where the record is
to be processed.
The first form is used if records are to
be processed-in-the I/O area (specified by
DTFIS IOAREAS).
It requires three
parameters, the second of which is blank
and represented by a comma. The fir§i
N'£,2,mete.f specifioes the symbolic name of
the file from which the record is to be
retrieved.
This is the same name as that
specified in the DTFIS header entry and in
the SETL macro instruction for this file.
ISFMS transfers the record from this file
to the I/O area, and the record is
available for the execution of the next
instruction in the problem program.
The
thi.£Q_NraID~te.f must be the letters IS to
indicate processinq by the indexed
sequential system.
ISFMS makes the data
portion of each record available by
supplyinq its address in' the register
specified by the DTFIS entry IOREG.
When
the unblocked records are specified, the
key portion of each record is available at
the area specified in the DTFIS entry
IOAREAS.
The second form of the GET instruction
is used-if-recordS are to be processed in a
work area (DTFIS specifies WORKS).
It
requires three parameters. The firs! is
the symbolic name of the file, the second
is the symbolic name of the work area; and
the !hirQ_~ra~~te.f is the letters IS.
ISFMS transfers both the key of the r~cord
and the data to the specified work area for
unblocked records.
For blocked records,
ISFMS transfers only the data portion of
the record to the specified work area. The
record is available £or the execution of
the next program instruction.
If blocked records and updatinq are
specified in the file definition, each GET
that transfers a block of records to main
storage will, if necessary, also write the
preceding block tack into the disk file in
its previous location.
GET writes the
precedinq block if a PUT instruction has
been issued for at least one of the records

,Name

r-

,
,

Op

,Operand

-+PUT, filename"

,
,,

----,
------1

IS
PUT, filename,workname,IS
_____________________ J

L--.--,-__

..L-

The PUT macro instruction is used for
sequefrtial updating of a disk file, and
causes ISFMS to transfer records to the
file in sequential order.
It must be
preceded by a GET instruction for that
file.
The PUT instruction may be written
in either of two forms, depending on where
records are processed.
The first form is used if records are
processed in the-I/O area (specified by
DTFIS IOAREAS).
It requires three
parameters, the second of which is blank
and represented by a comma.
The first
parameter specifies the symbolic name of
the file to which the records are to be
transferred.
This is the same name as
specified in the DTFIS header entry, the
SETL instruction, and the GET instruction
for this file.
The !hi£~£arameter must be
the letters IS to indicate processinq by
the indexed sequential system.
The second form of the PUT instruction
is used'I~records are processed in a work
area. It requires three parameters. The
first is the symbolic name of the file, the
se£QnQ is the symbolic name of the work
area, and the third is the letters IS.
The
work-area name may be the same as that
specified in' the precedinq GET for this
file, but this is not required.
ISFMS
moves the record from the work area
specified in the PUT instruction to the I/O
area specified for the file in the DTFIS
entry IOAREAS.
When unblocked records are specified,
each PUT writes a record back onto the disk
file in the same location from which it was
retrieved by the preceding GET for this
file.
Thus, each PUT updates the last
record that was retrieved from the file.
If some records do not require updating, a
series of GET instructions can be issued
without intervening PUT instructions.
Therefore, it is no! necessary to rewrite
unchanqed records.
When blocked records are specified, PUT
instructions do not transfer records to the
disk file.
Instead, each PUT indicates
that the block is to be written after all
the records in the block have been
Macro Instruction Statements

111

processed.
When processing for the Block
is complete and a GET is issued to read the
next block into main storage ~ that GET
also writes the completed block back intothe file in its previous location. If a
PUT instruction is nQ1 issued for any
record in the block, GET does not write the
completed block.
At the end of the file
the ESETL macro instruction writes the last
block processed, if necessary.
NOTE: The user should insert an LTORG
statement in his assembler deck whenever
more than one control section. is generated
by the ISFMS macros (Load and/or Retrieve
functions).
This is to provide
addressability for·the generated literals
in the imperative macros.

SOPEN-Macro
The SOPEN (open STR adapter) macro
instruction turns on the adapter,
establishes the mode, and establishes
synchronization.
The SOPEN operands
determine the line interfaces on the
adapter, the data transmission rate, the
data transmission mode, and the type of
data checking to be performed.
Where the
dial option is present, SOPENmay also dial
a number, monitor for ringing, and
establish a connection.
SOPEN must be issued for a line before a
READ, WRITE, or CNTRL macro is issued for
that line.

PROCESSING WITH STR DEVICES
Logical IOCS provides macro instructions
for processing with STR (Synchronous
Transmitter-Receiver) devices.
The~e
devices can be remotely attached to a
System/360, Model 30, 40, 50, 65 or 75,
through an IBM 2701 Data Adapter Unit,
equipped with an tBM Synchronous Data
Adapter, Type I.
Whenever STR macro instructions are used
to transmit and receive data or furnish
line control, each synchronous data adapter
must be defined by the declarative macro
DTFSN (Qefine !he rile for ~y!chronous
Ttansmitter-Receiver use) • . ~he operand
entries for the DTFSN (and for the DTFRF
macro) are described under Fil~efin!tioll
Mac£os.
Before processing can be done with STR
devices, the adapter must be initialized.
Logical Ioes provides a unique imperative
macro instruction, SOPEN (open STR
adapter), to initialize the adapter for STR
processing.

'12

S/360 BOS Assembler with I/O Macros

Completion of a SOPEN macro is indicated
in the traffic (or wait) bit and the unit"
exception bit in the channel command block
eCCB). The WAIT macro or the WAITM macro
should be used to check for completion of
the SOPEN macro.
The .lost data and unit exception
(end-of-file) bits should be.checked by the
problem program upon completion of a SOPEN
macro instruction. If SOPEN could not
establish synchronism, and an operator
reply of 4 was given, the lost data and
unit. exception bits will be on. If the
remote terminal attempted to transmit
before synchronism was established, the
unit exception bit will not be on,
indicating the SOPEN macro could not
complete successfully.
SOPEN can be reissued with the same or
different operands after a sctos macro to
begin transmission or reception of data to
the same or another device.

NAME

OPERATION
SOPEN

OPERAND

COMMENTS

DTFNAME=dtfname

Symbolic name of DTFSN macro

DIAL=IN
OUT

Answering
Calling

°1 NTFAC=A

H

*Wh ich line interface on the adapter to use.
BOTH may only be specified when DIAL=I N.

If
BOTH

LRC check should be performed on record or
group mark.

HINTLRC=NO

YES
INTLRCB=NO
YES

When I NTFAC=BOTH, I NTLRCB provides for
LRC check for interface B as I NTLRC provides for interface A.

HSPEED=X

*data transmission rate expressed in
characters/second.

Y
Z
CLOCK
SPEEDB=X
Y
Z
CLOCK

When I NTFAC=BOTH, SPEEDB provides the
data transmission rate for interface B, as
SPEED provides for interface A.

H MODE=FULL

Full duplex
Four wire half duplex
Two wire half duplex
(data transmission modes)

FOUR
TWO
MODEB=FULL
FOUR
TWO

When INTFAC=BOTH, MODEB determines the
data transmission made for interface B, while
MODE provides for interface A.

NUMB=n

General register (2-11) loaded by problem
program with address of DIALO macro. Must
be supplied when DIAL=OUT.

--

Underlined choices will be assumed if operand is omitted.
°1 NTFAC must be "=A" if Dual Communications Interface feature is not present.
HSupplied by DIALO macro when SOPEN DIAL=OUT.
*For further reference see the section Communications: Synchronous Adapter in the publication IBM 2701 Data Adapter Unit:
Principles of Operation (Form A22-6864).

Figure 26.

SOPEN Macro

The SCPEN macro instruction is coded
with the keyword operands as shown in
Figure 26.

declarative macro instruct jon, DIALO (dial
out), to supply the dial address and
various parameters required by the SOPEN
macro.

Where the problem program wishes to use
the facilities of STR devices attached over
a dial network (with the Automatic Call
Feature installed), logical laCS provides a
Macro Instruction Statements

113

NAME

COMMENTS

OPERAND

OPERATION
DIALO
LENGTH=n

The total number of digits in the telephone number
to be dialed (sum of IIACODE II and IIDIGITSII).

ACODE=number

The area code, or any digits not included in
IIDIGITSII.

DIGITS=number

The telephone number to be dialed (maximum of 7
digits).

# INTFAC=A
B

*Which line interface on the adapter to use.

# INTLRC=YES
NO

LRC check should be performed on record or
group mark.

# SPEED=X
Y
Z
CLOCK

* Data transmission rate expressed in characters/
second.

# MODE=FULL
FOUR
TWO

Full duplex
Four- wire half duplex
Two- wire half duplex
(data transmission modes)

Underlined choices will be assumed if operand is omitted.
* For further reference see the section, Communications: Synchronous Adapter, in the publication IBM 2701 Data Adapter Unit:
Principles of Operation (Form A22- 6864).

# See SOPEN Macro.

Figure 27.

DIALO Macro

DIA1.Q_ Ma g:g

I

II

INamelOp
The declarative DIALO (dial out) macro
instruction generates the proper constants
required by the SOPEN macro to dial and
synchronize with the selected terminal.
The DIALO macro operands provide the
actual number to be dialed and the number
of digits in that number. Other operands
specify the line interface on the adapter,
the data transmission speed, and the data
transmission mode.
For a further
explanation of DIALO operands see Figure
27.
Once the SOPEN and DIALO macros have
established the proper connect~on between
the STR d;evices, logical Ioes provi,des
several imperative macro instructions for
the actual processing (transmission,
reception, and control) of data.

'14

S/360 BOS Assembler with I/O Macros

I

I Operand
I

II
IL - - - -IREADldtfname,STR
i - - - - i .____________

-----'

The READ macro instruction is used to read
one record from the STR device specified in
the DTFSN (referenced in the READ macro by
"dtfname n ).
The area into which the data will be
read must be determined by the problem
program before the READ is issued.
The
problem program must store the starting
address of the designated area int9 the
"abuck" portion of the expanded STR CCB
(see Figure 42).
The problem proqram must
also store the length of the designated
area in "lbuck" in the STR CCB.
Before a READ macro instruction is
issued, the line must be SOPEN1ed, and a
CNTRL macro with the operand PREP (prepare)
must be issued and successfully completed.
The problem program must be sure that the
READ is complete (using the WAIT or WAITM

Expanded STR CCB (see Fiqure 42)
should be checked.
If INQ RCVD is ON,
the remote terminal is attemptinq to
transmit and the CNTRL INQ cannot
complete successfully.
INQ maybe
issued following a CNTRL PREP (when
INQ is issued following a PREP, the
PREP operation is discontinued).
INQ
may not be issued during a read
sequence, or during a write sequence
(the time bet w,een an INQ issued and
EOF).

macro) before issuing another READ for the
same adapter.

r--~--~I-------------

INamelOp

I Operand

r---r---+--------------------.----~

1

IWRITEldtfname,STR

I

I

I

The WRITE
write one
specified
the WRITE

Macro instruction is used to
record to the STR device
in the DTFSN macro (referenced in
macro as "dtfname").

The area from which the data will be
written must be specified by the problem
program before the WRITE is issued. The
problem program must store the starting
address of the designated area into the
"amuck" portion of the expanded STR CCB
(Figure 42).
The problem program must also
store the length of the designated area in
"lbuck" in the CCB.
Before a WRITE macro instruction is
issued, the line must be SOPEN'ed, and a
CNTRL macro with the operand tNQ (inquiry)
must be issued and successf~lly completed.
The problem program must be sure that the
WRITE is complete (using the WAIT or WAITM
macro) before issuing another WRITE for the
same adapter.

r---~--~-------------------

INamelOp

I

I Operand

--+-~----­

I
I

ICNTRLldtfname,code,n

I

I

I

1
I·

I

The CNTRL (control) macro instruction
provides orders to the Data Adapter and the
terminal. Orders apply to ph~sical nondata
operations of a unit and are peculiar to
the unit involved.
CNTRL requires either two or three
operands. The first operand (dtfname) must
be the symbolic name of the DTFSN macro or
. line on which to perform· the function
specified in the code operand of the CNTRL
macro.
The second operand specifies the
mnemonic codes (see Figure '4) for the
operation to be performed:
EOF

INQ

(End of Transmission) ends the
transmission to an STR device. EOF
may not be used during a read sequence
(the time between a PREP issued·and an
EOF recei ved) •
(Inquiry) sends INQ to the STR device.
INQ must be successfully completed
before a WRITE is issued. . The INC
RCVD (inquiry received) bit on in the

PREP (Prepare) monitors the line for
receiving INQ, EOF, or TEL from the
5TR device.
Before a READ is issued,
PREP must be successfully completed.
PREP may not be issued during a write
sequence.
TEL

(Alternate Mode) sends the TEL signal
to an STR device.
TEL may not be
issued during a read or write
sequence.

The ihi£~oper~ng (n) specifies a count
to be used if other than:
EOF TEL INQ PREP -

2
2
10
Not applicable

This count is the number of times the
particular signal will be sent until the
correct reply to that signal is received.
When the count is exceeded, an error
condition results.
An operator messaqe is
given.
The DTFSN must be SOPEN'ed before any
CNTRL macro is issued.
If the problem program issues an EOF,
INQ, PREP, or TEL out of sequence (durinq a
read or write sequence), an operator
messaqe is issued, the STR lines are
properly disabled, and the job is
terminated with a dump.
The problem program must be sure that a
CNTRL macro is complete (using the WAIT or
WAITM macro) before issuing another
imp~rative STR macro instruction.
Exceptions to this are: SCLOS (close STR
adapter), which may be issued at any time,
and an INQ issued following a PREo, which
has been explained previously.
CDCNV Macro
ri----~I-----~'~---------------------·--------------,

INamelOp

I
I

IOperand
I
ICDCNVltype,startaddr,lenqth

I

I
,
I
I

I

Macro Instruction statements

115

The CDCNV (code conversion) macro
instruction provides for the ccnversion of
the internal code of the transmitter
(EBCDIC, BCD, or Binary) to the standard
STR transmission code (fixed count
four-out-of-eight [4/8]), or for the
conversidn of 4/8 code to the internal code
of the receiver.
The first·of three required operands,
"type",-is coded as A, B, C, 0, E, or F,
and specifies:
A - Convert for transmitting EBCDIC (256
character set) from System/360.
B - Convert for receiving EBCDIC (256
character set) from the terminal.
C - Convert for transmitting EBCDIC (256
character set) to a 1978 in column
binary mode.

o

~

E -

Convert for transmitting BCD
character set) or binary (64
set) to any STR device. All
characters are replaced wi th

(56
character
invalid
colon

Convert for receiving BCD (56 character
set) or binary (64 character set) from
any STR ·device.

The §~on~_QE~~2ng (startaddr) specifies
the symbolic name of a full word containing
the actual address of the leftmost byte of
the field to be converted.
The 1hi~g_QEg~~nQ (length) specifies the
symbolic name of a half word containing the
number of bytes to be converted.
For types A and C, each EBCDIC character
is converted to two 4/8 characters.
Therefore, the length of the field provided
for the converted· characters must be twice
the length of the area being converted.
For types Band 0; two 4/8 ·characters
are converted to one" EBCDIC character.
Therefore, the length of the converted
field is one-half the length of the area to
be converted.
Also, for types E and F, the BCD or
substitute blank (2-8 punches) translates
as "2- 4- 8-0" in 4/8 code while a blank (no
punches) translates as "R-O-X-N" in 4/8
code.
The CDCNV macro, types E and P, may
be modified to transmit or receive the BCD
or substitute blank.
(See !£penQix 1.)
For a discussion of the WAIT and WAITM
macros used for processing with STR
116

SCLOS Macro
r--

(I

10perand

I
I

I

I

I SCLOS I dtfname

L-_~

,

,

Ii

INamelOp

_ _ _ _'__

I

I

_ _ _ _ _J

Logical IOCS also provides a unique macro
for completion of STR processing.
The
SCLOS (close STR adapter) macro turns off
the adapter.
It may be issued at any time
in the problem program.
SCLOS must be
issued when all transmission to the line
specified in dtfname is co~pleted, or when
the problem program wishes to SOPEN the
line with different operands. The problem
program should SCLOS all lines before
end-of-job.

Convert for receiving EBCDIC (256
character set) from a 1978 in column
binary mode.

(1248 •••• ) •

F -

devices, see PROCESSING RECORDS-WITH
IOCS, under WAI:L~ and WAITM
Magro.

PHI.§.!~AL

S/360 BOS Assembler with I/O Macros

Logical IOCS provides macro support
routines designed to supply the facilities
for sending and receiving data. It uses an
IBM 270' Data Adapter Unit equipped with an
IBM Synchronous Data Adapter--Type II,
connected by leased or dial line to a
remote IBM System/360, Model 30, 4~, 50,
65, 67 (working in 65 mode), or 75. The
remote CPU is equipped with an IBM 2701
Data Adapter Unit with an SDA II or an IBM
2703 Transmission Control Unit with Binary
Synchronous features.

Transmission is initiated in a
point-to-point, CPu-to-cPU communications
environment when one CPU successfully ~ends
the Inquiry (ENQ) signal to the other CPU.
For a leased line, BSC macro support
p~ovides the CNTRL Prepare (PRP) macro
instruction to receive the ENQ and the
CNTRL ENQ macro instruction to send the
ENQ.
(READ ENQ--Type TQ--also receives the
ENQ signal.)
The ETX (ETB is also valid) control
character is expected to be the last
character of a message and, as such,
indicates normal completion to a READ
macro.
Normally STX is the valid
start-character of a text message.
The SOH
character is also valid. For transparent
text, PLE STX and DLE ETX (or OLE ETB) are
valid text-framing characters.
BSC support routines maintain a system
of alternating acknowledgments (ACK-O and
ACK-1), positive responses to alternate
text messages, for protection against
message duplication or loss_
The WRITE
macro includes, following the actual WRITE

channel command, a READ command to receive
the alternating acknowledgment.
READ ENQ
(typeTQ) issues a READ command to' receive
a control character (ENQ) from the remote.
cpu.
All other READ macro types issue a
WRITE command to send the appropriate
alternating acknowledgment for the last
message (or control character) received,
before issuing a READ command for this
message.
If the incorrect alternating
acknowledgment is received, BSC error
recovery retransmits the previous text
mes'sage or con trol character until the
correct alternating acknowledgment is
received or until the retry count (RCOUNT
in the DTFBS macro instruction) is
exhausted.
If the retry count has been
exceeded and the correct alternating
acknowledgment has not been received, the
Message Format Error and Wrong ACK bits are
posted to the BSC CCB.
BSC error routines perform ether
analysis functions.
The CNTRL
macros (except CNTRL EOT on a leased line
andCNTRL DSC) expect certain responses and
include the channel commands to receive
these responses.

BOPEN·Macro

,

I

IName OperationlOperand

I

BOPEN

I

I DTFNAME=dtfname,
IINTRFC=!,

I

B

IDIAL=YES,
I
NO

I
ICODE=!

I

B

The BOPEN macro establishes the mode and,
on a leased line, turns on the adapter (SDA
II) •
BOPEN must be issued for a line before
any IDIAL macro or any READ, WRITE, or
CNTRL macro.
It may be reissued with the
same or different parameters following the
BCLOS macro instruction.

line~control

Response-Expected
CNTRL
CNTRL
CNTRL
CNTRL

PRP
EOT (dial line)
WABT
ENQ

ENQ
DLE EOT, EOT, or ENQ
ENQ
ACK-Q

Invalid or unexpected responses detected by
BSC error routines are posted to the GCB
(unexpected response and I/O error) after
the retry count is exhausted.
Refer to ~~ndixM, ·Part-2 for CCB bits
to be checked after compfetion of BSC
operations. Refer to Appendix-M,Part-1·
for a table containing a more precise
description of each control character.
Refer to .!EEendix - M, . Part·· 3 for a sample
program illustrating how the problem
program can use BSC support macro
instructions for basic line control.
When BSC support macro instructions are
used to transmit and receive data, the data
adapter (SDA II) must be defined by the
file-definition macro DTFBS (Define The
File for Binary Synchronous Communication).
This macro (and the DTFRF macro) are
described under File Definition Macros.
Before any processing can be done within
the CPu-to-cPU environment, the data
adapter must be initialized •. Logical IOCS
provides the unique imperative macro
instruction, BOP~~ (open BSC adapter). to
initialize the. adapter •.

The firs~key~d·ope~£specifies the
symbolic name given ·to DTFBS for the line.
The second - keyword. operand· (INTRFC= )
specifies which adapter interface (A or B)
is to be used.
If this operand is omitted,
INTRFC=A is assumed.
The third-keyword operand (DIAL= )
specifies whether the line is dial
(DIAL=YES) or leased (DIAL=NO).
If the
DIAL parameter is omit~ed, DIAL=NO is
assumed.
The fourth-keyword operand (CODE= )
specifies the code that is EBCDIC (A or B).
This parameter applies when the dual code
feature of the SDA II is present. If the
CODE parameter is omitted, CODE=A is
assumed.
If DIAL=YES is specified, the BOPEN
macro must be followed by an IDIAL macro
instruction to establish the connection.
If DIAL=NO is specified, or assumed, BOPEN
should be followed by a CNTRL operation
(PRP or ENQ) or may be followed by a READ
ENQ (Type TQ).
At the completion of the BOPEN macro,
the problem program should check for normal
completion (as in !~ndix M,Part- 2)
before continuing.

The IDIAL macro instruction performs the
initial line control functions necessary
for dial lines. It dials a number,
monitors a line for "ringing" or handles
ID-verification.
IDIAL also reads or
writes one text record from or to the
remote cpu.
Macro Instruction Statements

117

IDIAL must be issued for a dial line
immediately following the BOPEN macro
instruction and preceding any READ, WRITE,
or CNTRL operation. IDIAL should not be
used for a leased line.

the starting address and length (including
the text-framing characters) of the data to
be read or written before issuing the IDIAL

The area address and length fields in
the expanded BSC CCB must be loaded with

The IDIAL macro is coded with the
keyword operands as shown in Figure 28.

r-

I

I

--,

--~I----

I Name I Operation I
•
-+
I
I
I IDIAL
I
1----+
I
I
I
I
I
I
I
I
I
I
r---+
I
I
I
I
I
I
I
I
I
I
I
I
I
I
-+
I
I
I
I
I
I
I
I
I
I
I
I
--+
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I

r-

macro~

Operand

Comments

DTFNAME=dtfname

Symbolic name given to the DTFBS for this line.

,

CALL#
ANS*
MAN

This CPU is calling, answering, or
establishing the connection with
the remote CPU manually.

I
I
I

MONE

ID-verification:
no ID-verification,
send ID characters, receive
ID characters, or both send and
receive ID characters.

I
I
I
I

DIAL=

oID=

SNDID
RCVID
BOTH

I

.----------f

I

._--------1

RD
OPTYPE= WT
WTX

Read a text record.
Write a text record.
Write a record of transparent text.

REG=n

General register (2-1') to be loaded by the
problem proqram with the address of the
IDLST~
This parameter may be omitted only
if there is no IDLST (i.e., DI~L=ANS/MAN,
ID=NONE).

-I
I
I
I
I

I

I # If DIAL=CALL, the Automatic Call Feature must be installed.
I
OPTYPE must be either W~ or WTX.
I
I * If DIAL=ANS, OPTYPE must be RD.
I
I 0 If the ID parameter is omitted, ID=NONE is assumed.
L

J

Figure 28.

IDIAL Macro

For OPTYPE=WT (normal WRITE), the
problem program normally should provide the
text-framing characters, STX and ETX. For
OPTYPE=WTX (transparent WRITE), the problem
program must supply the start-character
sequence, DLE STX; macro support provides
the end-character sequence l DLE ETX.
As
with any WRITE macro, no line control
characters should appear in the text unless
a transparent WRITE is used.
ID-verification procedures, if included,
allow two CP~'s connected by dial line to
identify themselves by exchanging sequences

118

S/360 BOS Assembler with I/O Macros

of up to 15 hexadecimal graphic characters.
The problem program must provide these
character sequences in an IDLST.
The
correct control (or response) character
must be provided following the last
ID-character in each ID-seguence and must
be added· to the count.
See Figure 29 and
!Ependi~~f~£i~l.
The IDLST may also
contain the digits to be dialed (for
DIAL=CALL), up to 15 digits (expressed as
characters or as hexadecimal digits).
Refer to Figure 30 for the format of the
IDLST and for examples.

i

IDIAL
OPERANDS

CONTROL (OR RESPONSE) CHARACTER TO BE INCLUDED
AFTER THE LAST ID-CHARACTER *0

r---------.---------------------r------------------------------------~

SNDID CHARACTERS

RCVID CHARACTERS

DIAL=CALL/HAN
OPTYPE=WT/WTX

ENQ

ACK-O

DIAL=ANS/MAN
OPTYPE=RD'

ACK-O

ENQ

*

I
I

,I

Refer to Appendix H, Part 1 for the hexadecimal representation of the character and I
the length .in bytes to be added to the count.
I

o The'problem programmer must provide both·SNDID and RCVID control (or response)
characters if he includes any,ID-verification (if he codes ID=SNDID/RCVID/BOTH).

I
I
I
I

Figure 29.ID-Character Sequence, Control Characters

Macro Instruction Statements

119

IDlST

NUMBER OF
DIAL DIGITS

DIGITS TO BE DIALED

COUNT *

ID CHARACTERS TO BE SENT (SNDID)

COUNT *

ID CHARACTERS EXPECTED (RCVID)

RCV AREA - 10 CHARACTERS RECEIVED WI LL BE READ
INTO THIS AREA AND CHECKED **

* COUNT includes the number of 10 - characters (up to 15) plus
the length in bytes of the control (or response) character.

** The length of the RCV AREA should be equal to the number of
10 - characters expected plus the length in bytes of the control

(or response) character expected.
Examples:

ill.

ill

DIAl=CAlL,ID=NONE

IDlST

I X'4' I

C'1234' I no. of digits - dial digits

DIAL=ANS/MAN, I D=SNDI 0 ,OPTYPE=R 0

IDLST

X'5'
X'l'

I C'BOS' X'1070' I

I

X'2D'

[No other parameters are required.]
~

(2) DIAl=CAll,ID=SNDID
IDLST

QL

X'4'
X'4'
X'2'

X '01 020304' I
C'RAL' X'2D'1
X '1070'

no. of digits - dial digits
count ,- SNDID - ENQ
count - ACK-O
RCV AREA

DIAL=AND/MAN,ID=RCVID,OPTYPE=RD

IDLST

X'2'
X'4'

T X'1070' I
I C'RAL' I X'2D' I
I

count - ACK-O
count - RCVI D - ENQ
RCV AR~A

..EL DIAL=ANS/MAN, ID=BOTH, OPTYPE=RD
DIAl=CALL, ID=RCVI 0
IDLST

IDLST

~

count - SNDID - ACK-O
count - ENQ
RCV AREA

X'4'
X'l'
X'5'

C'1234'
X'2D'
C'BOS'

no. of digits - dial digits
count - ENQ
X'1070'1 count - RCVID - ACK-O
I RCV AREA

DIAL=CALL, ID=BOTH

IDLST

X'4'
X'4'
X'5'

C'1234'
C'RAL'
C'BOS'

Figure 30.

no. of digits - dial digits
X'2D'1 count - SNDID - ENQ
X'1070'1 count - RCVID - ACK-O
I RCV AREA

X'5'
X'4'

1 C'BOS' I
I C'RAL' I

X'1070'1 count - SNDID - ACK-O
X'2D'1 count - RCVID - ENQ
L - -_ _ _ _ _ _~I
RCV AREA

Notes:
• For DIAL=MAN,OPTYPE=WT;WTX the IDLST form is the
same as for the DIAL=CALL examples, except that no dial
digits are required.
• For DIAL=ANS/MAN,ID =NONE no IDLST is required.
(The REG =n parameter on the IDIAL macro instruction is
also not required.) The IDLST will be provided by macro
support.

IDLST Format and Examples

ID-checking is performed by the CPU that
receives an ID-seguence.
For example, if
ID=SNDID is coded, the remote CPU receives
and checks the ID-characters and control
(or response) characters. If the specified
ID-seguence(s) and responses are valid, the
first text record is read or written.

Upon.completion of the IDIAL macro
instruction, the problem program should
check the normal completion bit in the BSC
flag bytes of the CCB.· If normal
completion is not indicated, the program
should check further in the "completion"
and "received" BSC flag bytes.
(See
!E£endix·M, Part-2.)

The WAIT macro or WAITM macro should be
used to check for the completion of the
IDIAL macro instruction •

Once the proper connection has been
established (with BOPEN and, on a dial
line, IDIAL), logical IOCS' provides

• 20

S/360 BOS Assembler with I/O Macros

are written to the remote cpu.
The NAK
control character is then sent to the
remote cpu to request retransmission of
the last record.
The record, of the
length specified in the CCB, is then
read into the data area pointed to by
the para~eter list.
See Fiqure 31.

imperative macro instructions for the
actual processing (sending or receiving) of
data.

r----,-----------~i------------

I

INamelOperationlOperand

J---+-

I

IL-__ IREAD
Idtfname,BSC,type-code
_______
_______
~

I

----1
I

~~

The READ macro instruction provides five
READ types, each of which causes the
reading of one record from the ~emote cpu.

•

Ingui£Y-11Ql.
This READ-type may be
used to read the ENQ control character.
The ENQ signal, when received, is read
into the response area of the CCB.

The ihir~operanQ on the READ macro must
contain one of the available type-codes:

The five types are:

•

~Qll1in~J1Ml.

•

Continue with leading graphics (TG) •
'The graphic characters contained in the
parameter list poinbed to by the CCB
are written to the remote cpu.
(See
Figure 31 for the form of the parameter
list.)
One record, of the length
specified in the CCB, is then read into
the data area pointed to in the
parameter list.

One record, of the
length specified in the lenqth field of
the expanded BSC CCB, is read into the
data area pointed to in the CCB.

•

•

Repe~1Rl.
A NAK control character
is sent to the remote cpu to request
retransmission of the last record. The
record, of the length specified in the
CCB, is read into the data area pointed
to by the CCB.

Re~at with leadin~~hics-1TL).
The
graphic characters contained in the
parameter list pointed to by the CCB

DTFBS
(eCB)

LENGTH
FIELD

See the preceding description of each type.
Before issuing a READ macro, (except
READ TQ), the area address field and tpe
length field of the expanded BSC CCB must
be properly loaded with the startinq
address and lenqth (includinq the
text-framing characters) of the data area
(or the parameter list address and data
area length the types TG or TL--READ's with
leading qraphics).
The line must be established (with BOPEN
and, on a dial line, IDIAL) before the
first READ macro instruction is issued. A
CNTRL Prepare (PRP) should have been
successfully completed before issuing the
first READ on a leased line.

AREA ADDRESS FI ELQ

READ area
length
PARAMETER
READ area address

LIST
Note: There may be up to seven graphic characters.
The byte preceding the first graphic character is
reserved for a binary count of the number of graphics.

Figure 31.

CT

Parameter List for READ with Leading Graphics
(Type-Code TG or TL)
Macro Instruction Statements

121

The WAIT or WAITM macro should be used
to check for the completion of the READ
macro instruction.
Upon completion of the READ macro
instruction, the problem program sh~uld
check th~ normal completion bit in the BSC
flag bytes of the CCB.
If normal
completion is not indicated, the program
should check further in the "completion"
and "received" BSC flag bytes.
(See
!E,E.gndix M", Part, 2.)
If normal completion
is indicated, the problem program should
also check the EOT received bit in the BSC
flag bytes.
'

i

M

---,.----------------------------,

I

~

I
I WRITE

I
I dtfname,BSC,type-code

i

I

I

INamelOperationlOperand

The WRITE macro provides five WRITE types,
each of which causes the writing of one
record to ths remote cPU.
The
•

•

f~ve

•

Conversational-eTC). The problem
program must set'up a parameter list
containinq the length and starting
address of the WRITE d~ta area and the
READ data area in that order. One
record, of the length specified in this
list, is w,ri tten from the data area
specified in the list. The response
message (or control character) is then
read into the specified READ data area.
The' parameter list is of the form
indicated in Figure 32.

•

Transparent·- Conversational {TV} • One
record, of the length specified in the
parameter list pointed to in the CCB is
written from the data area pointed to
in the parameter list.
The character
sequence DLE ETX is written.
The
response message (or control character)
, is then read into the specified READ
data area.
Refer to Figure 32 for the
cprrect form of the parameter list.

The third operand must contain one of
the five available type-codes:

WRITE types are:

continue (Tn.
One record, of,:t he
length specified in the CCB, is written
from the data area pointed to in the
CCB.
.Tran§.Ear en t.:::.1g]f:t.::.JTX) or' Transparent
Block, (TXB1.
One record (or block) of
the length specified in the CCB, is
written from the data area pointed to
in the CCB and' the correct
end-character sequence (DLE ETX or DLE
ETB, respectively) is written.

See the precedinq description of each type.
Before issuing a WRITE macro; the area
address field and the lenqth field of the
expanded BSC CCB must be properly loaded
with the starting address and length
(including the text-framing characters) of
the data area (or with the parameter list
address and X'FFFF' for types TC or
TV--conversational WRITE's).
For

DTFBS ,
(CCB)

LENGTH
FIELD

PARAMETER

LIST

Figure 32.

122

WRITE area length

WRITE area starting address

REA D area length

READ area starting address

Parameter List for Conversational WRITE's
'(Type TC or TV)

S/360 BOS Assembler with I/O Macros

WRITE-types TX, TXB, or TV, the OLE ETX (or
OLE ETB) character sequence provided by
macro support is not to be included in the
length.

CNTRL requires two operands. ·The fi£§!
operand· (dtfname) must be the symbolic name
on the DTFBS macro.
The second operand
specifies .one of the following mnemonic
codes for the operation to be performed:

The line must be established (with BOPEN
and, on a dial line, IOIAL) before the
first WRITE macro instruction.
A CNTRL ENQ
should be issued before the first WRITE
macro on a leased line.

•

PRP (Prepare) is used to monitor a
line for activity. The
operation completes when a signal of
activity (normally an ENQ) is received
from the remote CPU. CNTRL Prepare
should be coded preceding the first
READ macro and following BOPEN on a
non-switched line. CNTRL Prepare
should not be used for a dial line.

•

~End

•

WAB1-jWait Before Transmittingl sends
the WAit-l!efore-lransmitting (WABT)
sequence to the remote CPU and waits
for a response, normally an ENQ.
The
problem program that reguests th~ delay
may reissue CNTRL WABT if not yet ready
to receive when the ENQ is received.

•

DSC (Disconnectl is used, on a switched
line, to indicate to the remote CPU
that the connection is being broken
(the line is being disabled) at this
CPU. CNTRL Disconnect must be followed
by BCLOS to disable the line.
CNTRL
Disconnect should not be used on a
leased line.

•

ENQ-1!ngQ!£Yl is used to bid for the
line and initiate transmission by
sending the ENQ control character.
CNTRL ENQ normally precedes a WRITE
macro.
The expected response is ACK-9.
When CP.TRL ENQ elicits an outstanding
acknowledgement from the remote CPU (i.
e., when a WABT has been received), the
response may be ACK-O, ACK-1, or NAK.

The problem program normally should
provide the text-framing characters, STX
and ETX, for WRITE continue (type TT) and
WRITE Conversational (type TC). For
transparent WRITE's (types TX, TXB, and
TV), the problem program must supply the
start-character sequence, OLE STX.
Macro
support provides the corr~ct end-character
sequ~nce:
OLE ETX for type TX or TV, OLE
ETB for type TXB.
No line control
characters should appear in the text unless
a transparent WRITE is used.
A conversational WRITE (type TC or TV)
that reaches normal completion (a valid
text message was received) should be
followed by a READ continue (type TN) to
ensure that the system of alternating
acknowledgments is correctly maintained. A
conversational WRITE (type TC or TV) that
receives graphics or some other response
(not a valid text message) may be followed
by another WRITE or CNTRL operation.
On a switched line, if an EaT is
received in response to a text write, the
transmitting CPU (which issues the WRITE
macro) must issue a CNTRL EaT macro
instruction to allow the receiving CPU to
issue CNTRL ENQ and begin transmitting.
The WAIT or WAITM macro should be used
to check for the completion of the WRITE
macro instructlon.
Upon completion of the WRITE macro
instruction, the problem program should
check the normal completion bit in the BSC
flag bytes of the CCB.
If n~rmal
completion is not indicated, the program
should check further in the "completion"
and "received" BSC flag bytes.
(See
~ndix-.!1L-Par.:Ll. )

~1

I
L-__

,

I

I

ICNTRL
________ Idtfname,code
_____________________________

~~

~

The CNTRL (control) macro instruction
provides orders ·to the data adapter
pertaining to line control.

- of·· Transmission) is used to
send the End-Of-Transmission signal to
the remote cpu. -on a non-switched
line, there is no provision for reading
a response from the remote CPU. On a
switcbed line, Message Format Error and
the appropriate bit in the Received •
Byte of the Expanded BSC CCB (EaT, DLE
EaT, or ENW is posted~

The line must be established (with BOPEN
and, on a dial line, IDIAL) before issuing
the CNTRL macro.
The problem program must be sure that a
CNTRL macro is complete by using the WAIT
or WAITM macro instruction immediately
following the CNTRL macro instruction.

INamelOperationlOperand

.-

non-switch~d

~

Upon completion of the CNTRL macro
instruction, the problem program should
check the normal completion bit in the BSC
flag bytes of the CCB.
If normal
completion is not indicated, the problem
program should check further in the
Macro Instruction statements

123

"completion" and "received" BSC flag bytes.
(S ee !.EEendix M, Part~.

For more detailed information on the
format of these messages, refer to IBM
2Y~tem/3eO·Basic-Operatinq

Sys~Qperator·

BCr.OS·Macro

Messages, Form C24-5024.

togical IOCS provides a unique macro
instruction for completion of BSC
processing. The BCtOS macro turns off the
data adapter (SDA II) and clears the BSC
flag bytes. Before disabling the adapter,
BCLOS halts 1/0 on any command outstanding
to the SDA II.
BCtOS must be issued when
all transmission on the line specified in
dtfname is completed or ~hen the problem
program wishes to use BOPEN (and IDIAL)
again with different parameters.

For a discussion of the WAIT and WAITM
macros used for processing with BSC
support, see prQ£~§sinqRecords-with
Physical laCS, underWAI~MacrQ and WAITM

.----,-----------r.----------------------------~

INamelOperand

r-I

I

IOperand

I

1BCtOS

Idtfname

I

I

The problem program should check for the
completion of BCLOS by using the WAIT or
WAITM macrolo

When all data transmissicn is completed and
end-of-job is reached, the problem program
using BSC support macrosmgst issue the
ERRPT macro.
ERRPT displays the error
statistics:

•
•
•
•
•

Records can be transferred to or from an
input/output device by issui~g physical
laCS macro instructions.
These
instructions relate directly to the
physical laCS routines and bypass all
logical laCS routines.
Thus routines for
such functions as blocking or deblockinq
records, performing programmed
wrong-Iength-record checks, swit6hing I/O
areas when two areas are used, and settinq
up Channel Command Words (CCW) are
eliminated. Any of these functions that
are r€quired for a problem proqram must be
provided by the user in his own
programming.
Physical IOCS routines contro1 the
transfer of data to or from the external
devi~e.
These routines are:

Interruption
Channel Scheduler
Device Error

ERRPT also performs functions essential
to the proper termination of a BSC job.
ERRPT removes the CCB from the CCB table
(BTAB) kept in the supervisor. The CCB is
entered in the table when a BOPEN macro is
issued for th~ CCB, and is only deleted by
ERRPT.
Therefore, to avoid filling up the
CCB table, ERRPT should be issued following
the BCLOS macro for this CCB.

.INamelOperationtOperand
,
---,.--------I
I
I ERRPT
________ I dtfname
______________•____________

L--~

~

~

The ERRPT macro should follow the BCtOS
macro, and, at end-of-job, precede the EOJ
macro.
124

PROCESSING RECORDS WITH PHYSICAL laCS

Start I/O
Data Check
Lost Data
;rntervention Required
Tillie Out
Unit Check

and the cou.nt of tot-al transmissions
received for this job. These hexadecimal
counts illustrate errors on the line or in
the modern equipment. Reqular display of
the counts ensures maximum. throughput for
the problem program through ea~ly detection
of freg~ently occurring errors.

1
I

Ma£~.

S/360 BaS Assembler with I/O Mae.ros

Thus, physical laCS macro instructions
provide the user with the capability of
obtaining data and performing non-data
operations in I/O devices, by issuing only
the I/O commands that he requests. For
example, if he is handlinq only physical
records, he does not need the IOCS ioutines
for blocking and deblocking logical
records.
He can write his owp routines to
handle the characteristics of his data file
logically.
Three macro instructions are available
to the programmer for direct communication
with physical laCS: CCB (Command Control
Block), EtCP (Execute Channel· Program), and
WAIT.
These are explained in the following
sections.
Whenever physical IOCS macro
instructions are used, the proqrammer must
construct the Channel Command Words (CCW)
for his input/output operations.
He uses
the assembler-instruction CCW statement for
this.
However, when using physical laCS
for 7-track tapes, the user need not wrIte
CCW's for setting the mode of the tape.
Physical laCS automatically performs this

function.
He must also recognize and
bypass checkpoint records if they are
interspersed with data re~ords on an input
tape.

r--

IName

I

tOp 10perand

J------+--+_
IblocknameICCBISYSnnn,command-list-name,X'yyyy'
,

I

I

The CCB (Command Control Block) macro
instruction must be issued once in the
problem program for each I/O device that is
controlled by physical IOCS macro
instructions.
It causes a command control
block (Figure 33) to be created. This
block is necessary to communicate
information to physical IOCS so that it can
perform desired operations (for example,
start I/O). The command control block also
receives status information after an
operation, and makes this available for use
by the problem program.
The CCB instruction must be labeled
(Blockname) with a symbolic name. This
name must be the operand in the EXCP and
WAIT instructions, which must refer to the
command control block.
Two operands are required in this CCB
instruction.
A third operand is optional.
The firs~rand specifies the symbolic
unit (SYSnnn) for the actual I/O unit with
which this control block will be
associated. The name may be SYSRDR,
SYSLST, SYSIPT, SYSOPT, SYSLOG,
The actual I/O unit is
SYSOOO-SYS254.
assigned to the symbolic unit by a Job
Control ASSGN card, or by the SYMUN macro
instruction.
The ~~Qll~oper~Q (command-list-name)
specifies the symbolic name of the first
CCW to be used with this CCB. This name
must be the same as the name specified in
the assembler CCW statement that constructs
the channel command word.
The 1hird~and (X'yyyy') may be used
to set the bits of bytes 2 and 3 at
assembly time.
After the user determines
which bits he wishes to set on, and which
off, he enters the hexadecimal
representation of the binary value that he
wishes.
The hexadecimal value must be
preceded by X and enclosed in single
quotes.
For example, to set on byte 2, bit
6, he would enter X'0400'.
Only the las~ five bits of byte 2 are
used by the problem program to communicate
with physical IOCS, as shown in Figure 33.

However, the user may also wish to set (at
assembly time) some bits that IOCS normally
sets during program execution.
For
example, if the user sets bit 6 of byte 3
on at assembly time, he can cause the
program to act as if the channel 9 overflow
condition has occurred when he begins
executing his program.
From the specifications in this CCB
instruction, the macro sets up an 8-byte
command-control block (Figure 33) as
follows:

0-1

The first two bytes are used for a
chain field that physical IOCS uses
for channel queueing.
After a
record has been transferred, IOCS
places the residual count in these
two bytes.
The problem program can
use this to check ~h~ length of the
record that was transferred.

2-3

The next two bytes are used for
transmission of information between
physical IOCS and the problem
program.
(For example, the problem
program can test byte 2, bit 1 to
determine if the I/O device
detected a wrong-length record when
data was transferred.)
All bits are set to a 0 (off)
when the problem program is
assembled unless the third operand
is included in the CCB macro
instruction.
If the third operand
is included,_ all bits set by IOCS
should be assembled as zeros (off).
During execution, each bit may be
set at 1 (on) by the problem
program or by a condition detected
by phy si,cal IOCS.
In byte 2 , bits
3 and 5-7 are turned on by the
problem program.
Any bits that are
turned on, during program
execution, by physical IOCS are
reset by IOCS the next time an EXCP
macro using the same CCB is
executed.
The condition inaicated
Macro Instruction statements

125

by the setting of each bit is shown
in Figure 34.
4-5

126

Bit 0 of byte 4 is used to indicate
that a program-controlled
interruption has occurred.
Like
the bits in bytes 2 and 3 (see
Fiqures 33 and 34), this is used to
transfer information from physical
laCS to the problem program.
The
other bits of bytes 4 and 5 are a
hexadecimal representation of the
symbolic unit for the I/O device,
as specified in the first operand
of this CCB instruction.

S/360 BaS Assembler with I/O MacroS'

6-7

The last two bytes contain the
address of the CCW (or first
address of a chain of CCW's)
associated with this CCB and
specified symbolically in the
second operand.

For a description of the CCB, expanded
for STR use, see: File Definition-Macros,
Processing with-sTR-Devices~DTFsN,-DT'FRF).
For description of the expanded BSC CCB,
see:
File Definition·Macros,-Binary~nchronous Communication jDTFBS, DTFRF)·.

Chain

Count

Bytes

-

Symbolic Unit
Address

Transmission
Information

-1 2

0
Channel Queuei~g

Used For:

3
Transmitting
Information
Between Physica I
10CS and Problem
Program

Residual Count

CCW
Address
5 6

4

I
I I

I

I
I

I I
I I

Hexadecimal Representation of
SYSnnn (Assuming that the
High-Order Bit of Byte 4 is 0):
SYSRES = 0000
SYSRDR = 0004
SYSLST = 0008
SYSIPT = OOOC
SYSOPT = 001 0
SYSLOG = 0014
SYSOOO = 0018
SYSOOI = 001C
etc.

7
Address of CCW
Associated
with This CCB

l l ....
..............

........... .............
.......

,,/

.., ....

.......

.......

Byte 2

Bits

Traffic
Bit
(Wait)

WrongLength
Record

Unrecoverable
I/O Error

Accept
Unrecoverable
I/o Error

Reserved
for PIOCS

0(X'80')

I(X'4d')

2(X'20')

3(X'10')

4(X'08')

Set On by--l PIOCS
I

PIOCS

: PIOCS

I

I
I

Wait for
Device End

5(X'04')

Accept 2311
Data Check
in Count, or
Disk or
Tp.Rec:id Err.
6(X'02 1)

Pro Pr.

Pro Pro

o

Pro Pro

'1
I
I
I

User
Error
Routine

7(X'OI')
Pr. Pr.

.(

I

I
Data
Check in
Count
Area - Disk

------

-----

BSC Lost
Data

End of
Cylinder
Disk

1287
Late
Stacker
Select
(Document
Mode)

1285/1287
NonRecovery

------

2540 Equip.
Chk., or
Disk or
Tape Read
Error

Questionable
Condition

--- --

1-----

1287 Hopper
Empty
(Document
Mode)

1285/1287
Keyboard
Correction
(Journal
,ape)

1 (X ' 40')

2(X'20')

:

PIOCS

PIOCS

BSC
Intervention
Required
3(X ' l0')
4(X'08 1)
PIOCS

PIOCS = Physical 10CS
Pr. Pr. = Problem Program

Figure 33.

Carr. Chan.
9 Overflow,
or Verify
Error for
Disk

-

Device End

Program
Controlled
Interruption

---

1285/1287
Equipment
Check
I- -

-

-- --

BSC Time
Out

I

PIOCS

Unit Exception (End
of File), or
Carr. Chan.
12 Overflow

1-------

BSC BusOut Check

0(X'80 ' )
I

Set ON bY-i

Track
OverrunDisk

----- - - ---

1285/1287
Data Check

Bits

Byte 4

Byte 3

I

PIOCS

5(X'04')

6(X'02')

7(X'OI')

0(X'80')

PIOCS

PIOCS

PIOCS

PIOCS

,

/

Command Control Block eCCB)

Macro Instruction statements

127

CONDITION INDICATED
BIT

BYTE

o (OFF)

1 (ON)
2

o - Traffic

I/o Completed (Channel End)

I/o Requested and Not Completed

1 - Wrong - Length Record

Bit 41 in CSW is ON

2 - Unrecoverable I/o Error

I/O Not Executed

---

3 - Accept Unrecoverable I/O (Bit 2 ON)

Return to User after Physical 10CS Attempts to
Correct I/O Error

Terminate Job when Unrecoverable
Error Detected

--

---

Bit (Wait)

4 - Reserved for PI OC S

3

5 - Wait for Device End

PrinteVo be Tested for Carriage Channel 9 or 12
overflow, or Punch to be tested for errors, or the
user has issued a CCB requesting physical 10CS
to post byte 3, bit 7 at Device End.

6 - Accept Data Check in Count, or Disk or
Tape Read Error. (Bit 3 of Byte 3 ON)

Return to User After Physical 10CS Attempts to
Correct the Disk or Tape Error.

Terminates the Job if the Read
Cannot' be Accomplished

7 - User Error Routine

User will Handle Unit Check (Test Bit 2)

Physical 10CS Error Routine

o - Data Check

Yes

No

in Count Area - Disk

----------- - Data Check: 1285 or 1287 .

~----

f-------

- Yes

-- - - - - -- - - - - - --- --- - - - - - --- --No

--- - --- - - -- - ----- - - - - -------- - - -----------Yes

No

1 - Track Overrun - Disk

Yes

No

- BSC Bus - out Check

Yes

No

2 - End of Cylinder - Disk

Yes

- BSC Lost Data

- - - - - - - - - - ------- --- - -------- ------ - - ------------ Late Stacker Select 1287 Document Mode Yes
No
-- - -- -------- - - -- -- - - - - - ------ - - --- - --- - --- ---------- -- -------------------- 1285/1287 Non -Recovery Dacument
Yes

- -

- -- -

-

--- ---- -

No

- - - - -- --------

No

Jam or Tom Tape
3 - 2540 Equipment Check, or Tape or Disk
Read Error
~---------

Yes

No

-------- ------- -

- 1285/1287 Keyboard Correction Journal

- -- --------

Yes

Tape Mode

- - - --- - - - --

-

- - - -- - - -

Yes

4 - Questionable Condition

-

-- - -

- -

- - -- - -

- - - -

Yes

No

6 - Carriage Channel 9 Overflow *#, or
Verify Error for Disk

Yes

No

-- - - - - -- - - - - 1285/1287 Equipment Check
r---- - - - - - - - - - - -

- BSC Time Out

----

--

-- - -

- - - -

--

-

Yes

- -

- -

Yes

-

- - ---

-

- -------

No

7 - Device End

Has Occurred*

--

4

0- Program-Controlled Interruption

PCI Bit in PSW is ON

--

* Set ON Only if Byte 2, Bit 5 is ON
# DVE needed in 10CFG Macro

128

-

-

--

-

-

--------

-

- -

No

~'>

Figure 34.

-

No

- Hopper Empty 1287 Document Mode

I- -

------

--

Yes

--

-

No

Card: Unusual Command Sequence
Tape: Converter Check
Disk: No Record Found

's - Carriage Channel 12 Overflow *#, or
Unit Exception (End of File)
1-- - - ------- - - - - -

- - -- - - -----

No

~---------------- f - - - -

- BSC Intervention Required

- -

Conditions Indicated by CCB Bytes 2, 3, and q

S/360 BOS Assembler with I/O Macros

--

-

----

-

-

--

-

EXCP i1acro

as "dtfnameD," where dtfname is the
symbolic name of the DTFBS macro.

i

IName

I

Op

Operand

EXCP

blockname

WAITM" Macro
,

I
I

I

I

I

I_AITMlblockname1, blockname2 ••••
I
I blocknamen, reg

,

I

I

INamelOp

The EXCP (execute channel program) macro
instr1,lction'reguests physical IOCS to start
an input/output operation for a particular
I/O device. The symbolic name (blockname)
of the CCB established for the device is
the only operand required in this
instruction.
Physical IOCS determines the device
the command control block
specified by blockname, and either starts
the device orplaces the command control
block (CCB) in a channel queue. Program
control is then returned to the problem
program.
If tme CCB is in a queue, the
actual transfer of data will be started at
some later time, when the CCB reaches the
top of the queue.
conce~~ed,from

i

IName

I

Op

Operand

WAIT

blockname

~--~----~-----------

This WAIT or WAITM macro instruction is
issued whenever the program requires that
an I/O operation, started by an EXCP
instruction, be completed before execution
of the problem proqramcontinues.
For
example, the transfer of data (a physical
record) to main storage must be completed
before that data can be added, m6ved to
another area of main storage , or otherwise
processed.
When this WAIT instruction is
executed, the program enters a waiting loop
until the related CCB indicates that the
associated input/output operation is
finished. Then programming automatically
continues, and the data can be processed.
The WAIT (or WAITM) macro should be issued
to check for the completion of BSC support
macros.

~I--------·--------

i

10perand

This macro is used with both physical IOCS
and logical IOCS for STR devices or for BSC
support.
The WAITM macro instruction
allows the problem program to wait on the
completion of one of several specified I/O
operations.
When the WAlTH macro is
executed, the problem proqram enters a
waiting loop until the traffic bit in. any
one of the sp~cified CCB's indicates that
the associated I/O operation is completed.
If the problem program is ~sinq physical
IOCS, "blockname" is the symbolic name of
the CCB. For STR devices an expanded CCB
is generated by the DTFSN macro.
The
blockname for a DTFSN CCB must.be
referencea in the operand field of a WAlTH
(or WAIT) macro as "dtfnameB" (where
dtfname is the symbolic name of the DTFSN).
The maximum number of blocknames that can
be specified is 17. For BSC support, the
expanded CCB is generated by the DTFBS
macro.
The blockname for a BSC CCB must be
referenced in the operand field of a WAlTH
(or WAIT) macro as "dtfnameD" (where
dtfname is the symbolic name of the DTFBS
macro).
The last operand (reg) is a general
register number (2-.1).
The address of the
associated CCB (qtfnameB) is loaded into
this register upon completion of an I/O
operation.
The WAITM macro must be issued to check
for completion of a SOPEN, READ, WRITE, or
CNTRL macro, when the problem program uses
these macros with respect to STR I/O
operations.
WAITM (or WAIT) should also be
issued to check for the completion of BSC
support macros.
CHNG Macro

The symbolic name (blockname) of the CCB
established for the I/O device is the only
operand required in this instruction. This
is also the same name as that specified in
the EXCP instruction for this device.
When
using STR macro instructicns, the symbolic
n~me (blockname) of the CCB is referred to
as "dtfnameB", where dtfname is the
symbolic name of the DTFSN macro.
When
using BSC macro instructions, the symbclic
name (blockname) of , the CCB is ~eferred to

INamelOp

Tj---------------10perand

I

I

t--

I

ICHNG ISYSnnn

i

i

'-----,

I

---t

I

.J

This macro instruction is used with both
logical and physical IOCS.
It is described
in the group included under g~sinq
Re£ords~onsecutively.

Macro Instruction statements

129

checkpoint records are written on the
system pack.

WR.ITING CHECKPOINT RECORDS
When a problem program is expected to run
for an extended period of time, provision
should be made for taking checkpoint
records periodicaliy during the run.
These
records contain the status of the job and
the system at the time records are written.
Thus, they provide a means of restarting at
some midway point rather than at the
beginning of the entire job, if processing
must. be terminated for any reason before
the normal end of job.
For example, a job
of higher priority may require immediate
processinq, or some malfunction such as a
power failure may occur, and cause such an
interruption.
If checkpoint records are written
periodically, operation can be restarted by
using the last set of checkpoint records
written previous to the interruptiqn.
Therefore the records must contain
everything needed to re-initialize the
system when processing is restarted.
Checkpoint records can be ~ritten by
issuing a CHKPT macro instruction in the
problem program.
Restarting jobs, for
which checkpoint records have been written
by use of the CHKPT macro, is performed by
the Job Control program.
Job Control is
described in the ~grammer's-Guides, as
listed on the front cover of this
pu bl ica tion.
Each time CHKPT is executed, several
records are written on-disk or tape. If
the object program is executed in a
disk-resident system, the checkpoint
records may be written in the checkpoint
area of the system disk pack or on tape.
When they are written on disk, each set of
checkpoint records replaces the previous
set so that the most recent is always
available for restarting the job. When
checkpoint ~e~ords are written on tape, an
additional set is ~ritten each time CHKPT
is executed. Thus all the sets of
checkpoint ,records for a particular run are
saved.
Each set should be identified so
that the set to be used for restarting can
be identified.
If a disk-resident system
is not used for execution of the object
program, the checkpoint records must be
written on tape. The disk/tape checkpoint
records contain information such as:
•

130

Header information: ///CHKPT//nnnnxxxx
where nnnn is information used by the
restart program, ~nd xxxx is the user's
identification (usually a, number) of
the set of checkpoint records.
Before
each set is written, this
identification should be changed by the
user. On t~e restart, this identifies
the set of checkpoint records to be
used. This record is not written when

S/360 BOS Assembler with I/O Macros

•

The contents of the general registers
are saved.
The contents of the
floating-point reqisters are not saved.

•

The contents of the Supervisor
communication region, except the first
10 bytes.

•

A table of restart information, such as
the starting point in the problem
program and the positions of the
input/output-data tapes within the
logical file.

•

The problem program and data in process
at this time.
This includes all main
storage above the supervisor, depending
on the size specified in the
configuration byte (9) of the
communication region.

•

Trailer information, when checkpoint
records are written on tape.
The
trailer is identical to the header
label.

CHKPT Macro
~

,

lOp

IOperand
lI
ICHKPTln,restart-name,SYSnnn,DISK

,

I

--j

I

I

The CHKPT (checkpoint) macro instruction
causes checkpoint records to be written.
The instructi~n requires either three or
four operands, depending on whether the
object program is to be executed in a
disk-resident system.
The firstoperang specifies the number
(n) of tape reels of input/output data that
will have to be properly posit~oned when
the j9b is restarted. The output tape used
for writing the checkpoint records must not
be included in this count. For all other
tape drives, the macro routines save bdth
the address of the symbolic unit for the
drive and the block count that has been
accumulated at the time the checkpoint
records are written. Block count-is the
number of blocks of data (physical tape
records, from gap to gap) that have been
read or written.
When the job is
restarted, the block count is used to
position the tape properly to continue with
the data yet to be processed. If the
object program does not include the
processing of any input/output data that is
recorded on tape, the comma must be entered
first in the operand field of the CHKPT
macro instruction.

The second-o£er~£
spec~fies the symbolic

(Restart-name)
name of the
problem-program statement at which
programming is to restart if an
interruption occurs and processing must be
continued at $ome later time.
The !hird~~nd specifies the symbolic
unit (SYSnnn) for the tape drive on which
the checkpoint records are to be written,
if they ar~ to be.recorded on tape rather
than disk.
When an interrupted job is
restarted, this same symbolic unit must be
specified in the Job Control RSTRT card.
If the checkpoint records are to be written
on disk, SYSRES must be specified.
When checkpoint records are written on
tape, they may be written on a separate
tape drive, or they may be interspersed
with data records in an output tape file.
When the symbolic unit (SYSnnn) is assigned
to the same driv~ used as an output file
defined by logical IOCS, checkpoint records
are written on this drive regardless of
whether an alternate drive is assigned by
the DTFSR entry ALTTAPE. The CHKPT macro
will not-write checkpoint records on the
alternate drive.
If checkpoint records are
intersperseQ with data records in an output
tape file, they can be bypassed on input by
use of the DTF SR entry CKPTREC.
When che6kpoint records are written on
7-track tape"the Data Conversion special
feature must be used.
The.!ourth·operan£ (DISK) indicates that
checkpoint records are to be taken for an
object program executed in a disk-resident
system.
Other~ise, it is omitted and the
mac+o instruction contains only three
operands.
Issuing a CH~PT macro instruction in the
problem program causes the macro-library
checkpoint routines to be ass~mbled at the
same time as the problem program •. If the
user's object program is to be executed in
a disk-resident system (DISK specified as
the fourth parameter in the CHKPT macro
instruction), the checkpoint routines must
be stored in the corE-image library on the
system-residence disk pack. They are
transferred from system residence to the
Supervisor transient area in main storage
whenever the CHKPT macro is to be executed.
If a disk-resident system is nat to be used
for execution of the object program (DISK
n21 specified in this instruction), the
checkpoint routines are assembled with ·the
user's problem.program. In either case
(disk-resident system, or no~ the CHKPT
~nstruction, if used, must be issued only
once so that the routines are assembled
only once per program assembly.

The checkpoint routines use registers 1,
It is the user's
responsibility to save the contents of
these registers if the problem proqram also
uses them.

14, and 15.

When the object program is to be
executed in a disk-resident system, issuing
the CHKPT macro instruction in the source
program causes a supervisor-call
instruction with code 1, and a statement
with the program name SYSCPT or SYSCPD, to
be assembled (see ~upervisor-Communication
Macros: . FETCH) •
During execution, the
supervisor-call interruption routine
analyzes the code and fetches the
checkpoint routines from residence to the
transient area.
When a disk-resident
system is not used for program execution,
checkpoint routines are assembled in line.
Included with the assembled checkpoint
routines (for a disk-resident system, or
not) is a table of restart information.
This table may contain such information as
the checkpoint identification, the restart
address, and information about the tape
drives used by the problem proqram. For
example, issuing a CHKPT instruction. such
as:
CHKPT
3, STHERE,SYS004
causes this table to be assembled:

SYSCHKPT

DC
DC
DC

CL4'
Y (STHERE)
3FL4'O'

(4blanks)

1
2

3

Notes:
1.

This statement provides four bytes for
the checkpoint identification. It is
the user's responsibility to move
updated identification to these four
positions before each set of checkpoint
records is written. For example, he
might move CR01 (Che~kpoint Record 1)
to SYSCHKPT for the first set, CR02 for
the second, etc.
Each time checkpoint
records are written, this is part of
the recorded table of restart
information.
Then when the job is
restarted after an interruption, the
programmer indicates which set of
checkpoint records is to be used by
specifying the identification in the
Job Control RSTRT card. The tape
containing the checkpoint records is
searched, and the identified set of
records is read from the tape.

2.

The symbolic restart-name, STHERE
(start here) in this case, is a~sembled
in this macro-library statement. If
the user wants to restart at a
different location than that specified
Macro

Instruction~Statements

131

in his macro instruction, he can move
the address of that location to
SYSCHKPT+4
3.

The DC statement defines a full word
(four bytes) constant for each
input/output data file.
In this case,
three constants are assembled because
3is specified as the first operand in
the CHKPT instruction.
These constants
provide an area to store information
for properly positioning the
input/output data tapes when the job is
restarted after an interruption.
The
first two bytes of each statement
contain the address of the symbolic
unit for the-corresponding tape drive.
The second two bytes contain the Eloc~
£Q.lli!! for the corresponding file.
Usually when logical laCS is used for a
file of records, the user does not have
to refer to these fields,
The IOCS
routines move the symbolic unit address
before the checkpoint records are
written.
They also increment the block
count (if DTFSR CHECKPT specified)
whenever a GET or PUT requires an
actual I/O operation. If the user
(instead of laCS) is supplying
information for certain files, he must
n2! use those 4-byte fields that are
specified for files maintained by
logical laCS (see DTFSR CHECKPT).

The user must supply both
the address and the block count whenever:
•

a file with nonstandard labels is
read backwards.

•

an unlabeled file is read
backwards.

•

a file is processed by physical
laCS macro instructions.

The block count that he supplies must
be relative to the beginning of the
file, regardless of whether the file is
read forw~rd or backwards.
To supply the address information,
the user can move the addresses of the
symbolic units from the Command Control
Blocks (CCB) associated with the files
(see Rroce§§~~B~co~Q§ wi!h_PhY§ical
IQCS~_~f~l.
He would have issued
three CCB's, one for each file, perhaps
as follows:
BLOCK' CCB
BLOCK2 CCB
BLOCK3 CCB
'32

SYS001,CCW'
SYS002,CCW2
SYS003,CCW3

S/360 BOS Assembler with I/O Macros

To move the addresses in this case, he
could write these statements:
MVC
MVC
MVC

SYSCHKPT+6(2) ,BLOCK1+4
SYSCHKPT+10(2) ,BLOCK2+4
SYSCHKPT+14(2),BLOCK3+4

For the block count, the user must
increment (or decrement, on a backspace
order) the count each time an EXCP
macro that results in tape movement is
executed. The instructions to add to
(or subtract from) the block count must
precede the EXCP instruction in the
user's program.
For the first file,
they might be:
LH
LA
STH
EXCP

R,SYSCHKPT+8
R, , (R)

R,SYSCHKPT+8
BLOCK1

A block count must not be supplied
in the restart table for the output
file that contains both data and
checkpoint records, however.
In this
case the tape is positioned, on
restart, at the first data record
following the set of checkpoint records
that are used for restarting.
COt1PLETION
After all the records for a logical output
file have been processed (end-of-file),
that file must be deactivated by an
instruction in the problem program to close
the file.
When the end of a logical input
file in an I/O unit other than disk or tape
is sensed, laCS immediately branches to the
user's end-of-file routine (specified by
DTFSR EOFADDR) where the instruction to
close the file can be issued.
When the end
of a disk or tape in~1 file is sensed,
IOCS checks standard trailer labels (if
any), makes provision for user-checking of
user labels, and then branches to the
user's end-of-file routine (specified by
EOFADDR) where the file may be closed.
A
CLOSE macro instruction is available to the
programmer for closing each input and
output file.
An ~-of-vol~ condition (EOV) , rather
than arr'end-of-file condition (EOF), can
occur during the processing of records in a
logical file on disk or tape.. An EOV
condition means that the processing of all
the records on one volume (disk pack or
tape reel) has been completed, but that
more records for the same logical file are
recorded on another volume.
When this
occurs, IOCS checks or writes standard
labels (if any) on the completed volume
(trailer labels) and on the next volume
(header labels), makes provision for
user-processing of user-standard labels on

both volumes, and then makes the data
records on the next volume available for
processing.
Because laCS detects the
end-of-volume condition and utilizes many
of the routines established for opening and
closing files, no problem-program
instruc~ions are required specifically for
an EOV condition.
However, if the program
requires that the processinq of tape
records on one volume be ended'before the
actual end of the volume is reached, an
end-of-volume condition can be forced.
An
FEOV (forced end-of-volume) macro
instruction is provided for this condition
in tape files.
When an EOV or FEOV condition is
detected in a logical fi~e on tape, laCS
increases the volume sequence number (in
storage) by 1.
Thus, this number is
updated for checking/writing the header
label on the next reel.
(For a description
of tape labels, see the P,roqrammer's
Guide.)
laCS also updates the active drive
number if an alternate tape drive has been
specified (see DTFSR ALTTAPE).
The specific functions that occur' on an
EOF or EOV condition for a disk or tape
file vary with the type of operation (input
or output) and with the use of file labels.
These functions are discussed in the
followinq sections.

When records in a logical input file on
disk are processed in consecutive order
(specified by DTFSR) or in sequential order
by key (specified by DTFIS), laCS detects
an end-of-fil~ condition. The end of the
input file is determi~~d either by the
ending address Qf the last extent specified
for the file in Job Control XTENT cards, or
by an end-of-file record read from. the data
file.
With sequential processing (DTFIS),
laCS immediately branches to the user's
end-of-file routine (specified by EOFADDR).
When records are p~ocessed in
consecutive order (DTFSR), the file may
contain user trailer labels. Tn this case
IOCS branches first to the user's label
routine (specified by LABADDR)' where the
user may check his trailer labels. Up to
eight trailer labels can be read and
checked. They are written on the first
track of the first extent specified for the
file on each pack. The trailer labels
follow the user header labels for the pack,
and they are identified by UTLO, UTL',
- - - UTL7.
When laCS branches to the
user's label routine, it also reads the
trailer label and makes it availabl.e to the
user for checking.
laCS sets up a label
area and supplies the address of the area
to the user in Register 1. After each
label is checked, the user returns to laCS

by use of the LBRET macro.
After all
trailer labels have been checked, laCS
branches to the user's end-of-file routine
(specified by EOFADDR).
laCS detects end-of-volume·conditions in
a disk input file:--The-ena-of a volume is
recognized when all extents on one volume
have been processed but Job Control XTENT
cards bave specified additional ext~nts on
another pack. At the end of a volume, laCS
allows the user to check his trailer labels
(if any), the same as at the end of a file.
IOCS then checks the standard header. labels
on the next volume, allows the user to
check any user header labels by branchinq
to the address specified by LABADDR~ and
makes the first record in the first extent
available for processing.
DiskOuiEut File·
When ·disk records are processed
consecutively (DTFSR) or loaded
sequentially by key (DTFIS), ~nd when all
records for the logical file have been
completed, the CLOSE instruction is issued
and normal EOF procedures are initiated
(see CLOSE Macro).
If the end of the last
extent specified for the file is reached
before CLOSE is issued, IOCS assumes an
error condition.
End-of-volume conditions in a disk
output file are detect€d in the same way as
in a disk input file.
At the end of a
volume laCS allows the user to write his
trailer labels (if any), the sam~ as at the
end Qf a file (see fLOSE~]~crol.
laCS then
writes standard header labels on the next
volume, allows the user to write any user
header labels by branching to the user's
label routine (specified by LABADDR), and
permits the processinq of output data
records to continue.
Tape Input File
When logical IOCS senses a tape mark on a
tape input file, either an end-of-file or
end-of-volumecondition exists.
The
EOF/EOV condition is determined by laCS or
by the user (depending on the type of
labels used for the file) and th~
appropriate functions are performed.
If standard labels are specified, laCS
immediately reads and checks the standard
trailer label.
If user labels are also
present and are to be checked (specified by
DTFSR LABADDR), the user's routine is then
entered for each user label that is read
(see OPEN Macro).
After all labels have
been checked, the rewind option is
executed, as specified in DTFSR REWIND.
When the standard trailer label is
checked, either an EOV or EOF condition is
Macro Instruction Statements

133

sensed.
When an EOV identifier is sensed,
IOCS switches to the alternate tape drive
(if one is specified in the DTFSR entry
ALTTAPE) after user labels have been
checked if specified.
If an alternate
drive is not specified, the operator is
notified to change the tape reels and the
system enters the wait state.
When the
operator has mounted the new reel and
pressed either the request key (on the
1052) or the interruption key (on the
consol~), proce~sing resumes.
laCS checks
the header label(s) if checking is
specified, and normal processing continues.
If an input file is processed by physical
IOCS (DTFPH specified), the user must issue
an OPEN instruction for the new reel. Then
IOCS checks the h~ader label and processing
continues.
When an EOF condition is sensed, IOCS
branches to the programmer's end-of-file
routine, specified by the DTFSR entry
EOFADDR.
If the tape input file has nonstandard
labels, IOCS immediately branches to the
user's label routine (specified by DTFSR
LABADDR) when the tape mark is sensed.
In
his Ioutine, the programmer must use
physical IOCS macro instructions to read
his label(s). Furthermore he must
determine the EOF/EOV condition and
indicate this to IOCS by loading either EF
(end-of-file) pr EV (end-of-volume) in the
two low-order bytes of Register O.
On an
EF condition, IOCS b~anches to the user~
end-of-file address (specified by DTFSR
EOFADDR) when the problem program returns
to laCS at the end of tbe label routine.
On an EV condition, laCS initiates the
end-of-vclume procedures to close the
completed volume and open the next volume
for proc essing.
If a tape file is not labeled (DTFSR
Flt,ABL=NO) or containslabels that are not
to be checked (DTFSR FILABL=NSTD), laCS
branches to the end-of-file address when
the tape mark following the last data
record is sensed.
If an end-of-volume
condition exists instead of an-efld-of-file
condition, the user may indicate this by
issuing an FEOV macro instruction in his
end-of-file routine.
If an alternate tape
drive is specified by the DTFSR entry
ALTTAPE, laCS switches to the alternate
drive and processing resumes.
If an
alternate tape drive is not specified, the
operator is notified to change the tape
reels, and the system enters the wait
state.
When the new tape reel ha~ been
mounted, the operator must press either the
request key on the 1052 or the interruption
key on the console to resume processing.
Whenever an input tape is read backwards
(BACK specified in DTFSR READ), an
134

S/360 BOS Assembler with I/O Macros

end-of-file condition always exists when
the file header label is reached. That is,
backwards reading is confined to one
volume.
Therefore, with standard labels,
the input/output routines check only the
block count, which was stored from the
trailer label, and then branch to the
specified end-of-file routine.
When
physical laCS macros are used to read
records backwards, labels cannot be checked
(DTFPH must not be specified).
For tape
files with nonstandard labels, laCS
branches to the-UserlS~el-routine
specified by DTFSR LABADDR where he may
check the header label. He must use
physical laCS macro instructions to read
the label(s) for checking.

When an end-of-reel reflective marker is
sensed on an output tape, logical laCS
prepares for closing the file by ensuring
that all records have been written on the
tape.· If the programmer issues another
PUT, indicating that more records are to be
written on this output file, normal
end-of-volume (EOV) procedures are
init~ated.
If the programmer issues a
CLOSE, the EOF procedures are initiated.
The programmer should be aware that,
under certain conditions, a truncated block
of records may be written at an EOV or EOF
condition, even though the file is defined
as having fixed-length blocked records.
When this file is used for input, the
System/360 logical IOCS will recognize and
handle these short blocks without the
programmer being concerned or aware of this
condi tion.
Labeling procedures for the EOV
condition closely follow those described
under CLOSE Macro.
The label is coded EOV
rather than EOF, and only one tape mark is
written after the label set, or after the
data if standard labels are not used.
Forced End-of-Volume:

~e

Files

In some cases a programmer may need to
force an end-of-volume condition at a point
other than the normal tape mark (input) or
reflective marker (output). He may want to
discontinue reading or writing the records
on the present volume, and continue with
those records for this same logical file
that are recorded on the next volume. This
may be necessary because of some major
change in the category of records or in the
processing requirements.
An FEOV (forced
end-of-volume) macro instruction is
available to the programmer for this
function.

I

lOp

I

ICLOSE
ICt;,OSE

I

Operand

I
---I
I

filename
filename1,filename2,filename3,---1
I

The_CLOSE instruction is used to deactivate
any file that was previously opened in any
input/output· unit in the system: card
reader, card punch, magnetic tape unit,
disk drive, paper tape reader, printer,
optical roll· reader, or display unit. The
symbolic name of the logical file, assigned
in the DTFSR, DTFDA, DTFIS, or DTFPH header
entry, is required in this instruction. As
many as 16 files ~ay be closed by one
instruction, by entering additional
filename para~.ters.
CLOSE is required
whenever logical IOCS macro instructions
are used to transfer data.
When physical
IOCS is used, CLOSE i~ required only if
standard labels on magnetic tape are to be
written.
A file may b~ closed at any time
by issuing this macro instruction.
ReQEeninq a Closed File:
If further
processing of a. closed file is required at
some later time in the program, the file
must be opened again. If a· file of ~is~
~£2~·is reopened after a CLOSE, the
label precessing and extents made available
depend on the type of processing that is
specified for the file.
When an input file
is processed in consecutive order (DTFSR
specified), IOCS checks the label(s) on the
first p~ck and makes the first extent
available, the same as at the original
OPEN. When a file is processed by physical
IOCS with SINGLE specified in DTFPH MOUNTD,
Ioes opens the next extent speci~ied by the
user's XTENT cards.~ When a file is
processed by the direct access method
(DTFDA specified), by the indexed
sequential system (DTFIS specified), or by
physical IOCS with ALL specified in DTFPH
MOUNTP. all label processing is repeated
and all extents are again made available.
If a file of tape. records is closed, the
tape is positione in accordance with the
REWIND specification. Therefore to resume
processing of tape records at the point
where CLOSE occurred, NORWD.should be
specified in DTFSR REWIND.
When OPEN is
issued later for additional records on that
reel, the first record read must be a file
la~ if standard labels are specified~or
the tape file beinq opened. If the tape
file being opened is unlabeled or contains
non$tandard labels, it is the user's
responsibility to identify the first record
read as a data record or a file label.
When a file beinq reopened is a multireel
file with standard labels, IOCS expects
that the reel available for the OPEN is the

same reel, on the same drive, that was in
process when CLOSE was executed.
If not, a
messaqe is issued.
In addition to the reqisters used by
logical IOCS, CLOSE also uses reqister 5.
The programmer may use register 5 because
the CLOSE macro routine saves and restores
this register.
However, if the programmer
plans to use register 5 as a base register,
he should be aware that register 5 is
dropped at the end of the CLOSE routine.
Disk Files
When disk records are processed in random
order (specified by DTFDA or DTFIS), the
CLOSE instruction is issued in the problem
program to deactivate the file after all
records have been processed.
When records in a disk input file are
processed in consecutive order (DTFSR) or
in sequential order (DTFIS), the CLOSE
instruction is generally issued in the
user's end-of-file routine (specified by
EOFADDR) to deactivate the file.
IOCS
branches to. this routine when it detects an
end-of-file condition (see Completion).
When· records .in a disk· ou.i,put are
processed in consecutive order (DTFSR) or
loaded in sequential order (DTFIS), the
CLOSE instruction is issued after all
records for the file have been processed.
It writes any record, or block of records,
that has not already been written.
If a
record block is partially filled, it is
truncated; that is, a short block is
written on disk.
CLOSE causes one o~ more
functions to be performed before it
deactivates the file.
It always writes an
end-of-file trailer record after the last
data record in the file~
If records are
processed in consecutive order, user
trailer labels may be written if the DTFSR
entry LABADDR is included in the file
definition.
Up to eight trailer. labels can be
written on the first track of the first
extent specified for the file on Each pack.
They fo~low the user-standard header labels
for the pack and are identified by UTLO,
UTL1,---UTL7.
For this operation, IOCS
branches to the user's label routine, sets
up a label area, and supplies the address
of the area in Register 1. In his routine
the user constructs the trailer label and
then returns control to IOCS by use of the
LBRET macro.
IOCS then writes the trailer
label. Similar to writing user header
labels, these steps are repeated until
eight trailer labels have been written or
until the user indicates that he does not
require any more labels, whichever occurs
first (see OPEN·Macro: Disk output-File.
Writing Additional user-St~ndard Header·
Macro Instruction Statements

135

Labels). After the last trailer label is
written, CLOSE d.eactivates the file.

records.
Only data records are counted.
Similarly if physical laCS is used, the
problem program must omit checkpoint
records and count only data records.

When an input file recorded on magnetic
tape is processed, CLOSE is generally
issued in the user's end-of-file routine.
It initiates rewind procedures for, the tape
as specified in the DTFSR entry REWIND. It
then deactivates the file.

If user-standard labels (UTL) are to
follow the standard trailer, the CLOSE
routine branches to the user's routine
(identified by DTFSR or DTFPH LABADDR)
after the standard label has been written.
Upon entry to the user's routine, laCS
supplies Code F in the low-order byte of
Register 0 to indicate that an end-of-file
trailer label should be built (see ~TF5R
LA]A~DR).
In his routine the programmer
can build a maximum of eight user-standard
labels, which the CLOSE routine writes for
him.
After building each user-standard
label, he must return to the CLOSE routine
by use of the LBRET macro.

If CLOSE is issued for any tape input
file before the end of the data is reached,
the tape is rewound as specified by the
DTFSR entry REWIND, and the file is
deactivated.
No labels are read or
checked.
Tape out.E.!!!Jile
For a magnetic tape output fiie, CLOSE is
issued when all records for the file have
been processed. It writes any record, or
block of records, that has not already been
written.
If a record block is partially
filled, it is truncated; that is, a short
block is written on the tape.
Following
the last record, a tape mark is written.
If labels are not specified, a second tape
mark is written and the tape is rewound as
specified in DTFSR REWIND.
When standa£d lab~l~ are specified (STD
in DTFSR FILABL or OUTPUT in DTFPH
TYPEFLE) , CLOSE causes the file trailer
label to be completely written after the
tape mark.
The EOF' indication, the block
count accumulated during the run, and the
header-label information (with HDR1
replaced by EOF1) are included in the
trailer label.
IOCS accumulates the block count for the
trailer label whenever logical IOCS (DTFSR)
is used for an output file.
When physical
IOCS (DTFPH) is used. however, the problem
program must accumulate the block count, if
desired, and supply it to IOCS for
inclusion in the standard trailer label.
For this, the count (in binary form) must
be moved to the 4-byte field that is
labeled fllen~. For example, if
fil~n~~ specified in the DTFPH header
entry is DETLOUT, the block count field is
addressed by DETLOUTB; if filename-is DETL,
the field is addressed by DETLB.
The user
must define this address as an address
constant.
If checkpoint rec~£g§are interspersed
with data records on an output tape, the
block count accumulated by logical IOCS
does not include a count of the checkpoint

136

S/360 BOS Assembler with I/O Macros

After all trailer labels are written,
the CLOSE routines write two tape marks,
execute the rewind option, and deactivate
the file.
For the proper procedures to handle
user-standard labels and/or nonstandard
labels, see OPEN_Ma~±Q~ l~£e output File.

When the last paper tape or card input
record has been read, IOCS branches to the
user's end-of-file routine where CLOSE is
generally issued.
When a printer or card output file is
completed, CLOSE must be issued for that
file.
Any record in the output area that
has not been printed, ~isplayed, or punched
is transferred to the output file before
the file is deactivated.
For a discussion of the SCLOS macro, for
the STR adapter, see Processing with 5TR
Devices.
For a discussion of the BCLOS
macrO;-for the BSC adapter, see Binary
~.!!ch.£Q!!.Q!!s Communicatl,Q.n.
LBRET Macro

r---.--,--------r.--IName
Op
I Operand

I
I

I

--,

,I

I
LERETI 1
LBRETI 2

The LBRET (label return) macro instruction
is issued at the end of the user's label
routine to return to IOCS.
This macro is
described under InitiaJiza1io~~ET
Macr~.

I

______________--JI

FEOV Macro:

Tape Records

r--~------~----

,Name,

Op

j

,

I

,FEOV

Operand

specified.
When the new volume is mounted
and ready for writing, IOCS writes the
standard neader label and additional
user-standard header labels, if any.

filename

The FEOV (forced end-of-volume) macro
instruction is used for either input or
output files on tape to force an
end-of-volume condition when neither a tape
mark nor a reflective marker has been
sensed. This indicates that processing of
records on one volume is considered
finished, but that more records for the
same logical file are to be read frcm or
written on the following vclume.
The FEOV macro cannot be issued in the
user's EOF routine when the FEOV refers to
the same file that caused entry to the EOF
routine, except for an unlabeled file or
for a nonstandard labeled file with no user
label address specified.
The symbolic name of the file, specified
in the DTFSR or DTFPH header entry, is the
only parameter required in this
instruction.
When 10gi£~QCS macro instructions are
used for a file (DTFSR specified), FEOV
initiates the same functions th~t occur at
a normal end-of-volume condition, except
trailer-label checking.
For an inpu1 tape,
it immediately rewinds the tape as
specified by'DTFSR REWIND and provides for
a volume change as specified by DTFSR
ALTTAPE.
Trailer labels are not checked.
FEOV the n checks the stan.dard header label
on the new volume, and provides for
user-checking of any additional
user-standard header labels if DTFSR
LABADDR is specified. If nonstandard
labels are specified (DTFSR FILABL=NSTD),
FEOV provides for user-checking if desired.
For an output tape, FEOV writes the last
block of records if necessary (this may be
a short block) and writes a tape mark.
Then it writes the standard trailer label
and additional user-standard labels (if
any), writes one tape mark, provides for a
volume change, and writes the file header
label(s) on the ne~ volume, as specified in
the DTFSR entries REWIND, ALTTAPE, FILABL,
and LABADDR.
If nonstandard labels are
specified, FEOV proviaes for user-~riting
of trailer labels (completed volume) and
header labels (new volume), if desired.
When ~sic~l IOC2 macro instructions
are used and DTFPH is specified for
standard label processing, FEOV may be
issued for an E~1B~1 file only.
In this
case FEOV writes the standard trailer
label, and any additional user-standard
trailer labels if DTFPH LABADDR is

FILE DEFINITION MACROS
Whenever logical IOCS macro instructions
(GET, PUT, READ, WRITE, etc) are used in a
program to control the input/output of
records in a file, that file must be
defined by.a declarative macro instruction.
The parameters of the macro instruction are
punched in a set of entry cards.
Each
parameter uses the keyword for-mat (see
Ma£ro-1n§~i~Qn FQrm~~
In addition to
describing the file, the parameter entry
cards indicate the type of processing for
the file, and specify symbolic names of
main-storage areas and routines used by the
file.
When physical IOCS macro instructions
(EXCP, WAIT, etc) are used for a file, a
declarative macro instruction is required
only if disk or tape files with standard
labels a~e to be processed.
No other files
require definition.
The file definition macros for all files
in a problem program must be assembled with
that problem program. The logical IOCS
routines that the problem program will
require during its execution are assembled
from the specifications in the file
definitions.
A separate set of parameter
entry cards is included for the definition
of each logical file, and the sets may be
placed in any order.
If the problem
program is to be executed in a
disk-resident system, a beqin-definition
card (DTFBG macro statement) must precede
the first set of file definition cards. In
all cases, regardless of where the program
will be executed, an end-of-definition
card(DTFEN macru statement) must follow the
last set.
At program assembly time, the
entire group of file definition cards
(punched in assembler-card format) is
placed in the card deck immediately after
the START card and ahead of any of the
user's source program.
The user's source
program starts after the end-of-definition
card (DTE'EN).
Five different file-definition
declarative macros (DTFSR, DTFDA, DTFRF,
DTFSN, and DTFIS) are available for
defining files processed by logical IOCS,
and one macro (DTFPH) for files processed
by physical IOCS.
For logical IOCS
operations, the file-definition macro to
use for a file depends on the type of
processing that will be performed for that
file:
Macro Instruction Statements

137

Consecuti ve - process~nq. This applies to
input/output files in serial devices, or on
231' disk when records are processed
consecutively.
The DTFSR (Define The File
in a Serial-type device) macro is used~
Direct Access Method.
Whenever a
logical disk file is to be processed
randomly, the direct-access-method macro
DTFDA is used.
Indexed sequentia~tem. When a
logical disk file is to be organized or
processed by the indexed segueniial file
management system (ISFMS), the DTFIS macro
is used.
grocessin,SL.with STR·· dEvices.
Where STR
devices are us€d, the adapter must be
defined by the macro, DTFSN. Binary Synchronous Communication.
Where
BSC support m~cros are-to be used, the data
adapter (SDA I~ must be ~efined by the
DTFBS macro.
The first card of
macro instruction is
and the continuation
de!~il~nt~ cards.
punched with:
•

a file-definition
called a header card,
cards ar~ called
The header card is

Tha symbolic name of the file in the
name-field. This is the name that must
be specified in any logical IOCS macro
instructions that refer to this file in
the user's program. The symbolic file
name maybe up to sevencharaGters long
in a DTFSR, DTFDA, or DTFPH macro
heade~ card.
In a DTFIS macro header
card, the name may be up to five
characters lonq.
---DTFIS filenames should be unique to
each other if the program phases are to
be stored permanently in the core image
library.
This will prevent one phase
from beinq overlaid by another with the
same filename.
(For further
information on the core_ image library,
see the Pr£qrammer'sGuide-listed on
the frent cover of this publica~ion.)

•

The macro mnem6nic operation code in
the ~erationfield.
This is DTFSR,
DTFDA, DTF-IS, or DTFPH, depending on
the type of processing to be performed
for the file.

•

Keyword entries in the operand field,
if desired.

•

A contin ua tion punch in colum-n 7-2, if
detail cards are necessary.

The detail cards follow the header card,
and they may be arranged in any order.

138

S/360 BOS Assembler with I/O Macros

Each detail card is blank in the name and
operation fields and is punched with one or
more operands. These operands must be the
keyword typ~ of macro parameter. That is,
they are expressed as equal-conditions, for
example, DEVICE=DISK1'.
All detail cards
except the final ODe used must be punched
with a comma immediately following the last
operand and with a continuation punch in
column 72. They may contain comments if a
space is left after the comma following the
last operand. The final card may contain
comments if a space is left after the last
operand.
When a particular detail entry
does not apply to a file, that operand must
be omitted.
The be~n-defini tio.n -card preceding the
first set of DTF cards (when a
disk-resident sy~iem will be used for
program execution) must be punched with
DTFBG in the operation field and DISK in
the operand field.
The name field is
blank.
The end-of-definition card followinq the
last set of DTF cards must be punched with
DTFEN in the operation field.
The name
field is blank. The operand field may be
blank, or i{ may be punched with one
operand if the object program is not to be
executed in a disk system.
In this case
the operand OVLAY may be specified to
reduce the amount of main storaqe used for
the program. When the object proqram is
executed (in a system that does not utilize
a disk-resident supervisor), OVLAY causes
the OPEN routine to be overlaid by the
user's problem program, and the CLOSE
routine to overlay the user's program. All
files should be opened by one OPEN macro
instruction, and ~ll files should be closed:
by one CLOSE macro instruction. In this
case, CLOSE should be the last instruction
before EOJ in the user's proqram.
The reference-card, with DTFRF in the
operation field, must precede the first
DTFSN card for STR processing or the first
DTFBS card for BSC processing.
Where other
DTF ~acros are present, DTFRF must follow
the DTFEN card.
The detail parameter entries for each of
the four-declarative macros are described
in the following paqes. They are qrouped
by type of processing.

CONSECUTivE PROCESSING (DTFSm
The following lists show the DTFSR detail
entries that apply to each type of file
when records are processed consecutively.
These entries are explained in the
following text and shown in Figure 35.

2311
Driyg

Di§~

BLKSIZE
CONTROL
DEVICE
EOFADDR
ERROPT
IOAREA'
IOAREA2
IOREG
LABADDR
RECFORM
RECSIZE
TRUNCS
TYPEFLE
UPDATE
VARBLD
VERIFY
WLRERR
WORKA

1403
1404
'443
1445
~inte£

BLKSIZE
CONTROL
CTLCHR
DEVADDR
DEVICE
IOAREA1
IOAREA2
IOREG
PRINTOV
RECFORM
RECSIZE
TYPEFLE
UCS
WORKA

24('0
T a P.~L]!!l:!

1442
2501
2520
2540

ALTTAPE=SYSnnn
1442
2520
2540

Reag~£

.RJ!1l£.h

ALTTAPE
BLKSIZE
CHECKPT
CKPTREC
CONTROL
DEVADDR
DEVICE
EOFADDR
ERROPT
FILABL
IOAREA1
IOAREA2
IOREG
LABADDR
READ
RECFORM
RECSIZE
REWIND
TPMARK
TYPEFLE
VARBLD
WLRERR
WORKA

BLKSIZE
CONTROL
DEVADDR
DEVICE
EOFADDR
INAREA
INBLKSZ
IOAREA1
IOAREA2
IOREG
OUAREA
OUBLKSZ

BLKSIZE
CONTROL
CRDERR
CTLCHR
DEVADDR
DEVICE
IOAREA1
IOAREA2
IOREG
RECFORM
RECSIZE
TYPEFLE
WORKA

'052
Printerf{eyboard

1285/1287
Optical
Reade£

BLKSIZE
DEVADDR
DEVICE
IOAREA1
IOREG
RECFORM
RECSIZE
TYPEFLE
WORKA

BLKSIZE
CONTROL
COREXIT
DEVADDR
DEVICE
EOFADDR
HEADER
IO}.REA 1
IOAREA2
OFFLINE
IOREG
RECFORM
RECSIZE
TYPEFLE
WORKA

R~CFORI1

TYPEFLE
WORKA

2671
Paper
Tape
Reade!:

This entry specifies the symbolic unit
(SYSnnn) for a tape drive that will be used
as an alternate when a tape file has two or
more reels (volumes) of data.
The actual drive is assigned to this
symbolic unit either at job-execution
Uoad) time by the Job Control ASSGN card,
or at system-generation time by the SYMUN
macro instruction.
The symbolic unit for the first· drive
used for this file is specified in the
DTFSR entry DEVADDR=SYSnnn.
If DEVADDR is
assigned to the same unit used for writing
out checkpoint records, the user should be
aware that checkpoint records may not be
written on the alternate tape drive.
(See
the section CHKPT Macro.)
Whenever an alternate drive is specified
and an end-of-volume condition (EOV, EV, or
FEOV) ~ccurs for a multi-reel file, the
IOCS OPEN/CLOSE routines update the number
of the drive actively in Qse.
Thus, after
an EOV (or FEOV) on reel 1, 3, 5, etc.,
IOCS expects the next reel to be mounted on
the device assigned to ALTTAPE.
After an
EOV (or FEOV) on reel 2, 4, 6, etc., IOCS
expects the next reel to be mounted on the
device assigned to DEVADDR.

BLKSIZE
DEVADDR
DEVICE
EOFADDR
IOAREA1
IOAREA2
IOREG
RECFORM
RECSIZE
TRANS
TYPEFLE
WORKA

Macro Instruction statements

139

APPLIES TO

NAME

OPERATION

u
~

OPERAND'

~

0;
0

Z .....
04:Z

::E::>

~

11')0::

~w
_0

~;1j

0

~

~I/'I:c

-...... .....
-.rZ
~o;

-.r
II')

~o::
~w

,
ffi

..... 0

Z""
-4:
~Q

0::

ffi~

c..;1j
;1;0::

ow. ~o::
NO S~ ~~ "'>"c...
=?ii
~w -04:
~~
M ",0
N .....
:!iG :!~ ~~ -:..!
"' .....
Filenam!

DTFSRt

X
AL TT APE=SYSnnn
BLKSIZE91

X

X

X

X

X

X

X
X

CKPTREC=YES

X
X

X

X

X

X

X

X

X

X

X

CRDERR=RETRY

X

CTLCHR=YES

X

X

X

X

tDEVADDR=SYSnnn

X
X

X

4:

004:

X

X

c..""

Ow

1/'10

~~

-x-

CONSOLE
PTAPERO- READB5- -READB7T - READa70-- f - - -

X

X

X

X

X

X

ERROPT=IGNORE

X

X

Multi-Valume File Using Two Tape
Drives

Symbolic Unit for Alternate Tape
Drive.

Each File Except Combined File
with Separate I/O Areas

Length of I/o Area.
n = Maximum Number af Characters.

X

X

Applies to Input File Only.

X

Does Not Apply to 2501 •
CTLCHR Must Be Omitted.

X

For Correction Routines

Symbolic Name of Correction Routine

Punch Again on Error Condition

Applies to 2520 and 2540.

Logical Records Have Control
Character in First Position

Each Record Must Contain a Control
Character.
CONTROL Must Be Omitted and the
CNTRL Macro Must Nat Be Used for
This File

Each File Except Disk

Symbolic Unit far the I/O Device Used
for the File •

X

--- ,...- -

-- ----

-X-

X

X

X

X

..!~~ In.p~79~tp~!...FJ.I~ _____
_2~.o!. !!)~tJ..!.I~ __________
~5JQ !n.P~/q,u.!P~!...F.!!e_______
_2~4Q !n.p~70.!'!p~t ..f~~ ______
_! ~_I!!R.u!19!!..tp_u!. FlI~ _____
J ~03...! J 19irJ~4~,_1 ¥~ 9~e.u!. _
J9~2 J~I:~!lOfi!P~!... _______
_2E?I_lnp!!..t £i_e __________
!}~ !n'puJ' .f1.!e__________
_!.2i!~!a~Ln~u! _____
1287 Document Input

Symbolic Name of End-of-File Routine

Process Error Records

Applies Only to Disk or Tape Input.
Prevents Job Termination on Error
Condition. Enter Desired Specification after ERROPT=.

User Routine for Error Records

X

Nsf6- --NO-----

Check or Write Standard Labels
File Contains -Nonstancfa~cfLab;I$- OnlabelTed i'ile- - - - - - - - - - -

HEADER=YES

X

X

Include for Each File, and Specify
Proper Name after DEVICE=.

Input File

}~ii.o!~r}i~r-~~ci.r~ ~ =-= ~ ~_-_-

FI LABL=STD

140

Header Card.
Specify Symbolic File Name.

Bypass Checkpoint Records on Input

Name----

Figure 35.

Each File

C NTRL Macro Used

--~
X --

X

REMARKS*

~~

)I~ --~---}<~- -X- --- ----- r- -- -'1:- - -- - -- - --X-- ----- --- - -- --

EOFADDR=Name

MUST BE INCLUDED

..Q~ J~~/Q.u.!p~tJ:!.!e______

-x- - ----

X
- -- - -- y-X-

IRI~[(~_

sKip - - --

-'

u

i=
c..o::
Ow
,,0
004:

CHKPT Macro Used

COREXIT=Name

DEVICE=DISKII
TAPE- - - READoC -READ20--REA040- -READ42- - -

4:

U
j::

X

CHECKPT91

CONTROL=YES

X

~w

-'

Include for Tape Input/Output and
Specify Desired Operation after
FILABL=.

Header record wi II be
read by Open

If this entry is omitted, OPEN
assumes no header record

INAREA=Name

X

Separate Areas for Input and Output
for a Combined File

Applies Only to 1442.

INBLKSZ91

X

Separate Areas for Input and Output
for a Combined File

Applies Only to 1442.
Length of INAREA.

IOAREA1=Name

X

X

X

X

X

IOAREA2=Name

X

X

X

X

X

10REG91

X

X

X

X

X

LABADDR=Name

X

X

X

X

DTFSR Entries (Part 1 of 2)

S/360 BOS Assembler with I/O Macros

X

X

X

Each File Except Combined File
with Se.parate I/o Areas

Symbolic Names of Input/Output
Area. Same as Used in DS.

X

X

X

Two I/O Areas Used. Not Valid
if DEVICE=READ87D

Symbolic Name of Second Input/Output Area. Same as Used in DS.

X

X

X

Process Blocked Records in I/o
Areas; Process, in the Input Area,
Variable-Length Records Read '
Backwards; Process in Two I/O
Areas; or Process Undefined Records
On 1285

n = Number of General Purpose
Register 2-11. Omit WORKA=YES.

Check/Build Additional UserStandard Labels, or Process
Nonstandard Labels

Symbolic Name of User's Label
Routine.

APPLIES TO

u
NAME

OPERATION

;:::

OPERAND'

>
0;;
0

Z
~!::
~5

8~

~

~~
~O

0=
~=

 C>- 0«
~Z Z~
N
02
lOw 1.O:c "
~c...

8~

"OW
~~

....

MUST BE INCLUDED

«

~

~w

~w

1.0

0

"c... co «
-0« NW
N I- -~
I

. Labelled Disk/Tape File

Symbolic File Name

X

Labelled Tape File

Symbolic Unit for the
Device Used for the
File.

X

Check/Build Additional UserStandard Labels

Symbolic Name of
User's Label Routine.
For Tape Input and Disk
Files, Applies to Header
Labels Only.

Each Disk File

All Extents Are to Be
Available at the Initial
-OPEN.
--- - Only the First Extent
Is to Be Available at
the Initial OPEN.

--

-SINGLE

Figure 46.

REMARKS

U

w O
c...« i=
«W c...~
c...~ .ow

TYPEFLE=I NPUT
---OUTPUT

X

XTNTXIT=Name

X

X

~c:..be!!e~ D~I{T~~I~p~ ~i.!:_
Labelled Disk/Tape Output File
Symbolic Name of
User's Extent Routine.

DTFPH Entries

PHYSICAL IOCS (DTFPH)
When physical Ioes macro instructions
(EXCP, WAIT, etc) are used in a program,
only disk or tape files -with standarg
labels need to be defined by DTFPH entries
(DTF~Or a file handled by EhYsical IOeS).
No other files req~ire definition.
If a disk or tape file with standard
volume and file labels is process~d, a
DTFPH header card and five detail cards may
be u~ed (Figure 46)~
This 6-card set
indicates to IOCS that labels are to be
read and checked (on input) or written (on
output).
The header card is punched with
DTFPH in the operation field, the symbolic
name of the file in the name field, blank
in the operand field, and a continuation
punch in column 72. The symbolic name may
be seven characters long.
The keyword parameters may be specified
in one or more detail cards (see File
Definition Macros: .bQgical·· IOCS):-Or in
the header card if desired. Specifying the
parameters in the header card eliminates

the need for the detail card(s) and the
continuation punch in the header card.
DEVADDR=SYSnnn
This entry specifies the symbolic unit
(SYSnnn) to be associated with this loqical
file.
The symbolic unit ~~Bre~~nts-an
actual IIO device address.
The symbolic
unit may be:
SYSIPT for main system input device
SYSOPT for main system output device
SYSOOO-SYS254 for other devices in the
system
The symbolic unit (SYSnnn) is used in
the Job Control ASSGN card (or in the
Supervisor-Assembly macro SYMUN) to assign
the actual IIO device address to this file.
If the ASSGN card is used to assiqn the
device for program execution, the file of
records can be read from or written on
different units at different times. For
Macro Instruction Statements

171

example, a reel of tape may be mounted on
any tape drive that is available at the
time the job is ready, to he run, by merely
as§.!.9nin.,g t'h at drive to the sy mbolic unit.

At the end of his label routine, the
programmer must return to laCS by use of
the LBRET macro.
MOUNTD=

LA BA DD R= Name
The 'user may require one or more disk, or
tape~ labels in addition to the standard
file labels.
If so, he must include his
own routine to check (on input) or build
(on output) his label (s).
He specifies the
symbol~c name of his routin~ in this entry,
. and, IOCS branches to his routine after the
standard label has been processed.

This entry must be included for a disk file
to specify how many extents (disk areas)
for the file are to be made available for
processing when the fil~ is initially
opened.
One of the. following
specifications is entered after the = sign:
ALL

if all extents on ali packs
are to be available for
processing.
When the file is
opened, laCS checks all labels
on all packs and makes
available all extents
specified by the user's
control cards. only one OPEN
is required for the file.
ALL
should be specified whenever
the user plans to process
records in a manner similar to
that performed by the direct
access method or the indexed
sequential system.

SINGLE

if only the first extent on
the first pack is to be
available for processing.
laCS checks the labels on the
fiist pack arid makes the first
extent specified by the user's
control cards available for
ptocessing. The user must
keep track of the extents and
issue a subsequent OPEN
whenever another extent is
required for processing. On
each OPEN after the first,
laCS makes available the next
extent specified by the
control cards. SINGLE should
be specified when the user
plans to process records in
consecutive order.

LABADDR may be includ~d to specify a
user routine for header or trailer labels
as follows:
•

Disk input or output file:
labels only

•

Tape input file:

•

Tape output file:
labels

'header

header labels only
header and trailer

Thus, if LABADDR is specified for the file,
user-standard header·labels can be
processed for an input/output disk or tape
file, and user-standard trailer labels can
be built for a tape output file.
Similar
to the functions performed by logical laCS,
physical laCS reads input labels and makes
them available to the user for checking,
and writes output labels after they are
buil t.
LABADDR allows one user's label routine
to be specified for all types of labels for
the file: header labels, end-of-file
labels, and end-of-volume labels. On an
input file, the user can determine the type
of label that has been read by the
identification in the label itself.
For an
output tape file, however, laCS indicates
to the user the type of label that is to be
written.
For this, laCS supplies a code in
the low-order byte of R~gister 0, as
follows:

When the user issues a
CLOSE for an output file, the
pack on which he is currently
writing records will be
indicated, in the file label,
as the last volume for this
file.

0 - Header label

(letter 0)
F - End-of-file label
V - End-of-volume label

In his routine the user can test this byte
and then build the appropriate type of
label.
Logical IOCS uses general registers 14
and 15 for linkage to and from a called
routine; therefore, these registers must
not be destroyed. If they are required by
the user's label routine, they must first
be saved and then restored prior to
returning to the mainline of the program.
172

S/360 BaS Assembler with I/O Macros

This entry must n2! be included for a tape
file.
TYPEFLE=
This entry must be included to specify the
type of file (input or output). One
specification or the other is entered
immediately after the = sign:

INPUT for a disk or tape input file
OUTPUT for a disk or tape output file

XTNTXIT=Name
This entry is included if the programmer
wants to process XTENT card infoImation.
It specifies the symbolic name of the
user's extent routine.
Whenever XTNTXIT is included, TOCS
branches to the user's routine during an
OPEN for the fil~.
If the DTFPH entry
MOUNTD=ALL is also specified for the file,
IOCS branches during the initial OPEN. It
branches after each specified extent has
been completely checking and after
conflicts, if any, have been resolved.
If
MOUNTD=SINGLE is specified for the file,
IOCS branches to the user's routine
whenever an indiv~dual extent is ·opened.
This includes both the initial OPEN for the
first extent and each succeeding OPEN for
additional extents.
It branches after
checking the extent.
Upon entry to the user's routine, IOCS
stores in Register 1 the address of an
12-byte area from which the user can
retrieve extent card information (in binary
form).
This area contains:

0-1

symbolic unit (hexadecimal
representation of SYSnnn)
SYSRES
SYSRDR
SYSLST
SYSIPT
SYSOPT
SYSLOG
SYSOOO
SYS001
etc.

0000
0004
0008
OOOC
0010
0014
0018
001C

2

Extent type code (as specified
in the XTENT card)

3

Extent sequence number (as
specified in the XTENT card)

4 - 7

Lower limit of the extent
(track address -CCHH)

8 -

Upper limit of the extent
(track address - CCHH)

"

Also upon entry to the user's extent
routine, IOCS stores a return address in
Register 14. Th~refore at the end of his
routine the user must branch to this
address to continue processing.

SUPERVISOR-COMMUNICATION MACROS
Durinq problem proqram execution a
Supervisor is located in lower main storaqe
, and provides over-all control of
operations. The functions performed by the
Supervisor are interruption handlinq, I/O
requests, and program retrieval.
The
interruptions handled by the Supervisor
result f~om five basic types of conditions:
Input/Output

Conditions in the channel
and/or I/O devices, such
as the completion of an
I/O operation.

Program Check

Improper spe~ification or
use of instructions and
data.

Machine Check

Machine malfunction.

External Siqnal

Siqnal from interruption
key (operator) or timer.

Supervisor Call

Execution of a Supervisor
Call instruction to make
use of a Supervisor
function or to convey a
message from the calling
proqram to the
Supervisor.

The Supervisor also contains a
that can be used for
storing information useful to several
problem programs or between problem
programs.

communicationr~giQn

The region provides for:

•

A user area for inter- or intra-proqram
communication.

•

Address of user-supplied routines for
program check, ti~er interruption, and
operator communication to the problem
proqram.

•

End-of-Supervisor address.

•

User program switches.

•

Machine configuration.

•

Date.

•

Job name.

Several macro instructions are available
to the programmer to enable him to
communicate with the Supervisor.
Thus he
can utilize the functions performed by the
Supervisor or have access to the
communication region in the Supervisor. To
make use of the Supervisor functions
requires switchinq from problem state to
Supervisor state.
Therefore the macros
Macro Instruction Statements

173

used for this purpose generate a Supervisor
Call (siC) instruction and a specific code
to indicate the desired routine. These
macros are:

i

IName
I

EXCP

Execute channel program.

FETCH

Load a proqram or a program
phase.

EXIT

Return from the timer or
operator-communication routine
to the problem program main
line.

MSG

Transmit a message from the
problem program to the
operator via the Supervisor.

COMRG

To obtain the address of the
communication region.

MVCOM

to move information to the
communication region for
modifying any portion of it.

STXIT

To place the address of a
user's interrupticn routine in
the comm~nication region, or
to change an interruption
.option.

Two other macro .instructions are
provided:
Informs the Supervisor that
the problem program has
reached an end-of-job
dondition and that a storage
print-out is desired.

EOJ

(End of job). Informs the
Supervisor that the problem
program has been completed.

I Operand
I

FETCHI name

,_ _ _ _ _ _ _.J

The FETCH macro instruction is issued
whenever the program requires that another
phase of the program, or a different
program, be loaded for execution. The name
of the phase or program is specified in the
operand field, and it may be 1-6 characters
long.
Execution: -Disk-Resident .- System

The macros that provide access to the
communication region are:

DUMP

I

Op

When the FETCH macro instruction is
executed in ~ disk~resident system, control
is turned over to "the System ~oader
(program-fetch routine), which is one of
the Supervisor routines. The System Loader
then retrieves the specified program phase,
program routine, or separate program, from
the core image librarY,and loads it into
main storage. The ,System Loader determines
the proper phase (or program) to be
retrieved by matching the name speCified in
the operand of the FETCH macro with the
names in the directories of the core image
library. After the phase is loaded, .
control is transferred to it at the address
originally specified when the phase was
stored in the core image library. If the
phase requested cannot be found, a program
check occurs (see Program-Check).
The program is loaded from the core
image library, without relocation.
Therefore it is the user's responsibility
to ensure that the phase or program to be
loaded does not contain assembled addresses
that will load text into the main-storage
area occupied by the Supervisor or by any
portion of his program that will be
required later. Also, the user must make
provision for returning to his original
program if that is required.

EXCP· Macro

.--

IName
II

Op

Operand

EXCP

blockname

i

I
----I
I
I

This macro instruction (execute channel
program) is. issued to request that an I/O
operation be performed. It causes physical
IOCS (Channel Scheduler) to perform a startUQ operation.

Registers 12 and 13 are used by the
Supervisor, and their contents are not
saved or restored, unless SUPVR SAVEREG=YES
was specified when the supeFvisor was
assembled.
(See Macro Instruction to
Assemble-a Supervisor.)
Additional information about libraries·
and the System Loader is given in the BOS
Programmerfs-Guide, as'listed on the front
~over of this publication.
Execution:

EXCP is used for a file of data that is
controlled by physical 10CS macro
instructions and it is described in the
section Processing Records with Physical
10£].

174

S/360 BOS Assembler with I/O Macros

Not·aDisk-Resident-System

If the disk-resident system is not used for
execution of the object program, control is
turned over to the Program Loader when the
FETCH is executed. The Program loader must

be in main storage at this time, and it
loads the next phase or program that is
presently available in the system input
device (designated by SYSIPT).
The system
input device may be a card reader or a tape
unit. Loading continues until the loader
recognizes an XFR card or an Assembler END
card with an operand, at which time control
is transferred to the problem program. The
XFR or END card contains the address at
which execution of the program is to start.
The program is loaded from TXT or REP
cards, without relocation. Therefore, it
is the user's responsibility to ensure that
the phase or program to be loaded does not
contain assembled addresses that will load
text intc the main-storage area occupied by
the Supervisor, Program Loader, or any
portion of his program that will be
required later.
Also the ~ser must make
provision for returning to his original
program, if that is required, because the
loader does not save and restore registers.
Registers 1, 14, and 15 are destroyed by
the loader. R~gisters 12 and 13 are used
by the Supervisor, and may be used by the
programmer if SUPVR SAVEREG=YES was
specified when the supervisor was
assembled.
(See Macro Instructicn to
As§~mble~~upervlsor~f--------------

r-----,-------r-----

IName

Op

I Operand

Additional information about the Prcgram
Loader and TXT, REP, XFR, and END cards is
given in the BPS ££Qgrammer's Guide.
Fetch Macro Source Statements
Issuing the FETCH macro instruction in the
source program causes several statements to
be assembled, including the following:

FETCH

PHASE2

SVC
DC

Macro instruction

Supervisor Call
CL6'PHASE2'

6-byte phase or
program name

During execution, the Supervisor Call
interruption routine analyzes the code and
gives control to the appropriate loader
(system or program), depending on whether
the program is executed in a disk system.

I

,....---+----+-

--t

EXIT I TR
EXIT I CR

J

I

I
I

'-I

The EXIT macro instruction is issued at the
end of either the user's time-interruption
routine or the user's operator
communication routine, to return to the
main line of the problem program at the
point where the interruption occurred.
This instruction requires one-of the
following operands:
TR

To return from the user's timer
routine.

CR

To return from the user's
operator-communication routine.

I~----~------.--

IName

Op

I Operand

~I---~-----+----

IName

MSG

I code,REPLY
-L--

Text and transfer cards (TXT and XFR or
END) are output from the Assembler and
input to the Program Loader.
Replacement
cards (REP) can be added to the object deck
and used as input to the Program Loader.

'-----,

-----I

The MSG (message) macro instruction allows
a user's problem program or an IBM-supplied
program to give a message to the operator.
It is used to indicate error conditions
and/or to request an operator decision
before proceeding further with processing
of the proplem program.
This instruction can be labeled with a
symbolic name and it can have one or two
operands.
The first operand (code) is the
message to be communicated to the operator.
It may contain 1-4 characters, which are
generally a code or some meaningful
characters such as ISEQ for
input-sequence-error.
The sec6nd-operand (REPLY) is optional~
and it is included only if further
processing is dependent upon a response
from the operator.
For example, if
ISEQ,REPLY is specified in the instruction,
a reply from the operator is required.
This request for a reply is indicated by
the letter A following the message.
The
message printed or displayed in this case
is ISEQA.
The operator's response to a message
must be a one-character code as follows:

o

Terminate the job.
Macro Instruction Statements

175

Dump and terminate the job.
2

Turn on program switch 7 in the
UPSI byte of the communication
region (see Figure 47, Byte 23)
and return to the problem
program.

3

Turn OFF program switch 7 (UPSI
byte) and return to the problem
program.

4

Ignore the indicated I/O error
and continue processing if the
message was initiated by
physical IOCS.
If not, return
to the problem program.
If STR routines are included in
the assembled supervisor, the
message is discontinued, but
processing continues. The lost
data and EOF bits in the
Expanded STR CCB are set on.
I£ BSC routines are included in
the assembled supervisor, the
transmission is,discontinued,
but processing continues. The
reply 4 bit in the expanded BSC
CCB is set on.
Retry the indicated I/O
operation if the message was
initiated by physical IOCS. If
not, return to the problem
program.

5

Disable STR lines, dump the
program, and terminate the job.
If STR routines are not
included in the assembled
supervisor, the reply of 6 is
an invalid reply and will be
ignored.

6

Terminate the BSC job by
disabling the line, displaying
the error statistics and
transmission counts, clearing
the BS9 CCB table, and dumping
the program before end of job.
If BSC support routines are not
includEd i~ the assembled
supervisor, the reply of 8 is
an invalid reply and is
ignored.

8

Other

Return to the problem program.

All Code s

The reply code is returned to
the program that initiated the
message, and (except for 0, 1"
6, or 8) can be tested by the
program by addressing "Name+7".

The MSG instruction can be used in a
system that includes an IBM 1052 Printer
176

S/360 BOS Assembler with I/O Macros

Keyboard, or in one that. does not.
However
the operations differ.
If a 1052 is
available for messages from the MSG macro,
it must be assigned to SYSLOG. Otherwise,
the MSG macro cannot determine that the
1052 is available and reacts as though it
were not.
When a 1052 is available, the
message is automatically typed and the
operator types the one-character response,
if REPLY is specified and indicated by the
letter A.
Then the response, if any, is
analyzed by the supervisor and processing
continues.
If an error is detected during
printer-keyboard input/output, operation is
executed as though there were no
printer-keyboard available.
If no reply is
required, the message will be printed and
processing will continue uninterrupted.
When a 1052 is not available,
programming waits (enters the wait state)
and the operator can display the message on
the console.
The message and the response
request (A), if any, are stored in fixed
main-sto~age positions 0-4.
If a reply is
required, the operator must press the stop
key, store the one-character code in fixed
main-storage position 5, and press the
start key.
TO resume processing, the
operator presses the interruption key. If
a reply is not required, the operator need
only press the interruption key to continue
processing.
Issuing the MSG macro instruction in the
source program causes three statements to
be assembled. For example:

NAME

MSG

ISEQ,REPLY

Macro Instruction

NAME

SVC
DC
DC

2
CL4 1 ISE'QI
CL2 1 Ab l

Supervisor Call
4-byte message
1-byte position
CA) indicates reply requested, and
1-byte position
(b) provides for
reply. If a reply
is not required,
this statement is
DC CL2 1 bb i

During execution, the Supervisor
interruption routine analyzes the code,
stores the return address, moves the
message to main-storage positions 0-4, and
sets up the printer-keyboard (if available)
for input/output operations. After the
operator enters the response (either by the
printer-keyboard, or by the console in
main~storaqe position 5), the Supervisor
analyzes the response code, and performs
the indicated function:

•

Terminates the job.

(Code 0 or 1)

•

Dumps and terminates the job.

•

Sets program switch 7.
Code 3 = OFF)

•

The STR message is discontinued, but
prQcessing (on other lines or devices)
continues.
EOF is simulated with the
lost-data and EOF bits on in the
expanded STR CCB (Code 4).

•

(Code 1)

(Code 2 = ON;

•

The BSC transmission is discontinued,
but processing continues (on other
devices). The reply 4 bit in the
expanded BSC CCB is set on.

•

Retries the designated operation (Code

•

Terminates an STR
disacled, and the
dumped before the
with code 1 (Code

•

Terminates a BSC job.
The BSC line is
disabled, the error statistics and
transmission countlare displayed, the
BSC CCB table is cleared, and the
problem program is dumped before the
job is terminated as with code 1 (Code

5) •

job. STR lines are
problem program is
job is terminated, as
6).

8) •

•

Stores the code in the last byte of the
assembled statements (byte "b" shown in
DC CL2' Ab )
'

•

Returns control to the problem program,
at the instruction following the MSG
macro unless the code is 0, 1, or 6.
If the STR routines are not included in
the assembled supervisor, a reply of 6
is an invalid reply and will be
ignored.
The same applies.to reply of
8 if BSC routines are not included in
the assembled supervisor.

i

i

IName

Digit
C1Q~l)

,

o

Displayed
(On Console
1!.Y!.§LQ)

2

11110000
'''10001
11110010

3
4

11110011
11110100

I Operand

I

I

COMRGI

The COMRG (communication region) macro
instruction allows the program to have
access to information stored in the
communication region.
The program can
either use this information, or alter the
information as stored.
When this' macro instruction is executed,
the address of the first byte of the
communication region is loaded into
register 1.
Usi~g this address as a base,
the program can then refer to any field in
the communication region.
After ~he macro
has been executed and reference to the
communication region is completed, register
1 may be used for other purposes.
Communication·Region: Both the Supervisor
and the problem program can use the
communication region.
A problem program
can use the first 30 bytes of this storage
area, whi6h is arranged as shown in Figure
47 and described here:

0-8

Calendar date (unpQ~~ed decimal),
available in two forms.
For example:
0817~)23)0

A
B

9

\A./\B
230th day

System configuration, represented
in binary form:

0-3
Message from
IPL or Supervisor
Job Control
Linkage Editor
or Program Loader
Other IBM programs
Logical IOCS
4

Therefore, when the user establishes his
messages, he should avoid using 0-4 in the
first position of his message.

= 8/17/64
= year ' 64,

The first six bytes supply the
date in the form of month/day/year
(A).
The last five bytes supply
the date in the form of year, and
day of the year (B). Form B is
used by the label routine.

A MSG macro can be reused without
resetting the reply byte (b).
Several programs sUPPfied by IBM also
utilize the MSG macro to give messages to
the operator. These messages are numerical
codes that start with a sp.ecified digit:

Op

Number of bytes in main
storage:
0000
8K
16K
0010
0011
24K
0100
32K
0110 .- 64K
1000
128K
1010
256K
Model (for diagnostic
scan-out area):
o
30
1 = other

Macro Instruction Statements

177

5
6

7

Floating-point
feature
Decimal
feature

I

user-supplied routines specified
by the STXIT macro.

Present
Not
Present

0

Name of the last phase requested
by a JOB card or a FETCH macro
instruction.

40-45

PrinterKeyboard

10-11

Address of the end of the
Supervisor.

MVCOM Macro

12-19

User area for interprogram or
intraprogram communication.
These
eight bytes are not reset by Job
Control.

IName

User area for intraprogram
communication. These three bytes
~_res~·by Job Control.

The MVCOM (move to communication reqion)
macro allows the user to modify bytes 12-23
in the communication reqion of the
Supervispr.

20-22

UPSI byte.
swi tches.

23

Program name.
The first six bytes
of the name on the JOB card.

30-39

Area used by the Supervisor to
retain informaticn ap~licable to
the problem program being
executed, e.g., addresses of

Date

Day

8

t

,. ,. ,."
",."

,.

u

~.E~

9

10

11 12

(Intra - Program
Communication)
19 20

"'''' ..... .....

1 Byte=8 Bits

I

0

I r 0000= 8K
Ii 0010= 16K
I : 0011 = 24K
I 0100= 32K
I 0110= 64K
I 1000= 128K
I 1010=256K
I

3

"0",

r~

E 5
·u "0 !ili;
j~
u."- Cu.
'" '" ~~

~0

Core
Size

:::E
4

5

6

"-

0

7

I~I

I
1

0
~ .. I

-g -E I
~ ?I

~

User Area

{Inter- program or Intraprogram Communication}

a..

.2'"

178

byte,n, location

E ~

~o ~

"Q""tI

a
",,,,
cu.

Figure 47.

MVCOM

Program Name

2-

~ :,; .g

~0

Day of
Year

Bytes. 0

Address of first
byte supplied in
COMRG macro

Operand

I
--1
I

Before issuing the MVCOM macro, the user
must set up the new information he wishes
to insert in the communication region.
Then when he issuep the macro, he must
specify three operands.
He specifies the
first byte that is to be modified in the
communication region, the number of bytes
to be modified, and the location of the new
information.

User Area

c:::
.Q

Year

I

----------.--------------,

Op

User's program

24-29

Month

r--

I
Present = 1
Absent = 0

I
I
I
I

0-1

I

1

I

Communication Suparvisor (in Supervisor)

S/360 BOS Assembler with I/O Macros

22

2-5
0):::
~~

{Entered from
Job Control}

23 24

29 30

Area used by
the Supervisor

Phase Name

{last Phase
Requested}
39 40

45

The first operand (byte) specifies the
first byte that is to be modified relativg
to t~e'beginning of the communication
region. For example, to modify the UPSI
byte, 23 is punched.

i

i

lap
10perand
II
ISTXITln,pc-name,it-name,oc-name
L-.____
________________________________________
~

The §~on~QE~ang·specifies the number
of bytes to be modified.
If only the
UPSI byte in the previous example is to be
altered, n equals 1.
~)

The third operand· (location) speci fies
either the symbolic name of the
main-storage location that contains the
information, or the register that contains
the address of the information. When a
register is to be specified, it must be
enclosed in parentheses, and it may be
either a number .or a symbolic name nDt
exceeding six characters.
Using this macro, a programmer might set
up his program switches (UPSI) with the
following coding:

MVCOH

23,1,NEWUPSI

Or, he might prefer to set his switches
this way:

HERE

LA

5,NEWUPSI

E

HERE

MVCOH

23,1, (REG5)

The STXIT (set exit) macro instruction can
be used to activate the user's interruption
routines. The user may provide four
different routines to which programming
automatically branches on certain
interruption conditions: program-check
interrupttion, interval-timer interruption, and
operator communication IIO interruption
(request key on the 1052). The addresses
of one or more of these four routines may
be specified by one STXIT instruction.
When the problem program is executed in
a disk-resident system, the interval timer
(it) and operator communication (oc)
routines must not be located, or begin, in
the first 2500 ~ain-storage positions above
the end of the- Supervisor.
Whenever this STXIT instruction is
issued, the iirs~QEerand must be included
to specify the number (n) of a
general-purpose register. The macro uses
this register to refer to the address of
the communication region. Any register
1~11 or 14-15 may be specified.
After the
macro has been executed, the register may
be used for other purposes. If this STXIT
instruction is issued again later in the
program, the same or a different register
may be specified.
Each of the .Q~.h.§r.fouLOpe£.ill.!ds is
optional. One or more operands are
specified, depending on the routine(s)
desired. Each operand specifies either the
symbolic name of the user's routine or an'
action to be taken by the Supervisor. The
STXIT macro s~ores this information in the
Supervisor's area of the communication
region. These names or actions must be
entered in the operand field in the order
shown:
pc-name

Symbolic name of user's
program-check interruption
routine, ABORT, or DUMP.

it-name

Symbolic name of user's
interval-timer interruption
routine, or CLOSE.

oc-name

Symbolic name of user's
operator-communicati0n 1/0
interruption routine, or CLOSE.

In both examples, NEWUPSI could be defined
this way:
NEWUPSI

DC

X'S7'

~

If any name(s) is omitted but following
names are to be included, a comma must be
entered to indicate the omission. For
Macro Instruction Statements

119

example, if this instruction is to specify
Register 5, the name of a program-check
routine (PROCHK), and the name of an
operat6r-commun~cation routine (OPCOM), it
is written:
STXIT 5,PROCHK"OPCOM
Effect of CLOSE:
The addresses for the it
and-oc interruption routines can be cleared
from the Supervisor area by specifying
CLOSE as the operand in the STXIT macro.
If an interruption occurs while a routine
is closed (no address available), the
interruption is ignored.
The IPL procedure
also closes these three routines.

When an interruption occurs due to a
program check, the Supervisor turns control
over to the user's routine, if that routine
is presently active (specified by pc-name).
At the end of his routine, the programmer
can return to the main line of his problem
program by loading the address stored in
the program-check old PSW into a register
and branching to that address.
A proqram check may occur if the problem
program specifies erroneous information to
the Supervi~or, such as:
•

•

The proqram phase specified by a JOB
card or the FETCH macrc instruction
cannot be found in the core image
library •. Byte 43 in main storage
contains a hexadecimal value of 20.
Bytes 40-45 of the communication region
contain the phase name, which can be
examined by the user's program check
Ioutine.
However, if the DUMP option
is used, Bytes 40-45 do not contain the
phase name, and, instead, the phase
name is listed on the first line of the
printout.
The main storage size specified in the
configuration byte of the communication
region exceeds the storage actually
available in the system.

•

The floating-point feature is specified
as present in the confiquration byte of
the communication region, but it is not
actually available in the system.

•

An invalid SVC (Supervisor call) code
is used. The only valid SVC codes are
those generated by the macros that
communicate with the Supervisor (FETCH,
EXCP, EXIT, MSG, DUMP, EOJ, the STR
processing macros, STR device error
routines, BSC support macros and BSC
error routines).
Byte 43 in main
storage contains a hexadecimal value of
10.

180

S/360 BOS Assembler with I/O Macros

If the user does not specify a routine,
the actions that can be taken when a
program check occurs vary dependinq on
whether the object program is executed in a
disk-resident system.
No..:..!!.§,gr Routin~~i.§£-Rg§A:den.:L.System~
Instead of specifyinq a routine, the user
may specify either ABORT or DUMP in the
STXIT macro instruction when the object
program is to be executed in a
disk-resident system. ABORT terminates the
job; DUMP terminates the job and causes the
contents of registers and main storaqe to
be printed. The DUMP specification is
always activated when Job Control is
executed before the execution of the
problem program.
When a program check occurs, the
Supervisor issues a MSG macro instruction
with a message to notify the operator.
If
a 1052 printer-keyboard is available, the
message is typed, the previously specified
action (ABORT or DUMP) is taken, and the
Job Control program is loaded into main
storaqe to continue operation with the next
job.
If a 1052 is not available, however,
tnemessage is stored in main-storaqe
positions 0-3 and the system enters the
wait state. The operator can display the
message and then press the interruption key
to continue operation.
At this time the
specified action (ABORT or DUMP) is taken
and Job Control is fetched to continue with
the next jqb.
No User Routine·- Not a Disk-Resident
§ystem:--Instead-of specifyinq a routine,
the user may specify ABORT in the STXIT
macro instruction when a disk-resident
system is not to be used for proqram
execution. The ABORT specification is
initially set when the Supervisor is loaded
in to main storaqe.
Job Control, if used,
also sets program check to ABORT.
(The
user may specify DUMP but, if so, it is
treated the same as ABORT. That is, no
printing occurs.)
When a program check occurs, the
Supervisor issues a MSG macro instruction,
terminates the job, and causes the system
to enter the wait state.
If a 1052
printer-keyboard is available, the messaqe
is typed.
If not, the message is stored in
main-storage positions 0-3 .and the operator
can display it.
The execution of a
different program can then be initialized.
Interval Timer
When an interruption occurs due to the
timer, the Supervisor turns control over to
the user's routine if that routine is
presently active (specified by it-name) and
if TIMER was specified in the SUPVR macro
instruction when the Supervisor was

assembled. The Supervisor saves the
program status of the main line of the
problem program so that programming can
return to it at the end of the
timer-interruption routine. The Supervisor
also saves the contents of general
registers 10 and 11, so that these
registers may be u~ed in the timer routine.
The last instruction in the timer routine
should be the macro instruction EXIT TR.
When this macro is executed, ~egisters 10
and 11 are restored to their original value
and the program status is restored.
Once a routine has been specified fer an
interval-timer interruption , that routine
remains active until it i p either cleared
or replaced.
It is cleared by the IPL
procedure, or by issuing a STXIT n"CLOSE
instruction. It is replaced by issuing a
STXIT instruction with a different it-name.
If TR=YES was not specified in the SUPVR
macro instruction at Supervisor-assembly
time, or if a timer-interruption routine is
not active, any interval~timer interruption
that occurs is ignored.
QEerator Communication
If a 1052 printer-keyboard is availab~e
on-line, an operator can initiate a
communication .to cause anyone of three
actions:
terminate a jot, set a program
switch w or branch to a user-supplied
routine.
However, if a 1052 is not
aviilable, only the first two ~ctions can
be initiated.
1052-Available: When an IBM 1052
PrInter-Keyboard is available, the operator
can initiate a communication to the system
by pressi~g the request key and then keying
a one~character code. The cede may be one
of the following:
co~

Blank

continue processing.
pressed in error.

o

Terminate the job.

Request key

Print out the contents of
registers and main storage , and
terminate the job.
2

Set program switch 7 in the UPSI
byte of the communicatien region
(see Figure 47, Byte 23) and
continue with the problem program

3

(Code 2=ON; Code 3=OFF).

6

Disable STR lines, dump the
problem program( and termina~e the
job. If the STR routines are not
included in the as?embled

supervisor, code 6 is an invalid
reply and will be ignored.
8

Terminate the BSC job by disabling
the line and displaying the error
statistics and transmission counts
before end of job.
If BSC support
routines are not included in the
assembled supervisor, the reply of
8 is an invalid reply and is
ignored.

Other

Turn control over to the user's
operator-communication routine.

When some code other than 0-3, 6, or 8
is entered, the Supervisor turns control
over to the user's routine if that routine
is presently active (specified by oc-name)
and if INQUIRY was specified in the SUPVR
macro instruction when the Supervisor w~s
assembled. The Supervisor saves the
program status of the main line of the
problem program so that programming can
return to it at the end of the
operator-communication routine. The
Supervisor also saves the contents of
general registers '0 and 11 so that these
registers may be used in the
operator-communication routine.
In this
routine, a GET instruction is issued for
the printer-keyboard. The operator enters
his request by keying a message that the
routine has been programmed to analyze.
The last instruction in the operator
communication routine should be the macro
instruction EXIT CR. When this macro is
execut.ed, registers 10 and 11 are restored
to their original value and the program
status is restored.
Once a routine has been specified for an
operator-communication interruption , that
routine remains active until it is either
cleared or replaced.
It is cleared by the
IPL procedure, or by issuirrg a STXTT·n,A,
CLOSE-instruction.
It is re~laced by
issuing a STXIT instruction with a
different oc-name.
If CR=YES was not specified in the SUPVR
macro instruction at Supervisor-assembly
time, or if an operator communication
routine is not active, any code other than
0-3 that is entered as an interruption
request is ignored.
1052-Not-Available: When a 1052 is not
avaIlable; the-Qperator can initiate
communication to the Supervisor only, not
to a user routine.
For supervisor
communication, the operator stops th~
system operation, enters a code 0-3, 6, or
8 in fixed main-storage position 5, and
presses the start and interruption keys.
As described previously, code 0 terminates
the job, code 1 causes a print-out and
terminates the job, code 2 or 3 sets
Macro Instruction Statements

181

program switch 7 (ON or OFF, respectively)
and permits processing to continue, code 6
terminates an STR job, and code 8
terminates a BSC job.
(Code 6 .m us.:!: - be used
when the problem 'program is using STR
devices and code 8 must be used when the
problem program is' using ESC support, to
ensure that the lines are properly
.disabled.)
If the operator enters any
other code, it is ignored.

Whenever any program is executed, a
Supervisor must be iocated in lower main
storage to piovide over-all control of
operations. The Supervisor consists of
routines to control the functions of
machine interruptions, ~xternal
interruptions, operator communication, and
physical IOCS reguests and interruptions.
PrQsgam . Execution: -. In· a- Disk-ResidentSyst.§.ill

r-----~-----r--

I Operand
~---+-+-1- IL _ _.LI DUMP I

IWame I Op

----,

I
I
____________----JI

The DUMP macro instruction applies only to
object programs that will be executed in a
disk system.
It should be issued when an
unusual condition requires that the job be
terminated and that a print-out of
registers and main storage b~ supplied to
the user. It may also be issued on a
normal end-of-job condition to cause a
prin t-out.
DUMP does not require an
operand. In a BSC environment, the DUMP
macro should be preceded by the ERRPT macro
(se.e ~inll.L~ch.fon.Q'!!s CO!1.!!!]1ligtion).
When DUMP is executed, the Supervisor
causes a print-out to be taken, and then
fetches and turns control over to the Job
Control program.

r-

i

--,-

IName I Op

1 Operand

•
I
1' - -_ _..1I EOJ

1
1

i

1
of

II

The EOJ (end-of-job) macro instruction
should be issued at the end of a problem
program to inform the system (and the
operator) that the job is finished.
EOJ
does not require an operand.
In a BSC
environment l the EOJ macro should be
preceded by the ERRPT macro (see Bina~
synch!:on~Communicatw) •
When EOJ is executed in a disk system,
the system loader (program-fetch routine)
loads and transfers control to the Job
Control program.
If the disk system is not
used for execution of the object program,
however, control is turn~d over to the
Supervisor and the system enters the wait
state when the EOJ macro is executed.
Then, if the program loader has not been
overlaid, the operator presses the
interruption and start keys to resume
operation. This gives control to the
program loader to load the next program for
execution.
182

S/360 BOS Assembler with I/O Macros

In a disk-~esident system, one Supervisor
contains the routines required to control
the interruptions and all I/O devices in
the installa.tion.
It is permanently stored
on the system-resiqence disk pack, from
which it is loaded into main storage for
program executions. It can be loaded once
at the beginning of the day to control the
execution of all jobs run during the day.
The jobs that may be executed include both
the user's object programs and IBM-supplied
programs, such as Assembler, Report Program
Generator (~PG), etc.
This Supervisor also contains routines
to load programs for execution, and to turn
control over to those proqrams and/or
receive control back from the programs that
are executed. Thus the Supervisor in a
disk system enables the user to stack jobs,
so that one job after the other can be run
without intervention from an operator.
In addition to interruption toutines,
physical I/O routines, and loadirig
routines, the Supervisor contains a
transient·area.
This area starts on a
doublewordbOundary and provides a section
of main storage to which certain standard
but seldom-used routines may be transferred
for execution.
These transient routines
are permanently stored on the
system-residence disk pack, and they are
loaded (by the Supervisor) into the
transient area only when they are needed.
This means that only one section of main
storage must be reserved to accom~odate a
number of fairly large routines.
Some of
the routines using this area are:
OPEN
CLOSE
End of Volume

DUMP
Checkpoint

A Supervisor that will be used in a disk
system is generally assembled once, at
system-generation time when the
installation is first established.
It is
stored on the system-residence pack at that
time.
Such a Supervisor is assembled to
contain only·the routines that are needed
to control those I/O devices included in
the user~s configuration of the System/360.
And, as previously stated, it contains

routines to control all the I/O devices in
the installation. Therefore the Supervisor
must be reassembled only if the system
configuration changes by the addition or
deletion of I/O devices or special
features. Several macro instructions
(SUPVR, SYMUN, IOCFG, and SEND) are used to
assemble a Supervisor. These are discussed
in the following pages under Macro
Instructions to Assemble a Supervisor.
Additional information about the
functions of a Supervisor is given in the
BOS Proqrammer'sGuide, as listed on the
front cover of this publication.
PrQg~~Execution:

·Not in a Disk-Resident

tape reader. Then the appropriate
Supervisor would be used with each
problem program to control the I/O
devices used by that program.

•

A Supervisor can be assembled to
contain only those I/O routines that
are required for the I/O devices used
by a particular problem program. Such
a tailored Supervisor can be assembled
with the problem program, or it can be
assembled separately. Separate
assembly simplifies debugging and
reassembly if errors are found in the
problem program. In this case, only
the problem program would need to be
reassembled.

System
When a disk-resident system (with a system
Supervisor) is not used for the execution
of a user's object program, a Supervisor
that contains all the routines required to
handle the individual object program must
be loaded into main storage ahead of the
obje~t program.
This Supervisor must
remain in main storage during the execution
of the object program. If it contains the
appropriate I/O routines for succeeding
object programs, it can remain in main
storage for~their execution also.
Supervisors for object programs that are
not executed in a disk-resident system must
be assembled by the user either with his
source prcqram or separately. One or more
Supervisors may be assembled and stored in
card· decks for use in an installation. The
number of Supervisors that are assembled
depends upon the input/output devices that
are available in the installation and used
in the various problem programs, and upon
the ~vailable main-storage positions. The
user can follow these procedures' for.
Supervisor assembly:
•

•

A Supervisor that contains all the I/O
routines required to control all the
I/O devices in the installation can be
assembled once for an, installation. It
is then used for the. execution of any
problem program, regardless of what
units are utilized by the prpgram .•
This Supervisor. does not operate in a
disk-resident system and will not
contain any 23" disk input/output
routines.
Several Supervisors can be assembled
such that each one controls particular
groups of I/O devices~ For example,
one Supervisor may contain routines to
handl~ magnetic-tape units, 2540 card
reader, 2540 card punch, and 1403
printer. Another Supervisor could be
assembled to handle those devices plus
the '442 card reader and the 2611 paper

Assembling a Supervisor separately from
the problem program is possible because
linkaqe between the problem program and the
Supervisor is accomplished by Supervisor
Calls or macros~ There is no symbolic
linkaqe between the two.
Whenever a Supervisor and a problem
program are assembled together, the problem
program must not contain any symbolic names
that start with ~ or SYS.
A Supervisor that controls programs that
are not·executed in a disk~resideJ.lt system
does not contain a transient area. Instead
routines, such as OPEN and CLOSE, are
assembled with the user's object program.
Additional information about the
functions of a Supervisor is given in the
Tape Programmer's Guide, as listed on the
front cover of this publication.
T~e same macro instructions that are
used to assemble the Supervisor for a
disk-resident system are used to assemble
Supervisors for object programs that are
not to be executed in a disk-resident
system. However, only those macro
parameters that apply to devices utilized
by the problem program should be included.

MACRO INSTRUCTIONS TO ASSEMBLE A SUPERVISOR
Whenever a Supervisor is assembled (at
time, with the problem
program, or separately), the assembly
requires four basic macros: SUPVR
(supervisor), SYMUN (symbolic units), IOCFG
(I/O configuration), and SEND (supervisor
end). The IOCFG macro assembles error
routines for the various dAvices in the
system.
system-g~neration

The basic macro instructions must be
issued in the order as listed and described
in the following sections.

Macro Instruction Statements

183

SUPVR·Macro
I

~--------

i

I Operand
I
I
I
-4
ISUPVR I DISK=YES,CONFG=nnnnnnnn,TR=YES,CR=YES,SAVEREG=YES I
·1 SUPVR I CONFG=nnnnnnnn" TR=YES ,CR=YES, CHKPT=YES
I
lOp

I

I

I

The SUPVR (Supervisor) macro instruction
~ndicates that a Supervisor is to be
assembled for operation in a particular
model of the System/360.
The system
residence (if applicable), machine size,
and available special features are
specified.
Keyword parameters are specified in this
macro.
Therefore, the specifications may
be entered in any order; those that do not
apply may be omitted. Each keyword
parameter exc~pt the last must be followed
by a comma.
DI~K~YES:
This operand must be includeQ
when a Supervisor is to be assembled to
operate in a disk-resident system.
If the
supervisor will be used to centrol
operations for the execution of object
programs when a disk-resident system is n21
used, this operand must be omitted. If
desired, however, DISK=NO may be used to
achieve the same purpose.

.£Q..NKQ=nn.!!!ill.!lnn: This operand is the same
as the configuration byte (byte 9) of the
communication region. It must consist of
eight "0" or "1" digits.
The eight digits
indicabe the machine configuratien for
which the Supervisor is being assembled, as
follows (numbering from the left) :
Digit

i2§tii.Q.n.§

configura1ion

1-4

Number of bytes of main
8K=0000
16K=00 10
24K=OO'1
32K=0100
64 K= 0' 10
128K=1000
256K=1010

5

Model

For any other model, 256 bytes are
reserved.
If this keyword field is omitted, it is
assumed to be CONFG=OOOOOOOO.
This is
interpreted as an 8K Model 30 without the
floating point option, the decimal feature,
and the printer-keyboard.
If a Supervisor will ever be used in a
system with main storage greater than 32K,
CONFG must specify 64K (0110) or greater.
This is necessary because additional COding·
is required in the Supervisor for
configurations greater than 32K. If the
assembled Supervisor is subseguently used
for a configuration of 32K or less, a Job
Control CONFG card must specify the machine
size for program execution.
TR=YES:
This operand (timer routine) must
be included if the supervisor being
assembled is to be used for any problem
program that contains a routine(s) for the
interval timer. If this Qperand is
omitted, the interval timer (INTTMR) switch
must be set OFF for any program(s} that
uses this Supervisor.
CR=XES:
This operand (communication
routine) must be included if the Supervisor
being assembled is to be used for any
problem program that contains a routine (s)
fo~ operator-initiated communication from
the 1052.
CH~PT=YES:

storage~

*

30=0
other='
6
7

Floating-point option! Present= 1
Decimal feature

8

Printer=Keyboard

Not
present=O

*

When Model 30 is specified, 12 bytes are
reserved for a diagnostic scan-out area.
184

S/360 BOS Assembler with IIO Macros

This operand (checkpoint) must
be included if the Supervisor being
assembled is to be used fbr any problem
program that includes the checkpoint IDacro
or that requires restarting from
checkpointed records. This operand applies
to the assembly of a Supervisor only if a
disk-resident system will not be used for
the execution of programs that utilize this
Supervisor. From the parameters in this
instruction, the initial vaiues for the
Supervisor communication region are
assembled.
SAVEREG=YES: This operand is optional, but
mus~be included if the user plans to use
registers 12 and 13 for programs that are
executed in a disk-resident system.
It
directs the supervisor and physical IOCS to
save and restore these registers. If the
operand is omitted, the programmer must not
use registers 12 and 13 because these

registers are used by the Supervisor
Interruption Routine, and interruptions are
unpredictable.
If the s~pervisor is to be
used to control operations for the
execution of object programs when a
disk-resident system i p not us€d, this
operand must-be omitted.
Hote: If Autotest is used, the
programmer must nQ! use registers 12 and 13
because these registers are used by the
Autotest Master Control routine.
SYMUN Macro·
i

lap
I

I

Operand

ISYMUN

,
I

n,X'ccuu',X'ddss',X'ccuu',X'ddss'l

I

I

Each file of input or output data is
associated with an input or output device
that is represented in a proplem program by
a§Ymbolic unit. The symbolic unit is used
instead of a device address (channel and
unit).
Then when the program is executed,
the file of records (disk pack, tape reel,
card deck, etc) is placed in an actual
device and that device is assigned to the
symbolic unit.
Thus~ the actual device
(which disk or tape drive, for example)
need not be determined until the jop is
run.
All devices are handled in this
manner, and a specified set of symbolic
units can be used:
SYSRDR - system control-card reader
SYSLST - system printer
SYSIPT - main system input device
SYSOPT - main system output device
SYSLOG - control card logging device
SYSOOO-SYS254 - other devices in the
system
In the last group (SYSOOO-SYS254) the
user as~igns numbers, in order, for all the
devices required in his problem program.
To relate the actual device (channel and
unit address) to the symbolic unit, a
device table is maintained in the
Supervisor. The number of entries needed
in the table must be determined by the
programmer when the Supervisor is
as~embled.
The first five (SYSRDR, SYSLST,
SYSIPT, SYSOPT, and SYSLOG) are assumed to
be present, and he must specify only the
additional number. That is, he specifies
how many numbered units, starting with
SYSOOO, are used. This must be the first
operand (n) in the SYMUN macro instruction.
If no units above the pasic five are
required, n is specified as "0".
When a supervisor is assembled with a
large number of options (in SUPVR and IOCFG
macros), the number of devices that can be

specified (SYMUN macro) may be limited.
The absolute maximum value for n is 255.
However, the maximum value of n for a
supervisor generated specifying a large
number of options depends upon the options
specified, and may be less than 255.
The assignment of an actual device to a
symbolic unit can be made by the Job
Control ASSGN card, or it can be made at
the time the Supervisor is assembled by
this SYMUN macro.
Any, alleu p to - 24), or
none of the symbolic units may be assigned
actual devices at assembly time.
When the
assignment is made by this macro, the
device remains assigned to the symbolic
unit unless the assignment is overridden by
a Job Control ASSGN card.
Therefore, if no
change in assignment is required for the
execution of a program, Job Control
~ssignment can be bypassed when the object
program is loaded.
Any of the first 24 devices
(SYSRDR-SYS018) to be used during program
execution may be assigned by the SYMUN
macro instruction.
Any others must be
assigned by Job Control.
When devices are assigned by the SYMUN
macro, the operand should be in the
positional format.
A separate pair of
parameters (X'ccuu',X'ddss') is entered for
each device in this exact order:
SYSRDR, SYSLST, SYSIPT, SYSOPT, SYSLOG,
SYSOOO, SYS001,---,SYS018
That is, the first pair of parameters
(after n) assigns a card reader to be used
as the system reader for control cards, the
second pair assigns a printer for system
listings, the seventh pair assigns a device
to unit SYS001, etc.
When any symboli'c
unit is not to be assigned a device at this
time, two commas must be entered to
in.dicat.e the omission if other assignments
follow.
If no more devices are to be
assigned, however, the commas are also
omitted.
The parameters (X'ccuu',X'ddss') for
each assigned device are two 4-position
hexadecimal numbers indicating the channel
(cc) and unit (uu) address, the devi~e type
(dd), and specifications (ss), as follows:
cc - channel number
00 - multiplexor channel
01 - 1st selector channel
02 - 2nd selector channel
uu - OO-FF- unit address (0-255)
dd - device type
00 - 2401, 2402, 2403, 2404
magnetic tape unit
02 - 1052 printer-keyboard
Macro Instruction Statements

185

04
06
08
OA
OC
10
'2
14
16
18
1A
1C
1E
20
ss -

- 1442 card read-punch
- 1403, 1404 printer
- 2540 card read
- 2540 card punch or punch
feed read
- 23" disk storage drive
- 2671 paper tape reader
- 1443, '445 printer
- 2501 card reader
- 2520 card read-punch {reading,
or reading and punching for
combined files)
- 1285 optical reader or 1287
optical reader operated in
journal tape mode
- 2520 card punch or 2520 card
read-punch (punching only)
- 2701 data adapter unit
with SDA I (STR).
data adapter unit
- 1287 optical reader operated
in document mode
- 2701 data adapter unit
with SDA II (BSC)

specifications
These two hexadecimal characters
are 00 unless 7- or 9-track tape
is specified.
With 7-track tape
they provide 4 different opti6ns:
Density, parity, Translate, and
Convert. A code is specified to
represent a valid combination of
options (Figure 48). For 9-track
tape, codes are:
C8 to indicate
800 bytes/inch; CO to indicate
1600 bytes/inch. If this operand
is omitted, a density of 800 BPI
is assumed.
This device
specifications byte is also used
internally asa queue pointer for
the channel scheduler. Users
should not utilize this byte for
any purpose other than magnetic
tape specifications.

From the parameters in this instruction,
the macro sets up the physical-device table
that is used by the I/O request and
interruption routines.
IOCFG Macro
r----,----lOp
I Operand

I

I

L..

I

IIOCFG I keyword=YE5,keyword=YES,---

The IOCFG (I/O configuration) macro
instruction defines the input /output units
and channels that the Supervisor must
serv~ce.
When a Supervisor is assembled
fo"r "a disk-resident system, this macro must
include all the types of devices and
features "(as indicated in the following
list of" parameters) that are available in
186

S/360 BOS Assembler with I/O Macros

CONVERT

PARITY

DENSITY

TRANSLATE

CODE
200

556

800

Odd

Even

On

Off

X

20

X

X

X

28

X

X

X

30

X

X

X

38

X

X

X

X

X

X
X
X
X
X

50

X

60

X

X

X

68

X

X

X

70

X

X

X

78

X

X

X

X

X

X
X
X
X

X

90

X

AO

X

X.

X

A8

X

X

X

BO

X

X

X

X

X

X

X

X

Off
X

10

B8

On

X

X
X
X

.-

Figure 48.

options for 7-Track Tape

the user's inst~llation.
However, when a
supervisor is assembled for an object
program(s) that is not to be executed in a
disk-resident system, only those devices
and features that will be needed by the'
object program(s) should" be specified.
Thus, if the object program uses tape
units, a 2540 reader, and a 1403 printer,
the parameters that relate t~ these units
should be included, and all others should
be omitted~' The available channel(s) and
certain tape-unit specifications are also
included, as indicated in the following
list of parameters.
Keyword parameters are specified in this
instruction. Therefore the specifications
may be entered in any order, and those that
do not apply may be omitted. Each keyword
parameter except the last must be followed
by a comma.
The parameters that are used to specify
required devices are:
Program~Reguires

Parameter

Object:

MPX=n

Multiplexor channel.
n = 1-255
to specify the number of queues

desired for the multiplexor
channel.
(If omitted, n=1 is
aS$umed. )
SEL=n

TAU=YES
DVE=n

One selector channel (n is "1 ")
or both selector channels (n is
"2")
Two-channel read-while-write
Tape Control Unit
In general DVE should be
specified if problem programs
may contain command control
blocks with the Wait for Device
End bit on.
Such CCB's are
g~nerated by laCS:
1.
2.
3.

for control commands,
if CRDERR=RETRY is
specified for 2540 or 2520
punches,
if PRINTOV=YES is specified
for printers.

P3=YES

2520 punch only

L1=YES

'403 or 1404 Printer

L2=YES

1443 or 1445 Printer

C1=YES

1052 Printer-Keyboard

RO=YES

2671 Paper Tape Reader

RR=YES

1285 or 1287 (in either mode)
Optical Reader

BAC~WRD=YES

Backwards reading of magnetic
tape

TRK7=YES

7-track magnetic tape

TRK9=YES

9-track magnetic tape.
(If
omitted and T=YES is specified,
TRK9=YES is assumed.)

ST=YES

2701 Data Adapter Unit with SDA
I (STR)

ANSWR=n

Used to specify the maximum
number (n=1-6) of STR devices
to be monitored for ringing
wpen using the 5TR SOPEN
(DIAL=IN) macro.
If more lines
are specified to be monitored
in the problem proqram than
were specified in n of ANSWR,
an error message is issued and
the job is terminated.

BSC=YES

2701 Data Adapter unit with SDA
II (BSC)

BTAB=n

Specifies the maximum number
(n='-'2) of BSC CCB's used in
any single BSC proqram. If
BSC=YES is coded and BTAB is
omitted, BTAB=' is assumed.

n = maximum number of devices
to be tested for Device End.
A carriage tape should not have
the channel 9 punch under these
two conditions:
1.

2.

Supervisor used for the
problem prcgram does not
include the DVE
specification.
Supervisor does include the
DVE specification, but the
PRTOV or CCB macro
instruction in the problem
program does nqt request
posting of device end in
the command control block
(CCB) •

If a 9 punch is used under
either condition, a physical
laCS error message will result.
T=YES

2401, 2402, 2403, or 2404
Magnetic Tape Unit

R1=YES

2540 reader

From the parameters in this IOCFG
instruction, the macro assembles the
channel scheduler and I/O interruption
routines for the Supervisor, and selects
the appropriate device error routines.

i

IName
fe~d

R2=YES

2540 punch

R3=YES

1442 read, or read and punch
for combined files
2501 reader

R4=YES

read

R5=YES

2520 read, or read and punch
for combined files

Pl=YES

2540 punch only

P2=YES

1442 punch only

I

Op

Operand

SEND

n,REP,nnnn(X'nnnn')

The SEND (supervisor end) macro instruction
must be included as the last instruction in
the set required to assemble the
Supervisor. It contains one, two or three
operands.
The first-operand is optional, and it
specifies the number (n) of bytes to be
reserved as a patch area at the end of the
Macro Instruction Statements

187

Supervisor in main storage. This area can
be used for changes or corrections in the
Supervisor itself.
With this area the
superyisor can be enlarged, if necessary,
without ~equiring the reassembly of
programs that utilize main storage
immediately above the Supervisor. The
minimum size of this area should be '50
bytes for IBM-supplied changes to the
Supervisor. The user may also reserve
additional room for expansion of the
Supervisor due to changes in his system
configuration or for the inclusion of
additional supervisor functions.
If this
operand is not included but the second
operand is required, a comma must be
entered to indicat€ the omission.
Whenever a Supervisor that is ll21 to be
used in a disk-resident system is
assembled, a Program Loader also is
assembled.
It follows the Supervisor and
is considered part of the Supervisor in
main storage. In this case, the patch area
is located in main storage between the
Supervisor and Program Loader.
The second operan,g (REP) also is
optional and applies only to the assembly
of a Supervisor and Program Loader that are
not tp be used in a disk-resident system.
It causes the Program Loader that is
assembled with the Supervisor to include a
replace-text function (see Tape
.
Programmer's Guide as listed on the front
cover of this publication). The ability to
process REP cards in the Program Loader can
only be achieved by speoifying this
operand.
The third operand is also optional and
applies only to the assembly of a
supervisor to be used in a disk~resident
system. This operand specifies the user's
desired supervisor end address, and may be
either in decimal or in hexadecimal.
It
must specify a double word ~oundary; if
this is not done, alignment w~ll be to the
next highest double word.
Enough room must
be alloweq for the supervisor being
assembled or the supervisor could be
destroyed by the transient routines.
(See
the supervisor core size chart or the
Programmer's Guide publication.)

188

S/360 BOS Assembler with I/O Macros

Whenever the third operand is used an
MNOTE will be issued at assembly time to
warn the user.
Then the user has to check
that enough room has been reserved.
Once a SEND address is specified for a
given set of parameters, it will never have
to be changed, thus eliminating the
necessity of relinkage editing the entire
system for maintenance purposes when the
supervisor changes.
The specified SEND address overrides the
optional patch area, as specified by the
first operand of the SEND macro.
It also
overrides the built-in supervisor patch
area which is reserved along with several
options in the SUPVR and IOCFG macros.

ORGANIZATION TO ASSEMBLE A SUPERVISOR
The set of instructions in Figure 49
illustratesthereguirements for assembling
a Supervisor for the control of problem
program execution and a Program Loader for
loading problem programs. The example
assumes the setup described in the
following eight items:
1.

Job control cards are used to prepare
for the assembly. These job control
cards are input to the Job Control
program on the system tape. The
assembled object deck is to be punched
in a 2540 with the address of channel
0, unit 04. A DA.TE control card also
is required if this assembly is the
first job after performing an IPt.

2.

An IPL (Initial Program Loading) loader
is to be assembled with a Supervisor
that is assembled for the execution of
object programs when a disk-resident
system is not used. The loader will be
used at pr~gram execution time to load
the Supervisor and Program Loader from
a card reader.
(If a Supervisor were
to be assembled for a disk-resident
system, the AOPTN IPL control card
would be omitted.)

IBM SYItaml360 A..lmbl .. Codln; Form

IBM

1'\oI. . . .

PROGU.M

PROQAAMMU

.

......

1

J
-

1/111

vVi

..

STATEMENT

,.

O~~
,.
3.
UkJ~1
~slSl€'~B~~~
1
,!¢
¢r1- ' I, 'P
~S ls~Gf.J lsy lsb IPTi,~
a,-ratlon

10

I

"
I

)
11 ~

1I

1

I

I

Plf',ICH

I

1

1

I

GRAPHIC

50

1

I

11

I

I

I

CAaD lUCIIIQ HUMafR

tdentmcotlon-

s....ow:.

.,

71

80

13

I

I

I

I:

i

Macro
instructions _
to assemble
the
Supervisor 1

I

1

i

,

,

u.l. ..

0<

v

I

I

o

"

1
1

PAGE

..

C_"tt

"

Job Control

1\

I

..

I

I
~~~Ir~ ]IP'L l Assembler Control Card to Assemble IPL Loader
II!
I
" I III i I
~IUPIV R I" ON I~~ =iJ,;;' AJilil lrJll
I
!SYMU'/v 131,!xi' 0 008'!, D<1'~8¢ ~I' I, ~I' 1p'rJ'1 '11:' I,XI"¢6 113'11' ,'X '$'liJfJ8 'I,IX ,~ B~ ~fIJ ' I. X 'iP iP~ 14><
I I 'I,~"IO A'DO:'I, ~ ''f,H111 ~I' ,xl' ¢.2.¢¥JI' , t!, 1,1, xl '¢'(11 ~I' ,X' IjIIz 13 (1 ,
lIK)cr-G MPX= 1I, SEL= 1. T =Y ES.Rl =y £'S P l'=y'£ S,, L'll= YE SI. C 1 =Iv E,S ~. T RK19 - IVI.ES
I I
1 I I'
I i
I
I I I I
! !
!
"S'ENIJ ' 12100:,~ ~~: !
I
I
iii
I I_! :
1
II I I
i I
i I
! If' i I
I I
I II,
I
I
,
I
1 I
1
I I I I I I I I I
I I-I :
User's problem program source deck
I I'
I,
inserted here when the Supervisor is
I III
I I I :
I :_1 I
I
I
I

(2J

~

lOAn

IL"'X I~IC

[71

PUNCHING
INSTRUCTIONS

,

,

I

,

f

I-I I

I

I

'EN'[j

I

1

I III I
I I I I I
I I
I
t

III
I I I I
I I
I
I
I

I[

i I

I

I

I

1I

I

I

I
!

I
I,

Ii I
I
i

I

I

I

I

I I

I

II

I

.

I

II
II
III
I
I i I
I ! ;

!

,
I

I I I

II

I 1
:

I
I

!

i I I
I
I I I I
1

assembled with the problem program

-

I

I
I

'

-

"

.I
I

I

1

i

I

I!

1

:

I

I I: :
II I i
I I!
I II
I,
"

I

I!

I

,

I
:' I
!'

!
I

I

!

I

I

II
II

Ii
1'1

I

:

!

I

I
I
I

j!

I i I

I

I

I

I

I

I

I

' I
Ii

!

I

1r
1

,

I,

I

I

i

!

I

I

I

I
:

'I

.

i
i

!

!

I

I

I

i

,

,

i

I

:

I
I

I

I
!
,
I
I
i! I
\ I I

I

I

I I I I
I fl I

~
I

I

I
I

!

I

!

1 I I

I
i:

I

I
I :

i

i

I

I
II II
I

Ii

, I

i

!

I

,

I

i 1

I
I

I Ii
.I I
Ii !
I
I
I
! ! I I
II I!
1 I
iii I : I !
i
II
I I
i

!

I

I

'

1
I

I
\

I
' II
:
I
I! I

i i

I

I

I

I
I

I

I

I

I

1
I
I I

I

I

1I
I

I

I I

I
I

I

I

I

I

t

I

I

I

I

I

:

I
:

I

i

I

I

I

!

I
I

I

II

i

I

I I I I

!

I

I I i
: I

I

I

I:

Note: Circled numbers refer to items in the text.

Figure 49.

Assembling a Supervisor and Program Loader

3.

A Supervisor is to be assembled.
(If a
Supervisor were to be assembled for a
disk-resident system, DISK=YES would be
specified. )

4.

The problem program will require three
I/O units over and above the basic five
(SYSRDR, SYSLST, SYSIPT, SYSOPT, and
SYSLCG) •

Control cards will be logged on a
1052 printer-keyboard addressed as
channel 0, unit 1F.
Two tape drives will be required by
the object program.
They will be
assigned to symbolic units SYSOOO and
SYS001 when the program is execut€d.
Job Control ASSGN cards, rather than
the SYMUN macro, will make these
assignments.

Control cards for the execution of
the problem program will be read by the
system reader which is a 2540 reader
addressed as channel 0, unit 08.

The program also uses the 1052
printer-keyboard addressed as channel
0, unit 1F, and referred to as symbolic
unit SYS002.

A 1403 printer addressed as channel
0, unit 10, is assigned as the system
pri~ter.

The main system input· device is the
same device as the system reader, which
is addressed as channel 0, unit 08.
The main system output device is a
2540 card punch addressed as channel 0,
unit 04,

5

The features and types of I/O devices
that will be required by the object
program are:
The multiplexor channel and one
selector channel
Magnetic tape units, with nine-track
tape, on the selector channel
Macro Instruction Statements

189

2540 card reader

listed on the front cover of this
publica tion. -

2540 card punch
1403 printer
1052 printer-keyboard
6.

This is the end of the
Supervisor-Assembly macro instructions.
An area of 200 bytes is to be reserved
at the end of the Supervisor.
This Supervisor is to be assembled
for use in conjunction with the
execution of object programs when a
disk~resident system is not used.
The
Program Loader is assembled immediately
after the supervisor and the
replace-text function is assembled as
part of the Program Loader so that REP
cards can be used when problem programs
are loaded for execution.
(If a
Supervisor ~ere to be assembled for a
disk-resident system, as indicated by
the SUPVR macro instruction, Program
Loader would not be assembled and REP
is omitted.)

A Job-Control program has t~o main
functio.ns.:
preparing jobs to be run, and
restarting the execrition of a job at some
point other than the beginning. The
·program consists of two phases, which are
obtained by two assemblies, the first using
the JBCTL macro and the second, the RSTRT
macro.
The phase assembled by the JBCTL macro
prepares jobs to be executed. It contains
rQutines to:
1.

Indicate the name of the job to be
executed next.

2.

Assign actual input/output devices
(addresses) to the symbolic units
(SY~RDR, SYSLST, etc.)
use~ by the
problem program-.

3.

Place today's date in the
communication region of the
Supervisor.
This can be used by
problem programs.

4.

Set (ON or OFF) the
user-program-switch indicators {UPSI
byte) in the communication region of
the Supervisor.

5.

Reset the program check indicator to
ABORT.

6.

Edit and store label information for
later use by the tape label routines.

7.

Store m~chine configuration in
communication region of the
Supervisor.

JOB-CONTROL-ASSEMBLY MACROS (NCTFOR A
DISK-RES"'iDiNT S~l

8.

Allow restarting of previously
checkpointed records.

When a user's problem program is to be
executed, it may require the setup
functions provided by a program called the
Job-Control program.
A Job-Control program
is available on the system pack for problem
programs that are to be executed 'in a
disk-resident system. However, if a
problem prog;ram is to b~ executed w1'ten a
disk-resident system is not used, a
Job-Control program must be made available.
In this case, the Job C~ntrol program must
be assembled by the user from IBM-supplied
macro routines. Once the Job-Control
program has been assembled, it can be
executed any time its functions are
required for a problem program.
(This
Job-Control program is separate from and
has no relation to the Job-Centrol program
that resides on the system pack.)
For
additional information about Job-Control
programs, see the Programmer's Guides as

9.

Print (log)

7.

8.

190

The user's problem program is assembled
next. This applies only to the
combined assembly of a Supervisor and a
problem program, when a disk-resident
system is not to be used for the
execution of the object program.
If the Supervisor and Program Loader
are not assembled with the problem
program, or if a Supervisor is
assembled for a disk-resident system,
the END card comes immediately after
the SEND card.

S/360 BOS Assembier with I/O Macros

job control cards.

10.

Assign I/O request queues to multiplex
mode devices on the multiplexor
channel.

11.

Initiate execution of of the next job.

12.

Allow the wait state to be entered
before the job is executed, so that
the operator can perform any
preparatory operations.

The user can communicate with this program
using job-control cards such· as JOB, ASSGN,
and EXEC.
The phase obtained from the RSTRT macro
contains routines for continuing the
execution of an interrupted job· at a point
other than the beginning~ The checkpoint

(CHKPT) macro must be used in the problem
program to provide input information about
the status of the job so that the restart
phase of the Job-Centrol program can
continue execution, if necessary.
To restart a job, both phases of Job
Control must be u~ed. The job-control
cards reguired for restarting a
checkpointed job are described in the Tape
Programmer's Guide, as listed on the front
cover of this manual.
These two phases of the Job-Centrol
program must be assembled separately. The
operand field of each macro instruction
must be blank.

Op

IName

r-

Operand

JBCTL

~

______

~

__________

r-----,r--------r-----------Operand
IName I Op
I
I

r----~---------------------------.------------

Operand
lOp
I
I
ISTARTI 4096 - Assembler start Card
- Macro Instruction
1,1BCTL I
lEND
I START - Assembler End Card

,
I
I

To assemble the restart phase of the
Job-Control proqram, these three cards are:

i

IL---__

job-control cards for the system tape
Job-Control program (see section 1 of
Figure 20) must be used at the beginninq of
each assembly.
Three other cards must
follow the job-control EXEC ~ard.
To
assemble the first phase of the Job-Control
program, these three cards are:

+-

I RSTRT
---L-

ASSEMBLING THE JOB CONTROL PROGRAM
To obtain both phases of the Job-Control
program, two assemblies are required. The

r----

I

lOp

I

--,

Operand

I----+-

ISTARTI 4096
- Assembler Start Card
IRSTRTI
- Macro Instruction
lEND
I SYSRST - Assembler End Card

I

--t

I
I

I

The START cards in these examples qive
an absolute machine address (4096), which
is the address at which the user wishes to
begin loading the Job-Control program.
In
general, the user can either specify an
absolute loading address, or he can omit
the address operand and use the Tape
Linkaqe Editor to provide a job-control (or
restart) card deck with the proper loading
addresses.

Macro Instruction Statements

191

CONTROL CARDS

The Assembler program operates. under
control of the Supervisor program, which
resides on the systems pack. certain
job-control cards are therefore needed by
the Job Control program to identify and
initialize each Assembler run, or assembly.
Four Assembler files (or five, if two
w6rkfiles are utilized) are required for an
Assembler run.
These files and their
permiisible device assignments are as
follows:
1.

Work file 1 (disk)

2.

If used, Workfile 2 (disk)

3.

Source input (card reader or tape)

4.

Text output (card punch, - tape, or
relocatable library)

5.

Listing output (printer or tape)

Device assignments for these files are
normally given at systems generation time.
If, however~ these assignments were not
given at that time or the user wishes to
alter any of tbe assignments, certain
job-control cards may be used at assembly
time to make the desired ~ssignments. The
types of job-control cards and their
functions are des~~ibed in !EEendix 1 and
the g£Qg~~~~§_Gui£g for Basic operating
System.
As shown in the preceding list, three of
the Assembler files (source input, text
output, and listing output) may be assigned
to t~pe units.
They each may be assigned
to a separate unit or one of the following
two combinations may be assigned to the
same uni t:
1.

source input and text output

2.

source input and listing output.

Ei~her

7- or 9-track tape may be used for
these assignments, (see Figure 55 for
7-track tape requirements). Special
messages produced by an ALOG card are not
considered to be an Assembler file.
They
are listed on tbe priRting device that is
assigned to SYSLOG.
Certain control cards may be supplied
for use by t~e Assembler program. These
cards indicate which of the Assembler
processing options the Assembler program is

192

S/360 BOS Assembler with I/O Macros

to perform or provide.
The Assembler
control cards are:
AOPTN (Assembler
option) card, ALOG (Assembler log) card,
AWORK (Assembler workfile) card, and AFILE
(system file) card. These cards have the
same format as Assembler-language
instructions. The AOPTN, ALOG, AWORK, and
AFILE appear as if they were mnemonic
operation codes, and the various options
are specified as operand(s).

AOPTN card(s) are required only if the user
wishes to alter the normal output from the
Assembler.
The normal Assembler output consists of
two major files:
the object proqram and
the program listing. The object program
consists of three types of information;
the external symbol dictionary (ESD), text,
and the relocation dictionary (RLDt. The
program listing consists of five lists of
information: ESD listing, source and
object program listing, RLD listing, error
listing, symbol table, or cross reference
listing.
The option(s) that may be supp~ied in
the AOPTN cards are shown in Figure 50;
each option is identified by a symbol which
is used in the AOPTN card. Each option of
the AOPTN card may be specified in a
different AOPTN card, or the options may
appear as multiple operands (separated by
commas) in a single card.
If the user wishes to include the
options BGNBATCH (begin batch processing),
BATCH, and ENDBATCH, the AOPTN BGNBATCH
card should be included only in the first
assembly, and AOPTN BATCH in each
succeeding assembly except the last. In
the last assembly, the AOPTN ENDBATCH card
should be included to discontinue the batch
processing environment. Job control cards
should precede only the first assembly
(Figure 51).

The contents of the ALOG card, all
asse~bler-option (AOPTN) cards, all
assembler workfile (AWORK) cards, and all
assembier system file (AFILE) cards
following the ALOG card are printed out on
SYSLOG. A statement of the total number of
errors also is printed out on SYSLOG.

i

OPTION
NO DECK

MEANING
I
,------------------------------.-----------------------------------------~
The object deck vi~l not be produced in cards, tape, or disk.
(This does
not affect the appearance of the program listing)~
Also, no cards viII be
produced as a result of REPRO or PUNCH instructions.

NOESD

No ESD data viII appear in the object program or the program listing.
(Program will not be acceptable to a Basic Operating System or operating
System) •

NORLD

No RLD data will appear in the object program or the program listinq.
(Program viII not be relocatable).

NOLIST

The program listing viII not appear.

NOERR

The error listing viII not appear in the program listing.

NOSYM

The symbol table viII not appear in the program listing.

PCHSYM

The symbol table will be punched out (depending on the device) on the same
device as specified for text output.
This table is in the format required
for the Autctest program.

CROSSREF

A cross-reference listing will appear instead of the symbol table listing.
The cress-reference listing contains up to a total of 20,625 statement
number references to symbols used. If more than 20,625 references are
used, symbols and references above that number will not be shown.

IPt

An IPL routine (for loading an independent Supervisor from a card reader)
will precede the object proqram.

ENTRY

An ENTRY card will be produced at the end of the output text.

BGNBATCH

If SYSLST and SYSOPT are assigned to a tape unit, the tapes will be opened,
initiating a batched environment.
The listing and output tapes will not be
closed at the end of assembly.

BATCH

A batched environment will be initiated or continued.
tapes will not be closed.

ENDBATCH

If SYSLST and SYSOPT are assigned to tape, the tapes will be closed.
The
batched environment will be discontinued and end-of-job will be called.

Listing and output

L

Figure 50.

AOPTN Card option Indicators

AWQ!l.!L..J!.§§§!lB!~£_ Worka~)

. Car~

An AWORK card indicates the number of
work areas the Assembler is to use in
processing source-program st~tements. The
Assembler can use either one or two
work areas.
Normally two workareas are
provided qnly if two disk drives are
available. In this case, one workarea can
be assigned to each disk drive.
Using two
workareas on separate disk drives shortens
the processing time required by the
Assembler.

A workarea cust always be assiqned to a
continuous disk area between specified
limits eXTENT) on one disk pack.
This is
accomplished by using the proper
job-control cards.
AFl1~lAssembler Fil~~arg

An AFILE card directs the Assembler to
place the entire output deck (see Fiqure
57) in the relocatable library as a module.
The format of the AFILE Assembler control
card is:

The AWORK card requires cne operand.
If
the digit 1 appears as the operand, the
Assembler assumes one workarea.
If the
digit 2 is used, the Assembler assumes two
workareas.
If no AWORK card is provided,
the Assembler assumes one workarea.
Control Cards

193

r--~

I

IName

10perand

lOp

---,

I

1----+----+
IName

JAFILE

I
I

I
I

ILIBRARY, RETAIN
I
or
I LIERARY

•

A name must be given in the name field.
The name given may include one to six
characters.
Any additional characters are
ignored.
(The name ALL is not allowed.)
The name is placed in the relocatable
library directory to identify the module.
The first operand is LIBRARY and must
always appear in the AFILE card.
If RETAIN
appears as the second operand in the AFILE
card, the module is entered permanently and
remains until it is deleted or replaced.

Note:
If any of the other
assembler options
are used, the cards
can be placed any where in this deck
between the EXEC
card and the appropriate
source deck.

SOURCE DECK
LAST ASSEMBLY
AOPTN ENDBATCH

•

•

•

SOURCE DECK
ASSEMBLY 2
AOPTN BATCH

SOURCE DECK
ASSEMBLY 1
AOPTN BGNBATCH

II EXEC
II DATE

II

JOB ASSEMBLER

Figure 51.

194

Batch Processing If the second

S/360 BOS Assembler with I/O Macros

operand is omitted, the module is entered
temporarily and will be overlaid by the
next module entered into the relocatable
library.
Based upon the intended usaqe of the
module, the user must provide a PHASE
and/or an ENTRY card in the module.
The
initial PHASE card can be obtained with a
PUNCH or REPRO statement placed before the
(act ual or implied) START sta temen t.
An
ENTRY card can be obtained with an AOPTN
ENTRY card. A description of the
alternatives available for processinq
modules in the relocatable library may be
found in the section 1~qe Editor in the
BOS g~oqrammer's Guide as listed on the
front cover of this publication.
It is possible to load and execute an
object program immediately after the
assembly is completed.
This may be
accomplished by entering the name of the
first phase to be executed as the second
operand of the JOB card used for the
Assembler run.
The module,' created for this
purpose must be terminated by an ENTRY card
and must contain one or more PHASE cards.
This procedure for processinq a module
immediately after it is assembled and
placed in the relocatable library has no
effect on the future availability of the
module.
It remains in the relocatable
library and may be accessed normally until
deleted or (in the case of a temporary
module) the next module is entered.
]Qte: Multiple phases are created in a
single assembly by using an XFR card to end
a phase.
A PHASE card, created by a REPRO
or PUNCH statement, follows this XFR card
and precedes the next phase in line.
To
ensure proper execution, each phase created
in this manner should be a separate control
section.

A§§EMBLER LANGUAGE SUBSET··RELATIONSHIP

There are three separate System/360
assembler languages.
One is for Basic
Programming Support (Card) and is called
the basic assembler language. The second
is for Basic programming Support and Basic
Operating System and is called the tape and
disk assembler language.
The third is the
Operating System assembler language.
The
basic assembler language is a subset. of the
tape and disk assembler language, which in
turn is a subset of the Operating System

assembler language. Any language features
that exist on one level exist on all higher
levels, with the exception of the XFR
.
assembler instruction.
(The XFR assembler
instruction is unique to the tape and disk
assembler language.)
The differences between the Operating
System assembler language and the Basic
Operating System disk assembler language
are shown in Figure 52.

Assembler Language Subset Relationship

195

LANGUAGE
FEATURE

OPERATING SYSTEM
SPECIFICATION

BASIC OPERATING SYSTEM
SPECIFICATION
CODING CONVENTIONS

Maximum of two continuation
lines allowed

Continuation lines

Maximum of one continuation
line allowed

Address Constants

Only one address constant may
be specified in a DC statement or
a literal

One or more address constants may
be specified in a DC statement or
a literal

Bit-Length Specification

Feature excluded

Feature is provided in Operating System

DC Operands

Only one operand allowed per
DC statement

One or more operands allowed
per DC statement

Duplication Factor

Duplication factor expressable
only by a decimal self-defining
term

Duplication factor expressable
by any absolute expression

Exponent Modifier

Exponent modifier expressable only
by a decimal self-defining term

Exponent modifier expressable
by any absolute expression

Length Modifier

Length modifier expressable only
by a decimal self-defining term

Length modifier expressable by
any absolute expression

Literals

In case of duplicate literals,
more than one may be stored

In case of duplicate literals,
only one is stored

Scale Modifier

Scale modifier expressable only
by a decimal self-defining term

Scale modifier expressable by
any absolute expression

Parentheses

Only one set of parentheses (
allowed'in an expression

Terms

Maximum of three terms allowed
per expressi"n

DS Operand

Only one operand allowed in a
DS statement

One or more operands allowed
in a DS statement

Length Modifier

Maximum length designation of a
storage field is 256 bytes

Maximum length designation of
a storage field is 65,536 bytes

CONSTANTS

EXPRESSIONS
)

No limit on the number of sets
of parentheses ( ) allowed
in an expression
No limit on the number of terms
allowed per expression

STORAGE DEFINITION (DS STATEMENT)

ASSEMBLER-INSTRUCTION STATEMENTS
CNOP

Each operand expressable only by
a decimal self-defining term

Each operand expressable by
any absolute expression

COM

Statement excluded

Statement provided in Operating System

COpy

Statement excluded

Statement provided in Operating System

CSECT and
DSECT

In addition to the combined number
ofCSECTs, DSECTs, EXTRNs, and
V-type address constants not being
allowed to exceed 255, the combined
number of CSECT and DSECT statements must not exceed 32.

The combined number of CSECT
statements, DSECT statements,
EXTRN statements, and V-type
address constants must not exceed
255

EXTRN and
ENTRY

Only one relocatable symbol is allowed in each EXTRN and ENTRY statement

One or more relocatable symbols are allowed in each
EXTRN and ENTRY statement

TITLE

The first TITLE statement provides
the heading only for pages of the
listing that follow it, until the
next TITLE statement (if any) is
encountered

The first TITLE statement, in
addition to providing the heading for all pages of the listing that lie between it and the
next TITLE statement (if any),
also provides the heading for
any page(s) of the listing
that precede it.

USING and
DROP

Maximum of 5 base register designations allowed in each USING or
DROP statement

Maximum of 15 base register
designations allowed in each
USING or DROP statement

XFR

Statement providlld In Basic
Operating System

Statement excluded

Figure 52.

196

Differences Between Basic Operating System and Operating System
Assembler Languages

S/360 BOS Assembler with I/O Macros

APPENDIX A:

CHARACTER ·CODES--PART ,

This appendix lists all System/360 card codes to which a printer graphic is assiqned.
See Part 2 for a complete list of character codes.
Card

Printer

fgg~

~.Iwl:.f'§

12,8,3
12, 8, 4
12,8, 5
12,8,6
12
11,8,3
11,8,4
11,8,5
11
0, ,
0,8,3
0,8,4
8,3
8,4
8,5
8,6
12, 1
12,2
12,3
12,4
, 2,5
12,6
12,7
12,8
12,9

.blank
(period)

<
(

+
&
$

*

)

/

,

%
#
Q)

•

A
B

C
D
E
F

G
H

I

(prime)

Internal
Representa.!ill

Card
f£de

0'000000
01001011
0'001100
01001101
010011'0
01010000
0'0'1011
01011100
0'0"'01
01100000
0"00001
01101011
01101'00
01111011
0'
"00
01111101
0'1"110
1100000'
11000010
,,000011
11000100
11000'01
11000110
11000'.,
11.001000
"00100'

11,1
11,2
11,3
11,4
" ,5
11,6
11,7
11,8
11,9
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
0
1
2
3

l'

4

5
6
7
8
9

Printer
Graphics
J
K
L
M

N
0

P
Q

R
S
T
U

V

W

X
y
Z

0
1
2
3
4
5
6
7
8
9

Internal
RepresentE:tion
.10'000'
11010010
"010011
11010100
'1010'0'
11010110
"0'0'1'
11011000
"0'1001
11100010
'''000'1
11100100
'1'00101
11100110
, 1100' 11
11101000
11101001
'1"0000
11110001
11110010
11110011
11110'00
11110101
111'0110
1111<)111
11111000
11111001

Appendix A

'97

APPENDIX A:

CHARACTEB-CODES--PART-2

8-BIT
BCD
CODL

CHARACTER SET
PUNCH
COMBINATION_

00000000
00000001
000000.0
00000011
00000'00
00000101
00000 ,. 0
00000111
0000.000
00001001
0000.010
00001011
0000' .00
00001101
000011.0
00001111
00010000
00010001
000100.0
00010011
00010.00
00010101
000'0 HQ
00010111
00011000
000'1001
000'10'0
00011011
000" '00
00011101
0.00" 110
00011 11 1
00'00000
00100001
00.000.0
00100011
00100100
00100101
00'00"0
00HjOl11
0010'000
00101001
0010.010
00101011
00101.00
00101101
00'0.110
00101111
00.10000
00110001
00"00'0

12,0,9,8,1
12,9,1
12,9,2
12,9,3
.2,9,4
12,9,5
12,9,6
12,9,7
.2,9,8
12,9,8,1
12,9,8,2
12,9,8,3
12,9,8,4
12,9,8,5
12,9,8,6
12,9,8,7
.2,",9,8,.
11,9,1
11,9,2
11,9,3
.1,9,4
11,9,5
",9,6
11,9,7
",9,8
11,9,8,1
'.,9,8,2

0011001~

00110100
00110101
00110110
00110111
0011.000
00111001
198

PRINTER
GRAPHICS

11,~,8,3

1',9,8,4
11,9,8,5
",9,8,6
11,9,8,7
'1,0,9,8,.
0,9,1
0,9,2
0,9,3
0,9,4
0,9,5
0,9,6
0,9,7
0,9,8
0,9,8,1
0,9.,8,2
0,9,8,3
0,9,8,4
0,9,8,5
·0,9,8,6
0,9,8,7
.2,.',0,9,8,1
9,1
9,2
9,3
9,4
9,5
9,6
9,7
9,8
9,8,1

S/360 BOS Assembler with I/O Macros

1LtG:IMA1
0
1
2
3
4
5
6
7
8
9
10
11
'2
13
'4
15
'6
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
4·0
41
42
4~

44
45
46
47
48
49
50
51
52
53
54
55
56
57

HEXADECIMAL
00
01
02
03
04
05
06
07
08
09
OA
OB
OC
OD
OE
OF
'0
'1
'2
13
14
15
'6
17
18
19
1A
1B

.c

1D
'E
lF
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32·
33
34
35
36
37
38
39

0.0.1"0.10
0.0111011
0.0"1'0.0
0.0.11110.1
0.0""'0
0.0111111
0.10.00000
0.10.00001
0.1000.0.0
0.10.000.11
0.100.0100
0.1000.10.1
01000..,0
0.1000.111
0.'0.0'000
0.100.1001
0'0.0'0'0
0100.1011
0'00"00
010.0. 1101
0. '0.0' ., 0
o 100. 11 1 1
0'010.00.0
010.10.00.1
0.'0.'0.0'0
0.1010.011
0'0'0.'00
01010.10.1
0'0.'0"0
010.10.111
0'0110.0.0
0.101~001

0.1011010
0.1011011
010.1"0.0.
0101110.1
0. 1011 ,. 0
0. 10 11111
01'0.0.00.0
0110.0.001
0. "0.0. 0 1 0
0.110.0. 0 11
0.1'0.010.0
0110.0.101
0.110.0.,0
0110.0. 111
0.1'0.'000
0. 110100. 1
o.HOlo.,O
0110.10.11
0.110.1'0.0
0.110.1101
0110.1110.
0110.1111
0.111000.0.
0.11100.01
011100.0
0.1110.011
0.1110'00
01110.101
0"10"0
011'0111
0.""000
01111001
0"110'0
01111011
101111100
01111101

9,8,2
9,8,3
9,8,4
9,8,5
9,8,6
9,8,7
12,0,9,1
12,0.,9,2
12,0,9,3
'2,0,9,4
12,0,9,5
'2,0,9,6
12,0,9,7
'2,0,9,8
12,8,1
12,8,2
12,8,3
'2,8,4
12,8,.5
12,8,6
12,8,7
12
12,11,9,1
'2,1',9,2
12,11,9,3
12,",9,4
12,11,9,5
'2,",9,6

blank

.

<(

+
&

12~11,9,7

12,1',9,8
11,8,1
",8,2
11,8,3
",8,4
11,8,5
'1,8,6
11,8,7

$

*
)

,,

0,1
",0.,9,2
11,0.,9,3
",0.,9,4
11,0.,9,5
, ,,0.,9,6
11,0.,9,7
11,0.,9,8
0,8,1
'2,"
0,8,3
0.,8,4
0.,8,5
0.,8,6
0,8,7
'2,",0
12,11,0,9,1
12,11,0,9,2
12,11,0,9,3
'2,11,0,9,4
12,11,0.,9,5
12,11,0,9,6
12,11,0,9,7
12,1.,0,9,8
8,1
8,2
8,3
8,4
8,5

/

,
%

#
11)

(period)

58
59
60
61
62
63
64
65
66
67
68
69
70.
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
'04.
105
'06
107
108
109
110
111
"2
113
"4
115
116
117
.,8
119
'20
121
.22
123
'24
125

3A
3B
3C
3D
3E
3F
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
50
51
52
53
54
55
56
57
58
59
SA
5B
5C
5D
5E
SF
60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F
70
71
72
73
74
75
76
77
78·
79
7A
7B
7C
7D
Appendix A

199

0'1"HO
01111111
• 0000000
10000001
'00000.0
10000011
10000100
10000101
'0000110
10000111
.000.000
10001001
10001010
10001011
1000.'00
10001101
'0001'10
10001111
.0010000
10010001
'00100'0
10010011
'00'0'00
10010101
10010110
10010111
,00.1QOO
10011001
'00" 0'0
10011011
100" 1 0 0
10011101
,001.1.0
10011111
10'00000
10100001
10,000'0
10100011
.0100.00
10100101
'0100110
10100111
.0.01000
10101001
'010'010
10101011
10,01'OQ
10101101
1010' '10
10101111
.0110000
10110001
10'10010
10110011
101'0'00
10110101
10"0"0
10110111
10"'000
10111001
19'110'0
10111011
'011'100
10111101
.0",1,0
10111111
1'000000
11000001
200

8,6
8,7
.2,0,8, •
12,0,1
12,0,2
12,0, ·3
1.2,0,4
12,0,5
12,0,6
12,0,7
12,0,8
12,0,9
12,0,8,2
12,0,8,3
12;0,8,4
12,0,8,5
12,0,8,6
12,0,8,7
12,11,8,'
12,11,1
.2,",2
12,11,3
12,",4
12,11,5
'2,1,,6
12,11,7
12,1',8
12,11,9
'2,1',8,2
12,11,8,3
'2,11,8,4
12,11,8,5
12,'1,8,6
12,11,8,7
11,0,8,1
11,0,1
",0,2
11,0,3
",0,4
11,0,5
'1,0,6
11,0,7
'.,0,8
11,0,9
11,0,8,2
11,0,8,3
",0,8,4
11,0,8,5

126
127
128
129
.30
131
132
133
134
135
'36
137
'38
139
'40
1«1
1~2

11~O,8,6

11,0,8,7
12,11,0,8,1
12,11,0,1
'2,1',0,2
12,11,0,3
12~1,,0,4

12,11,0,5
12,11,0,6
12,11,0,7
12,11,0,8
12,11,0,9
,~""O,8,2

12,11,0,8,3
12,11,0,8,4
12,11,0,8,5
12,11,0,8,6
12,11,0,8,7
'2,0
12,1

A

5/360 B05 Assembler with I/O Macros

143
.44
145
.46
147
148
149
'50
151
152
153
'54
155
156
157
158
159
'60
161
162
163
'64
165
.66
167
'68
169
'70
171
.72
173
174
175
'76
177
'78
179
180
181
'82
183
'84
185
186
187
'88
189
190
191
.92
193

7E
7F
80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F
90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F
AO
Al
A2
A3
A4
AS
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
BO
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
CO
C1

11000010
11000011
, 1000.100
11000101
, 1000" 0
11000111
11001000
11001001
1 1001010
11001011
11001100
11001101
11001110
11001111
11010000
11010001
"0'00'0
11010011
11010100
11010101
1 '0'0" 0
11010111
11011000
11011001
"011010
11011011
11011100
11011101
11011110
11011111
11100000
11100001
'1100010
11100011
"100'00
11100101
, 11 00" 0
11100111
"'01000
1110100'
'H010l0
11101011
, '101100
11101101
"10",0
11101111
'11'0000
11110001
"'10010
11110011
'11'01(10
11110101
11110110
11110'111
'''''000
11111001
111 "0·, 0
11111011
'1111'00
11111101
"'.',10
11111111

12,2
12,3
12,4
12,5
12,6
12,7
12,.8
12,9
'2,0,9,8,2
12,0,9,8,3
12,0,9,8,4
12,0,9,8,5
12,0,9,8,6
12,0,9,8,7
, 1,0
11, 1
'1,2
11,3
, 1,4
11,5
",6
11,7
11,8
11,9
'2,1',9,8,2
12,11,9,8,3
12,11,9,8,4
12,11,9,8,5
12,1',9,8,6
12,11,9,8,7
0,8,2
11,0,.9,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
",0,9,8,2
11,0,9,8,3
11,0,9,8,4
1',0,9,8,5
11,0,9,8,6
11,0,9,8,7
0
1
2
3
4
5
6
7
8
9
12,",0,9,8,2
12,11,0,9,8,3
12,",0,9,8,4
12,11,0,9,8,5
'2,11,0,9,8,6
12,11,0~9,8,7

B
C
D
E
F
G

H
I

J
K
L
M
N

a

p
Q
R

S
T
U

V
W

X
y
Z

0
1
2
3
4
5
6
7
8
9

194
195
'96
197
'98
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
2'8
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
2-43
244
245
246
247
248
249
250
251
252
253
254
255

C2
C3
C4
c5
C6
C7
C8
C9
CA
CB
CC
CO
CE
CF
DO
01
D2
03
D4
D5
06
07
D8
D9
DA
DB
OC
DO
OE
DF
EO
E-1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
FO
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA

FB
FC
FD
FE
FF

Appendix A

20.

202

S/360 BaS Assembler with I/O Macros

APPENDIX B:

MACHINE-INSTRUCTION MNEMONIC OPERATION CODES·

This appendix contains a table of the mnemonic operation codes for all machine
instructions that can be represented in assembler language, including extended mnemonic
operation codes.
It is in alphabetic order by instruction.
Indicated for each
instruction are both the mnemonic and machine operation codes, explicit and implicit
operand formats, program interruptions possible, and condition code set.
The column headings in this appendix and the information each column provides follow.
Instruction: This column contains the name of the instruction associated with the
mnemonic operation code.
Mnemonic Operation Code: This column gives the mnemonic operation code for the machine
instruction. This is written in the operation field when coding the instruction.
Machine~peration Code.
machine operation code.
dumps and when displayed
column also contains the
mnemonic is derived.

This column contains the hexadecimal equivalent of the actual
The operation code will appear in this form in most storage
on the system control pan~l.
For extended mnemonics, this
mnemonic code of the instruction from which the extended

Operand Forma!:
This column shows the symbolic format of the operand field in both
explicit and implicit form.
For both forms, R1, R2, and R3 indicate general registers
in operands one, two, and three, respectively. X2 indicates a general register used as
an index register in the second operand.
Instructions which require an index register
(X2) but are not to be indexed are shown with a 0 replacing X2. L, L1, and L2 indicate
lengths for either operand, operand one, and operand two, respectively.
For the explicit format, D1 and D2 indicate a displacement and B1 and B2 indicate a
base register for operands one and two.
For the implicit format, Dl,B1 and D2,B2 are replaced by Sl and S2 which indicate a
storage address in operands cne and two.
Type of Instruction: This column gives the basic machine format of the instruction eRR,
RX, SI, or SS).
If an instruction is included in a special feature or is an extended
mnemonic, this is also indicated.
Prog~-1nterruptions Possible:
This column indicates the possible program
interruptions for this instruction. The abbreviations used are:
A - Addressing, S Specification, OV - Overflow, P - Protection, Op - Operation (if feature is not
installed) and Other - other interruptions which are listed. The type of overflow is
indicated by:
D - Decimal, E - Exponent, or F - Floating Point.

Condition Code Set: The condition codes set as a result of this instruction are
indicated in this column.
(See legend following the table).

~endix

B

203

Instruction

Mnemonic Machine
Operation Operation
Code
Code

Operand Format
Explicit

Implicit

Add
Add
Add Decimal
Add Halfword
Add Logical

A
AR
AP
AH
AL

5A
1A
FA
4A
5E

R1, 02(X2, B2) or R1, 02(, B2)
R1,R2
01 (L 1, B1), 02(L2, 82)
R1, 02(X2, B2)or R1,02(, B2)
R1, 02(X2, B2)or R1,02(, B2)

Add
Add
Add
Add
Add

Logical
Norma Iized, Long
Normalized, Long
Normalized, Short
Norma Iized, Short

ALR
AO
AOR
AE
AER

1E
6A
2A
7A
3A

R1,R2
R1, 02(X2, B2)or R1, 02 (, B2)
R1~R2

R1, 02(X2, B2)or R1, 02(, B2)
R1,R2

R1, S2(X2)or R1 ,.52

Add
Add
Add
Add
And

Unnormalized,Lohg
Unnormalized,Long
Unnorma Ii zed, 5hort
Unnormalized, ~hort
Logical

AW
AWR
AU
AUR
N

6E
2E
7E
3E
54

R1 ,02(X2,B2)or R1,02(,B2)
R1,R2
R1, 02(X2, B2)or R1,02(, B2)
R1,R2
R1, 02(X2, B2)or R1, 02(, B2)

R1, S2(X2)or R1, 52

And Logical
And Logical
And Logical Immediate
Branch and Link
Branch and Link

NC
NR
NI
BAL
BALR

D4
14
94
45
05

01 (L, B1), 02(B2)
R1,R2
01(BO,12
R1, 02(X2, B2)or R1, 02 (, B2)
R1,R2

51 (L),.52 or 51,52

Branch
Branch
Branch
Branch
Branch

on
on
on
on
on

BC
BCR
BCT
BCTR
BE

47
07

R1, 02(X2, B2)or R1, 02 (, B2)
Rt,R2
46
R1,02(X2,B2)or R1,02(,B2)
06
R1,R2
47(BC 8) 02(X2, B2)or 02(,82)

R1, 52(X2)or R1, 52

52(X2)

Branch
Branch
Branch
Branch
Branch

on High
on Index High
on Index Low or Equal
on Low
if Mixed

BH
BXH
BXLE
BL
BM

47(BC 2) 02(X2, B2)or 02(,82)
86
R1 ,R3, 02(B2)
87
R1 ,R3, 02(B2)
47(BC 4) 02(X2, B2)or 02(,82)
47(BC 4) 02(X2, B2)or 02(,82)

52(X2) or 52
R1,R3,52
R1,R3,52
$2(X2) or 52
52(X2) or 52

Branch
Branch
Branch
Branch

on
on
on
on

BM
BNE
BNH
BNL

47(BC
47(BC
47(BC
47(BC

02(,82)
02(,82)
02(, 82)
02(,82 )

52(X2)
52(X2)
52(X2)
52(X2)

or
or
or
or

Branch if Ones
Branch on Ovelflow

BO
BO

47(BC 1) 02(X2, B2)or 02(, B2)
47(BC 1) 02(X2, B2)or 02(,82)

52(X2)
52(X2)

or 52
or 52

Branch
Branch
Branch
Branch
Branch

BP
BZ
BZ
B
BR

47(BC 2)
47(BC 8)
47(BC 8)
47(BC 15)
07(BCR 1~

02(X2, B2)or
02(X2, B2)or
02(X2, B2)or
02(X2, B2)or
R2

52(X2)
52(X2)
52(X2)
52(X2)

or
or
or
or

Algebraic
Algebraic
Oec ima I
Halfword
Logical

C
CR
CP
CH
CL

59
19
F9
49
55

RI,02(X2,B2)or R1,02(,B2)
R1,R2
01 (Ll, B1), 02(L2, 82)
R1, 02(X2, B2)or R1,02(, B2)
R1 ,02(X2, B2)or R1, 02(,B2)

Compare Logical
Compare Logical
Compare Logical Immediate
Compare, Long
Compare, Long

CLC
CLR
CLI
CO
COR

05
IS
95
69
29

01 (L, B1), 02(B2)
R1,R2
01 (B1), 12
RI, 02(X2, B2)or R1, 02(, B2)
R1,R2

5I(L),52 or 51,52

Compare, Short
Compare,5hort
Conv~rt to Binary
Convert to Decimal

CE
CER
CVB
CVO

79
39
4F
4E

R1,02(X2,B2)or R1,02(,B2)
R1,R2
R1, 02(X2, B2)or RI, 02(,B2)
RI, 02(X2, B2)or R1, 02(, B2)

R1,52(X2)or R1,52

Condition
Condition
Count
Count
Equal

Minus
Not Equal
Not High
Not Low

'.,

on Plus
if Zeros
on Zero
Unconditional
Unconditional

Compare
Compare
Compare
Compare
Compare

4)
7)
13)
11)

02(X2, B2)or
02(X2, B2)or
02(X2, B2)or
02(X2, B2)or

02(, B2)
02(, B2)
02(, B2).
02(,82)

Operand Format (Add)

204

S/360 BOS Assembler with I/O Macros

'R1,S2(X2) or R1,52
51(Ll),S2(L2)or 51,52
R1,S2(X2)or R1,52
R1,52(X2)or R1,52
R1, 52(X2)or R1 , 52

R1, 52 (X2)or R1, 52
R1, S2(X2)or R1, 52

51,12
R1, 52(X2)or R1, 52

R1 , 52(X2)or R1, 52
or 52

52
52
52
52

52
52
52
S2

RI,S2(X2 or RI,52
5I(Ll),52(L2)or 51,52
R1, 52(X2)or R1, 52
RI, 52(X2)or R1 , 52

51,12
R1, 52 (X2)or R1, 52

R1, S2(X2)or RI, 52
R1,S2(X2)or R1,52

Type of
Instruction

Instruction

Program Interruption
Possible
AS Ov P Op Other

Condition Code Set
01
10

00

11
Overflow
Overflow
Overflow
Overflow
Sum 0 CD

Sum=O
Sum=O
Data Sum=O
Sum=O
Sum=O@

SumO
Sum>O
Sum>O
Sum>O
Sum= 0<0

x

Sum=O®
B,C R
B,C R
B,C R
B,C R

Sum= O®
L
L
L
L

Sum=
M
M
M
M

x
x
x
x

C
C
C
C

R
R
R
R
J

L
L
L
L
K

M
M
M
M

P
P
P
P

J
J
J
N
N

K
K
K
N
N

N
N

N
N

RX
RR
RX
RR
RX, Ext.Mnemoni c

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

Branch
Branch
Branch
Branch
Branch

RX,Ext.Mnemonic
on High
on Index High
RX, Ext.Mnemonic
on Index Low or Equal RX, Ext.Mnemanic
RX,Ext.Mnemonic
on Low
if Mixed
RX, Ext.Mnemonic

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

Branch
Branch
Branch
Branch

on
on
on
on

Minus
Not Equal
Not High
Not Low

RX, Ext. Mnemonic
RX, Ext.Mnemonic
RX, Ext. Mnemonic
RX, Ext.Mnemonic

N
N
N
N

N
N
N
N

N
N
N
N

N
N
N
N

if Ones
Branch
Branch on Overflow

RX, Ext. Mnemoni c
RX,Ext.Mnemonic

N
N

N
N

N
N

N
N

Branch
Branch
Branch
Branch
Branch

RX, Ext. Mnemoni c
RX,Ext.Mnemonic
RX,Ext.Mnemonic
RX, Ext. Mnemonic
RR,Ext.Mnemonic

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

Z
Z
Data Z
Z
Z

AA
AA
AA
AA
AA

BB
BB
BB
BB
BB

Z
Z
Z
Z
Z

AA
AA
AA
AA
AA

BB
BB
BB
BB
BB

Z
Z
Data,F N
N

AA
AA

BB
BB
N
N

Add
Add
Add Decimal
Add Ha Ifword
Add Logical

RX
RR
SS,Decimal
RX
RX

x x F
F
o x
x
x x F
x x

Add
Add
Add
Add
Add

Logical
Normalized, Long
Normalized, Long
Normalized, Short
Normalized, g..ort

RR
RX, Floating Pt.
RR, Floating Pt.
RX, Floating Pt.
RR,Floating Pt.

x x
x
x x
x

E
E
E
E

x

Add
Add
Add
Add
Add

UnnormaHzed, Long
Unnormalized, Long
Unnormalized, Short
Unnormal ized, Short
Logical

RX, Floating Pt.
RR,Floating Pt.
RX,Floating Pt.
RR, Floating Pt.
RX

x x
x
x x
x
x x

E
E
E
E

And Logical
And Logical
And LogiGal Immediate
Branch and Link
Branch and Link

SS
RR
SI
RX
RR

x

x

x

x

Branch on
Branch on
Branch on
Branch on
Branch on

Condition
Condition
Count
Count
Equa I

on Plus
if Zeros
on Zero
Unconditional
Unconditional

Compare
Compare
Compare
Compare
Compare

Algebraic
Algebraic
Decimal
Halfword
Logical

RX
RR
SS,Decimal
RX
RX

x x

Compare Logical
Compare Logical
Compare Logical Immediate
Compare, Long
Compare, Long

RX
SS
SI
RX, Floating Pt.
RR, Floating Pt.

x x
x
x
x x
x x

Compare, Short
Compare, Short
Convert to Binary
Convert to Dec imal

RX, Floating Pt.
RR,Floating Pt.
RX
RX

x x
x
x x
x x

x

X
X

x
x x
x x

x

x
x
x
x

x

N
N

oCD

Sum 0
P
P
P
P

CD

N
N

Condition Code set (Add)

Appendix B

205

Instruction

Mnemonic
Operation
Code

Machine .
Operation
Code

Operand Format
Explicit

Implicit

Divide
Divide
Divide Decimal
Divide, Long
Divide, Long

D
DR
DP
DD
DDR

5D
lD
FD
6D
2D

RI, D2(X2, B2) or RI, D2(, B2)
Rl,R2
Dl, (L 1, Bl), D2(L2, B2)
Rl,D2(X2, B2),or Rl, [)2(, B2)
Rl,R2

Rl, S2(X2)

Divide, Short
Divide, 5hort
Edit
Edit and Mark
Exclusive Or

DE
DER
ED
EOMK
X

7D
3D
DE
OF
57

Rl,D2(X2,B2)or Rl,D2(,B2)
Rl,R2
Dl (L, Bl), D2(B2)
Dl (L, Bl), D2(B2)
Rl, D2(X2, B2) or Rl, D2(, B2)

Rl, S2(X2)

or Rl,52

51 (L), 52
51 (L), 52
Rl, S2(X2)

or 51,52
or 51,52
or Rl,52

Exclusive Or
Exclusive Or
Exclusive Or Immediate
Execute
Halve, Long

XC
XR
Xl
EX
HDR

D7
17
97
44
24

Dl (L, Bl), D2(B2)
Rl,R2
Dl(Bl),12
R1i D2(X2, B2) or Rl, D2(, B2)
Rl,R2

51 (L), 52

or 51,52

51,12
Rl, S2(X2)

Rl,52

Halve,5hort
Halt I/o
Insert Character
Insert 5torage Key
Load

HER
HIO
IC
15K
L

34
9E
43
09
58

Rl,R2
Dl (Bl)
R1, D2(X2, B2) or Rl, D2(, B2)
Rl,R2
Rl,D2(X2,.B2) or Rl,D2(,B2)

Rl,52(X2)

orRl,52

Rl, S2(X2)

or Rl ,52

Load
Load
Load
Load
Load

LR
LA
LTR
LTDR
LTER

18
41
12
22
32

Rl,R2
RI, D2(X2, B2) or Rl , D2(, B2)
Rl,R2
Rl,R2
Rl,R2

Rl,52(X2).

orRl,52

Load Complement
Load Complement, Long
Load Complement, 5hort
Load Ha Ifword
Load, Long

LCR
LCDR
LCER
LH
LD

13
23
33
48
68

Rl,R2
Rl,R2
Rl,R2
RI, D2(X2, B2) or Rl, D2(, B2)
RI, D2(X2, B2) or Rl, D2(, B2)

Rl, S2(X2)
R1, S2(X2)

or Rl,52
orRl,52

Load, Long
Load Multiple
Load Negative
Load' Negative, Long
Load Negative, 5hort

LDR
LM
LNR
LNDR
LNE.R

28
98
11
21
31

Rl,R2
R1, R3, D2(B2)
Rl,R2
Rl,R2
Rl,R2

Load Positive
Load Positive, Long
Load Positive, Short
Load P5W
Load, 5hort

LPR
LPDR
LPER
LPSW
LE

10
20
30
82
78

RliR2
Rl,R2
Rl,R2
Dl (Bl)
Rl, D2(X2, B2) or Rl, D2(, B2)

Rl, S2(X2)

Load', 5hort
Move Characters
Move Immediate
Move Numerics
Move with Offset

LER
MVC
MVI
MVN
MVO

38
D2
92
Dl
Fl

Rl,R2
Dl (L, Bl), D2(B2)
Dl(Bl),12
Dl (L, Bl), D2(B2)
Dl (L 1, Bl), D2(L2, 82)

51 (L), 52
or 51,52
51,12
51(L),52
or 51,52
51(Ll), S2(L2) or 51,52

Move Zones
Multiply
Multiply
Multiply Decimal
Mulitply Halfword

MVZ
M
MR
MP
MH

D3
5C
lC
FC
4C

Dl (L, Bl), D2(B2)
RI, D2(X2, B2)or R1, D2(, B2)
Rl,R2
Dl (L 1, B1), D2(L2, 82)
Rl,D2(X2,B2) or Rl,D2(,B2)

Mul tiply, Long
Multiply, Long
Multiply, 5hort
Multiply, 5hort
No Operation

MD
MDR
ME
MER
NOP

Address
and Test
and Test, Long
and Test, Short

6C
2C
7C
3C
47(BC 0)

Rl, D2(X2, B2) or Rl, D2(,B2)
Rl,R2
Rl,D2(X2,B2) or Rl,D2(,B2)
Rl,R2
D2(X2, B2) or D2(,82)

Operand Format (Divide)

206

S/360 BOS Assembler with I/O Macros

or Rl,52

51(Ll),S2(L2)or 51,52
Rl,S2(X2)
or Rl,52

Rl,R3,S2

51(L),52
Rl, S2(X2)

or Rl,52

or 51,52
orRl,52

51(Ll),S2(L2) or 51,52
orRl,52
Rl, S2(X2)
Rl, S2(X2)

or Rl,52

Rl, S2(X2)

orRl,52

52(X2)

or S2

Instruction

Type of
Instruction

Program Interruptions
Possible
A SOV P Op Other

Divide
Divide
Divide Decimal
Divide, Long
Divide, Long

RX
RR
SS, Decimal
RX,Floating Pt.
RR, Floating Pt.

x x
x
x x
x
x x E
x E

Divide, Short
Divide, Short
Edit
Edit and Mark
Exclusive Or

RX, Floating Pt.
RR, Floating Pt.
SS, Decimal
SS, Decimal
RX

x x E
x E
x
x
x
x
x x

Exclusive Or
Exclusive Or
Exclusive Or Immediate
Execute
Halve, Long

SS
RR
SI
RX
RR, Floating Pt.

x

x

x
x x
x

x

Halve, Short
Halt I/O
Ins~rt Character
Insert Storage Key
Load

RR, Floating Pt.
SI
RX
RR
RX

Load
Load
Load
Load
Load

RR
RX
RR
RR, Floating Pt.
RR, Floating Pt.

x
x

Load Complement
Load Complement, Long
Load Complement, Short
Load Halfword
Load, Long

RR
RR, Floating Pt.
RR, Floating Pt.
RX
RX, Floating Pt.

x
x
x x
x x

Load, Long
Load Multiple
Load Negative
Load Negative, Long
Load Negative, Short

RR, Floating Pt.
R5
RR
RR, Floating Pt.
RR,Floating Pt.

Load Positive
Load Positive, Long
Load Positive, Short
Load PSW
Load, s,ort

RR
RR,Floating Pt.
RR, Floating Pt.
51
RX, Floating Pt.

x
x
x x
x x

Load,
Move
Move
Move
Move

RR, Floating Pt.
5S
51
5S
55

x
x
x
x

x
x
x
x

Move Zones
Multiply
Multiply
Multiply Decimal
Multiply Halfword

55
RX
RR
55, Decimal
RX

x
x x
x
x x
x x

x

Multiply, Long
Multiply, Long
Multiply, s,ort
Multiply, Short
No Operation

RX, Floating Pt. x x E
RR, Floating Pt.
x E
RX, Floating Pt. x x E
RR, Floati ng Pt.
x E
RX, ExtMnemonic

Address
and Test
and Test, Long
and Test, Short

Short
Characters
Immediate
Numerics
with Offset

11

x
x
x

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

x
x
x
x

a,E
a,E
Data
Data

N
N
S
S
J

N
N
T
T
K

N
N
U
U

N
N

G
x
A

x
x x
x x

Condition Code Set
01
10

F
F
D,Data
a,E
a,E

x

x

00

x

A

x
x

J
K
K
J
J
1<
(May be set by this instruction)
N
N
N

N
DD
N
N
N

N
CC
N
N
N

N
N
J
R

N
N
L
L
L

P
R
R
N
N

L
L
L
N
N

M
M
M

0

N
N

N
N

N
N
L
L
L

N
N

N
N

R

F
x
x
x

N

N

GG
N
N
N
N
N

N
KK
N

N
N
N
N

M

M
M

x
x x

x

x
x

x
x

N
N
J
R
R
J
R
R

L
L

M
M
M

0

x
x

F

QQ

QQ

QQ

QQ

x

N

N

N

N

x

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

A

x

x

x

Data

x
x
x
x

a
a
a
a

Condition Code set (Divide)

APpendix B

207

Instruction

Mnemonic
Operation
Code

Machine
Operation
Code

Operand Format
Implicit

Explicit

No Operation
Or logical
Or logical
Or logical
Or logical Immediate
Pack

NOPR
0
OC
OR
01
PACK

07(BCR 0) R2
Rl, 02(X2, B2) or Rl, 02(, B2)
56
01 (l, 81), 02(B2)
06
Rl,R2
16
01 (Bl), 12
96
01 (ll ,81), 02(L2, B2)
F2

Read Direct
Set Program Mask
Set System Key
Set System Mask
Shift left Double Algebraic

ROO
SPM
SSK
SSM
SlOA

85
04
08
80
8F

01 (Bl), 12
Rl
Rl,R2
01 (Bl)
Rl,02(B2)

Sl
Rl, S2

Shift
Shift
Shift
Shift
Shift

SlOl
SlA
SLL
SROA
SROL

80
8B
89
8E
8C

Rl,02(B2)
Rl,02(B2)
Rl,02(B2)
Rl,02(B2)
Rl,02(B2)

Rl, S2
Rl, S2
R1,52
Rl,52
Rl,S2

Shift Right Single Algebraic
Shift Right Single Logical
Start I/o
Store
Store Character

SRA
SRL
SIO
ST
STC

8A
88
9C
50
42

Rl,02(B2)
Rl,02(B2)
01(Bl)
R1, 02(X2, B2) or Rl, 02(, B2)
R1, 02(X2, B2) or R1, 02(, B2

Rl,S2
Rl, S2
Sl
Rl, S2(X2)
Rl,02(X2)

Store Halfword
Store Long
Store Multiple
Store Short
Subtract

STH
STO
STM
STE
S

40
60
90
70
5B

R1, 02(X2, B2) or R1, 02(, B2)
R1, 02(X2, B2)
R1,R2,02(B2)
R1, 02(X2, B2) or Rl, 02(, B2)
R1,02(X2

R1,S2(X2)
R1, S2(X2)
Rl,R2,S2
Rl,S2(X2)
Rl,S2(X2)

Subtract
Subtract
Subtract
Subtract
Subtract

Decimal
Halfword
Logical
Logical

SR
SP
SH
Sl
SLR

1B
FB
4B
5F
IF

Rl,R2
01 (L 1,Bl), 02(L2, B2)
R1, 02(X2, B2) or R1 , 02(, B~)
R1, 02(X2, B2) or R1, 02(, B2)
R1,R2

Sl(11),S2(L2) or Sl,S2
R1, S2(X2)
or R1,S2
R1,S2(X2)
or R1,S2

Subtract
Subtract
Subtract
Subtract
Subtract

Normalized, Long
Normalized, Long
Normalized, Short
Normalized,
Unnormal ized, Long

SO
SOR
SE
SER
SW

6B
2B
7B
3B
6F

R1, 02(X2, B2) or Rl, 02(, B2)
R1,R2
R1, 02(X2, B2) or Rl, 02(, B2)
R1,R2
Rl,02(X2,B2) or Rl,02(,B2)

Subtract Unnorma Iized, Long
Subtract Unnorma Iized, Short
Subtract Unnormalized, Short
Supervisor Call
Test and Set

SWR
SU
SUR
SVC
TS

2F
7F
3F
OA
93

Rl,R2
R1, 02(X2, B2) or Rl, 02(, B2)
R1,R2
I
01 (B1)

Test Channel
Test I/O
Test Under Mask
Translate
Translate and Test

TCH
TIO
TM
TR
TRT

9F
90
91
DC
DO

01 (~1)
01 (Bl)
01(B1),12
01 (L, Bl), 02(B2)
01 (L, B1), 02(B2)

S1
Sl
S1,12
Sl(L),S2
S1 (l), S2

Unpack
Write Direct
Zero and Add Decimal

UNPK
WRO
ZAP

F3
84
F8

01 (11, B1), 02(L2, B2)
01 (B1), 12
01 (11 ,Bl), 02(L2, B2)

Sl (11), S2(L2)or S1, S2
Sl,12
S1(11),S2(L2)or S1,S2

left Double logical
left Single Algebraic
left Single Logical
Right Double Algebraic
Right Double logical

Operand Format {NO Operation)

208

S/360 BaS Assembler with I/O Macros

Rl,S2(X2)
Sl (l), S2

or Rl, S2
or Sl, S2

Sl,12
Sl (11), S2(L2) or Sl, S2
Sl,12

or R1, S2
or R1 , S2
orRl,S2
or Rl, S2
or Rl, S2
or R1, S2

Rl,S2(X2)

or R1,S2

R1, S2(X2)

or R1,S2

R1,S2(X2)

or Rl,S2

R1,S2(X2)

or R1,S2

S1

orSl, S2
orS1, S2

Type of
Instruction

Instruction
No Operation
Or Logical
Or Logical
Or Logical
Or Logical Immediate
Pack

RR, Ext.Mnemonic
RX
SS
RR
SI
SS

Read Direct
Set Program Mask
Set Storage Key
Set System Mask
Shift Left Double Algebraic

SI
RR
RR
SI
RS

Shift
Shift
Shift
Shift
Shift

RS
RS
RS
RS
RS

Left Double Logical
Left Single Algebraic
Left Single Logical
Right Double Algebraic
Right Double Logical

Program Interruptions
Possible
A- S Ov P Op Other
x x
x

x

x
x

x
x

x

x

x x
x
x F

RX
RX, Floating Pt.
RS
RX, Floating Pt.
RX

x x
x x

Subtract
Subtract
Subtract
Subtract
Subtract

Decimal
Halfword
Logical
Logical

RR
55, Decimal
RX
RX
RR

F
D x
x x F
x x

Subtract
Subtract
Subtract
Subtract
Subtract

Normarized, Long
Normalized, Long
Normalized, Short
Normalized, Short
Unnor~alized, Long

RX, Floating Pt.
RR, Floating Pt.
RX, Floating Pt.
RR,Floating Pt.
RX, Floating Pt.

x x
x
x x
x

Unpack
Write Direct
Zero and Add Decimal

SS
51
5S, Decimal

A
A

x
x

Store Hal fword
Store Long
Store Multiple
Store Short
Subtract

51
SI
51
SS
SS

x

F

RS
RS
SI
RX
RX

Test Channel
Test I/o
Test Under Mask
Translate
Translate and Test

A

x

Shift Right Single Algebraic
Shift Right Single Logical
Start I/o
Store
Store Character

Subtract Unnormalized, Long RR, Floating Pt.
Subtract Unnormalized, Short RX, Floating Pt.
Subtract Unnormalized, Short RR, Floating Pt.
Supervisor Call
RR
Test and Set
51

x

A
x x
x

x
x
x

x x
x x
x x F

x
x
x

x

E
E
E
E
x x E

x
x

x

X

x
X
X

x

x E

x

x x E
x E

x
x

x

Data

x

D x

x
x

N
J
J
J
J
N

N
K
K
K
K
N

N

N

N

N

N
RR
N
N
J

N
RR
N
N
L

N
RR
N
N
M

N
RR
N
N
0

N
J
N
J
N

N
L
N
L
N

N
M
N
M
N

N
0
N

J
N
MM
N
N

L
N
CC
N
N

M
N

N

EE

AA

N
N

N
N

N
N
N
N
V

N
N
N
N
X

N
N
N
N

N
N
N
N
0

V
V
V

X
X
X
W,H
W,H

Y
Y
Y

V,I
V,I

0
0
0
W,I
W,I

Y

N

L
L
L
L
L

M
M
M
M
M

Q
Q
Q
Q
Q

C
C
C

R
R
R
N
55

L
L
L
N

M
M
M
N

Q
Q
Q

TT

JJ
LL
UU
N
PP

II
CC
VV
N
NN

FF

HH
KK
WW
N

00

N
N
J

N
N
L

N
N
M

x

x

11

R
R
R
R
R

x

x
x

Condition Code Set
10
01

B,C
B,C
B,C
B,C
C

A
A
x
x
x

00

A
Data

EE

N

N

N
N
0

condition Code set (NO operation)

Appendix B

209

Program Interruptions Possible
Under Ov:

D = Decimal
E = Exponent
F = Fixed Point

Under Other:

A
B
C
D
E
F
G

Privileged Operation
Exponent Underflow
Significance
Decimal Divide
Floating Point Divide
Fixed Point Divide
Execute

Condition Code Set
H
I

J
K
L
M
N

o
P
Q

R
S
T
U
V
W
X
Y
Z
AA
BB
CC
DD
EE
FF
GG
HH
II

JJ
KK
LL
MM
NN

00
PP
QQ

RR
SS
TT
UU
W
WW

No Carry
Carry
Result = 0
Resu Itis Not Equa I to Zero
Result i$ Less Than Zero
Result is Greater Than Zero
Not Changed
Overflow
Result Exponent Underflows
Result Exponent Overflows
Result Fraction = 0
Result Field Equals Zero
Result Field is Less Than Zero
Result Field is Greater Than Zero
Difference = 0
Difference is Not Equal to Zero
Difference is Less Than Zero
Difference is Greater Than Zero
First Operand Equals Second Operand
First Operand is Less Than Second Operand
First Operand is Greater Than Second Operand
CSW Stored
Channel and Subchannel not Working
Channel or Subchannel Busy
Channel Operating in Burst Mode
Burst Operation Terminated
Channel Not Operational
Interruption Pending in Channel
Channel Available
Not Operational
Available
I/O Operation Initiated and Channel Pro.ceeding With its Execution
Nonzero Function Byte Found Before the First Operand Field is Exhausted
Last Function Byte is Nonzero
All Function Bytes Are Zero
Set According to Bits 34 and 35 of the NewPSW Loaded
Set According to Bits 2 and 3 of the Register Specified by Rl
Leftmost Bit of Byte Specified = 0
Leftmost Bit of Byte Specified =1
Selected Bits Are All Zeros; Mask is All Zeros
Selected Bits Are Mixed (:;teros and ones)
Selected Bits Are All Ones

Program Interruptions possible

210

5/360 BOS Assembler with I/O Macros

APPENDIX C:

ASSEMBLER-INSTRUCTIONS

Mnemonic

l@.ruLField

Operand·Field

CCW

An optional sy·mbol

Four operands, separated by commas

CNOP

blank

Two decimal terms, separated
by a comma

CSECT

An optional symbol

Not used; treated as a comment

DC

An optional symbol

One operand.

DROP

blank

One to five absolute
expressions, separated by commas

DS

An optional symbol

One operand

DSECT

A required symbol

Not used; treated as a comment

EJECT

blank

Not used; treated as a comment

END

blank

A relocatable expression or blank

ENTRY

blank

One relocatable symbol

EQU

A required symbol

An absolute or relocatable expression

EXTRN

blank

One relocatable symbol

ICTL

blank

une to three decimal values,
separated by commas

ISEQ

blank

Two decimal values, separated by a comma
or a blank

LTORG

an optional symbol

Not used; treated as a comment

ORG

blank

A relocatable expression or blank

PRINT

blank

One to three operands

PUNCH

blank

t to 80 characters
enclosed in single quotation marks

REPRO

blank

Not used; treated as a comment

SPACE

blank

A decimal term or blank

START

An optional symbol

A self-defininq term or blank

TITLE

0-4 characters

A sequence of characters,
enclosed in single quotation marks

USING

blank

An absolute or relocatable
expression followed by 1 to 5 absolute
expressions, separated by commas

XFR'

blank

A relocatable symbol

Appendix C

211

r-----.r-

,I

i

,

I

I

I

I

I

IFormatllnstruction Format
ICode
IShowing Bits

r-

IAssembler Operand- IApplicable
IField Format
I Instructions

ISee
I
INotesl

+---1

I

+_

I

I RR
1
I

lOp Code R' R2
I
I
8
4 4

IR1,R2
I
I

IAII RR instruc-11,6,
Itions except
18,9
I SPM and SVC
I

I

l-

I

1

I
I

IR1
I

ISPf1

I

I

I

I
I
'I

10~

Code R' R2
8
4
(4)

I

~-------------+--

I

lOp Code 1
I
8
8

II

lOp Code R1 X2 B2 D2
I
I
8
4
4 4
12

I
I

I
,I

t

I

ISVC

I

I
I
l-----f---------------+__

I
I

I
I
I.

I RX
I

IR1,D2(X2,B2}
I R 1, S2 (X2)

tALL RX
I instructions

11-4,
17, 9

1

I
I

1

1

I----f-------------+_
1 RS
I
I

10~

I

l-------------t_

1

lOp Code R' R3 B2 D2
I
1
8
4
(4) 4
12

I
1

I
I

Code R1 R3 B2 D2
8

4

4

4

12

I----fI S1
lOp Code 12
I
1

B1 D1

I

4

I

I
I

I

I--

I
1
I

10~

8

8

I R1, D2 (B2)
IR1,S2

8

(8)

~--f-

B1 D1

4

12

t

IBXH,BXLE,LM,
ISTM
I

+-

11-3,
17,8

I
I

I All shift
I instructions

I
1
I

I
+_

I
I

ID1(B1),I2
IS 1,12
1
1

IAII SI instruc-12,3,
Itions except
16-8
ILPSW,SSM,HIO,
I
ISIO,TIO,TCH,TS 1

+_
Code 12

1
I

12

IR1,R3,D2(B2}
IR1,R3,S2
I

ID1(B1}
IS1
I

+_

1

+-1- - - - 4

I

ILPSW,SSM,HIO,
I
ISIO,TIO,TCH,TS I
1
I

I

--~I~--~

I SS
I
I

lOp Code L1 L2 B1 D1 B2 D21D1 (L',B1) ,D2{L2,B2) IPACK,UNPK,MVO, 12,3,
I
IS1(L1),S2(L2)
IAP,CP,DP,MP,SP,15,7
I
8
4 4 4
12 4
12 I
I Z AP
~

I

~

I
lOp Code L
I
I
I
1
8
8
'--_-..1..-

212

+_
B1 D1 B2 D2ID1(L,B1),D2(B2)
IS1 (L) ,S2
4
12 4 121
-'--

S/360 BOS Assembler with 1/0 Macros

I

--+

I

INC,OC,XC,CLC,
I
IMVC,MVN,MVZ,TR, I
ITRT,ED,EDMK
I
I

I

Notes.for"Appendix-D:
1.
2.
3.
4.
5.
6.
7.
8.
9.

R1, R2, and R3 are absolute expressions that specify general or floating-point
registers.
The general register numbers are 0 through 15; floating-point register
numbers are 0, 2, 4, and 6.
Dl and D2 are absolute expressions that specify displacements.
A value of 0 - 4095
may be specified.
B1 and B2 are absolute expressions that specify base registers. Register numbers
are 0 - 15.
X2 is an absolute expression that specifies an index register.
Register numbers
are 0 - 15. If B2 is specified, X2 must not be omitted; and when indexing is not
desired,X2 must be specified as O.
L, L1, and L2 are absolute expressions that specify field lengths.
An L expression
can specify a value of , - 256.
L' and L2 expressions can specify a value of 1 16. In all cases, the assembled value will be one less than the specified "value.
I and I2 are absolute expressions that provide immediate data.
The value of the
expression may be 0 - 255.
51 and 52 are absolute or"relocatableexpressions that specify an address.
RR, RS, and 5I instruction fields whose bits are enclosed in parentheses are not
examined during instruction execution.
The fields are not written in the symbolic
operand, but are assembled as b~nary zeros.
R1 specifies a 4~bit mask in the Be and BCR machine instructions.

Appendix D

213

APPENDIX E:

HEXADECIMAL-DECIMAL NUMBER CONVERSIQN,TABLE

The table in this appendix provides for
direct conversion of decimal and
hexadecimal numbers in these ranges:

example, decimal number 123 has the hex
equivalent of 07B, and decimal 1478 has the
hex equivalent of 5C6.

Decimal

--r--~

000 to FFF

0000 to 4095

Deci!@1 numbers (0000-4095) are qiven
within the 8-part table.
The first two
characters (high-order) of h§xad§cimal
numbers (OOO-FFF) are given in the
left-hand column of the table, and the
third character is arranged across the top
of each part of the table.
Thus to find
the decimal equivalent of the hex number
OC9, look for OC in the left column, and
across under the column labeled 9.
The
decimal number is 0201.
To convert from decimal to hexadecimal,
look up the decimal number within the table
and read the hexadecimal number by a
combination of the hex characters to the
left and above the decimal number.
For

214

S/360 BOS Assembler with I/O Macros

For numbers outside the range of the table,
add the following values to the table
figures:
.
Hexad'ecimal
'000
2000
3000
40.00
5000
6000
7000
8000
9000
AOOO
BOOO
COOO
DOOO
EOOO
FOOO

Decimal
4096
8'92
12288
'6384
20480
24576
28672
32768
36864
40960
45056
49152
53248
57344
6'440

,

i

J
J
100
101
102
103
1
104
105
106
107

0

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

0000
00'6
0032
0048

000'
00'7
0033
0049

0002
0018
0034
0050

0003
00'9
0035
0051

0004
0020
0036
0052

0005
0021
0037
0053

0006
0022
0038
0054

0007
0023
0039
0055

0008
0024
0040
0056

0009
0025
0041
0057

0010
0026
0042
0058

0011
0027
0043
0059

0012
0028
0044
0060

0013
0029
0045
0061

0014
0030
0046
0062

0015
0031
0047
0063

0064
0080
0096
0112

0065
0081
0097
0113

C066
0082
0098
0114

0067
0083
0099
0115

0068
OC84
0.00
0116

0069
0085
0'01
0117

0070
OC86
0102
0118

0071
0087
0'03
0119

0072
0088
0104
0120

0073
0089
0'05
0121

0074
0090
0106
0122

0075
0091
0'07
0123

0076
0092
0'08
0124

0077
0093
0109
0125

0078
0094
0"0
0126

0079
0095
0'"
0127

0128
0'44
0160
0.76

0129
0.45
0'61
0'77

0130
0'46
0162
0178

0131
0'47
0163
017'9

01"32
0148
0164
0.80

0133
0149
0165
018'

0134
0150
0166
0'82

0135
0151
0167
0'83

0136
0'52
0168
0184

0137
0153
0169
·0185

0138
0154
0170
0.86

0139
0155
0171
0187

0140
0156
0172
0'.88

0141
0'57
0173
0'89

0142
0'58
0174
0190

0143
0159
0175
0191

0192
0208
0224
0240

0193
0209
0225
024'

0'94
02'0
0226
0242

0'95
02"
0227
0243

0.96
02.2
0228
0244

0'97
0213
0229
0245

0198
0214
0230
0246

0199
02'5
0231
0247

0200
0216
0232
0248

0201
0217
0233
0249

0202
0218
0234
0250

0203
02'9
0235
025'

0204
0220
0236
0252

0205
022'
0237
0253

'0206
0222
0238
0254

0207
0223
0239
0255

110
'11
12
13

0256
0272
0288
0304

0257
0273
0289
0305

0258
0274
0290
0306

0259
0275
029'
0307

0260
0276
0292
0308

026'
0277
0293
0309

0262
0278
0294
0310

0263
0279
0295
0311

0264
0280
0296
0312

0265
0281
0297
0313

0266
0282
0298
0314

0267
0283
0299
0315

0268
0284
0300
0316

0269
0285
0301
0317

0270
0286
0302
0318

0271
0287
0303
0319

14
.5
16
.7

0320
0336
0352
0368

0321
0:337
0353
0369

0322
0338
0354
0370

0323
0339
0355
0371

0324
0340
0356·
0372

0325
034'
0357
0373

0326
0342
0358
0374'

0327
0343
0359
0375

0328
03'44
0360
0376

0329
0345
0361
0377

0.330
0346
0362
0378

0331
0347
0363
0379

0332
0348
0364
0380

0333
0349
0365
0381

0334
0350
0366
0382

0335
035'
0367
0383

.8
19
lA
lB

0384
0400
0416
0432

0385
0401
0417
0433

0386
0402
04'8
04.34

0387
0403
04'9
0435

0388
0404
0420
0436·

0389
0405
042'
0437

0390
0406
0422
0438

0391
0407
0423
0439

0392
0408
0424
0440

0393
0409
0425
0441

0394
0410
0426
0442

0395
0411
0427
0443

0396
0412
0428
0444

0397
0413
0429
0445

0398, 0399
0414 0415
0430 0431
0446'0447

11C
11D
I1E
11F

0448
0464
0480
0496

0449 0450 0451 0452
0465 0466 0467 0468
0481 0482 '0483 0484
OU97 0498 0499 0500

0453
0469
0485
0501

0454
.. 0470
0486
C502

0455
'0471
0487
0503

0456
0472
0488
0504

0457
0473
0489
0505

0458
0474
0490
0506

0459
0475
0491
0507

0460
0476
0492
0508

0461
0477
0493
0509

0462
0478
0494
0510

I
J08
109
lOA
lOB

I

10C
10D
10E
10F

I

~

I
I

0463
0479
0495
0511

I

Appendix E

215

,..--,.-I
1 0

J--+--

I

2

3

4

5

6

7

8

9

A

B

C

D

E

F

0523
0539
0555
0571

0524
0540
0556
0572

0525
0541
0557
0573

120
121
122
123
·1
124
125
126
27

0512
0528
0544
05.60

0513
0529
0545
0561

0514
0530
0546
05 62

0515
0531
0547
0563

0516
0532
0548
0564

0517
0533
0549
0565

C518
0534
0550
0566

0519
0535
0551
Q567

0520
0536
0552
0568

0521
0537
0553
0569

0522
0538
0554
0570

0526
0542
0558
0574

0527
0543
0559
0575

0576
0592
0608
0624

0577
0593
0609
0625

0578
0594
0610
0626

0579
0595
0611
0627

0580
0596
0612
0628

0581
0597
0613
0629

0582
0598
0614
0630

0583
0599
0615
0631

0584
0600
0616
0632

0585
0601
0617
0633

0586 0587 0588 0589 0590
0602 060~ 0604 0605 0606
0618 0619 0620 0621 0622
0634 0635 0636 0637 0638

0591
0607
0623
0639

28
29
2A
2B

0640
06516
0672
0688

0641
0657
0673
0689

0642
0658
0674
0690

0643
0659
0675
0691

0644
0660
0676
0692

0645
0661
0677
0693

0646
0662
0678
0694

0647
0663
0679
0695

0648
0664
0680
0696

0649
0665
0681
0697

0650
0666
0682
0698

0651
0667
0683
0699

0652
0668
0684
0700

0653
0669
0685
0701

0654
0670
0686
0702

0655
0671
0687
0703

2C
2D
2E
2F

0704
0720
0736
0752

0705·
0721
0737
0753

0706
0722
0738
0754

0707
0723
0739
0755

0708
0724
0740
C756

0709
0725
0741
0757

0710
0726
0742
0758

0711
0727
0743
0759

0712
0728
0744
0760

0713
0729
0745
0761

0714
0730
0746
0762

0715
0731
0747
0763

0716
0732
0148
0764

0717
0733
0749
0765

0718
0734
0750
0766

0719
0735
0751
0767

130
131
132
133
1
134
135
136
137
1
138
139
13A
13B
I
13C
13D
J3E
13F

0768
0784
0800
0816

0769
0785
0801
0817

0770
0786
0802
0818

0771
0787
0803
0819

0772
0788
0804
0820

0773
0789
0805
0821

0774
0790
0806
0822

0175
0791
0807
0823

0776
0792
0808
0824

0777
0193
0809
0825

0778
0194
0810
0826

0779
0795
0811
0827

0780
0796
0812
0828

0781
0797
0813
0829

0782
0798
0814
0830

0783
0799
0815
0831

0832
0848
0864
0880

0833
0849
0865
0881

0834
0850
0866
0882

0835
0851
0867
0883

0836
0852
0868
0884

0837
0853
0869
0885

0838
0854
0870
0886

0839
0855
0871
0887

0840
0856
0872
0888

0841
0857
0873
0889

0842
0858
0874
0890

0843
0859
0815
0891

0844
0860
0876
0892

0845
0861
0877
0893

0846
0862
0818
0894

0847
0863
0879
0895

0896
0912
0928
0944

0897
0913
0929
0945

0898
0914
0930
0946

0899
0915
0931
0947

0900
0916
0932
0948

0901
0917
0933
0949

0902
0918
0934
0950

0903
09'9
0935
0951

0904
0920
0936
0952

0905
0921
0937
0953

0906
0922
0938
0954

0907
0923
0939
0955

0908
0924
0940
0956

0909
0925
0941
0957

0910
0926
0942
0958

09i1
0927
0943
0959

0960
0976
0992
1008

096'
0977
0993
1009

0962
0978
0994
1010

0963
0979
0995
10' ,

0964
0980
0996
1012

0965
0981
0997
1013

0966
0982
0998
1014

0967
0983
0999
1015

0968
0984
1000
;016

0969
0985
1001
'0'7

0970
0986
1002
1018

0971
0987
1003
1019

0972
0988
1004
1020

0973
0989
1005
1021

0974
0990
1006
1022

0975
0991
1007
1023

'-_..L-

216

1

5/360 BOS Assembler with I/O Macros

1
-f

,

rJ

0

I

1

2

3

4

5

6

7

8

9

A

B

C

E

D

F

1

I

.024
1040
1056
, 072

'025
104'
1057
1073

1026
.042
1058
'074

'027
'043
1059
1075

1028
'044
1060
'076

1029
1045
-1061
'077

'030
.046
1062
1078

'031
1047
1063
1079

'032
1048
1064
'080

1033
1049
1065
1081

1034
1050
1066
1082

1035
1051
1067
.083

1036
.052
1068
'084

1037
'053
1069
1085

1038
'054
1070
1086

1039
1055
1071
1087

'088
1104
, '20
1136

'089
1105
, 121
1137

'090
1106
'122
1138

'091
1107
"23
1139

1092
1108
1124
1140

'093
1109
'125
1141

1094
1110
1126
1142

1095
1111
"271143

1096
1112
1128
1144

1097
1113
"29
1145

1098
1114
"30
1146

1099
1115
'131
1147

" 00
1116
"32
1148

, '01
1117
"33
1149

1102
1118
1134
1150

1103
1119
1135
1151

1152
"68
1184
I '200

1,.53
"69
1185
1201

1154
1170
1186
1202

1155
117'
1187
'203

1156
1172
1188
'204

1157
1173
1189
1205

1158
',74
1190
1206

1159
1175
1191
1207

1160
1176
1192
1208

1161
1177
1193
'209

1162
1178
1194
'210

1163
1179
1195
121 1

1164
"80
1196
'2'2

1165
1181
1197
'2'3

1166
1182
1198
1214

1167
1'83
1199
1215

140
141
142
143
1
144
145
146
147
1
148
149
14A
14B
1
14C
14D
14E
14F

1 '232 1233 '234 1235 .236 '237 1238 '239- 1240 '241 1242 1243 1244 .245 1246 1247
I 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263
1 '264 1265 1266 '267 1268 1269 '270 '271 1272 1273 1274 1275 1276 1277 '278 1279

I

I

J

J

I '216 '217 12'8 12'9 1220 122' 1222 '223 1224 1225 1226 1227 1228 1229 1230 1231

150 I '280 128' .282
J51 J 1296 1297 1298
152 I '312 13'3 1314
1328 1329 1330
153

'283
1299
1315
1331

1284
1300
'316
1332

'285
1301
13'7
1333

1286
1302
1318
1334

1287
1303
1319
1335

1288
1304
'320
-1336

1289
1305
'321
1337

.290
1306
'322
1338

1291
1307
'323
1339

1292
1308
1324
1340

1293
1309
'325
1341

1294
-1310
1326
1342

1295
1311
1327
1343

I
154
155
156
57

1344
1360
1376
1392

1345
1361
1377
1393

1346
1362
1378
1394

1347
.363
1379
1395

1348
1364
1380
'396

1349
1365
1381
'397

1350
.366
1382
'398

1351
1367
1383
'399

1352
1368
1384
1400

1353
'369
1385
1401

1354
1370
1386
'402

1355
1371
1387
_. 403

1356
'372
1388
1404

1357
1373
1389
1405

1358
1374
1390
'406

1359
1375
1391
1407

58
59
SA
5B

1408
1424
1440
1 ~ 56

1409
1425
'441
1457

'4'0
1426
1442
1458

1411
1427
1443
1459

'4'2
1428
'444
1460

1413
1429
1445
1461

'414
1430
1446
1462

'4'5
1431
'447
1463

14'6
1432
1448
1464

1417
1433
'449
1465

14'8
1434
1450
1466

'419
1435
'45'
1467

1420
1436
'452
1468

'421
1437
1453
1469

'422
1438
'454
1470

1423
1439
1455
1471

5C
5D
5E
SF

1472
14 88~
1504
1520

147-3
1489
'505
1521

1474
1490
'506
1522

1475
1491
'507
1523

1476
1492
1508
'524

1477
1493
1509
1525

1478
1494
1510
1526

1479
1495
15.'
1527

1480
1496
15'2
1528

'481
1497
1513
1529

1.482
1498
1514
1530

-1483
1499
1515
1531

1484
1500
15'6
1532

1485
1501
'517
'533

1486
1502
15'8
1534

1487
1503
'519
1535

Appendix E

217

I

I
160
16'
162
163

I
164
165
166
167
168
169
16A
16B
1
16C
16D
16E
16F
1
(70

17'

172
173
1
174
175
176
177
1
178
179
117A
I7B

I
I7C
17D
17E
I7F

2

3

4

5

6

7

8

9

A

B

C

D

E

F

1536
1552
1568
1584

1537
1553
1569
1585

1538
1554
1570
1586

1539
1555
1571
1587

1540
1556
1572
1588

1541
1557
1573
1589

1542
1558
1574
1590

1543
1559
1575
1591

1544
1560
1576
1592

1545
1561
1577
1593

1546
1562
1578
1594

1547
1563
1579
1595

'548
1564
1580
1596

1549
1565
158'
1597

1550 ~551
1566 1567
1582 1583
1598 1599

1600
1616
1632
1648

1601
1617
1633
1649

1602
16'8
16.34
1650

1603
1£19
1635
1651

1604
162P
1636
1652

1605
1621
1637
1653

1606
1622
1638
1654

1607
1623
1639
'655

1608
1624
1640
1656

1609
1625
1641
1657

1610
1626
1642
1658

1611
1627
1643
1659

1612
1628
1644
1660

1613
1629
1645
1661

1614
1630
1646
1662

1615
1631
1647
1663

'664
1680
1696
1712

1665
1681
'697
1713

1666
1682
1698
1714

'667
1683
'699
1715

1668
1684
1700
171G

1669
1685
1701
1717

1670
1686
1702
1718

1671
1687
'703
1719

1672
1688
1704
1720

1673
1689
1705
1721

1674
1690
1706
1722

1675
1691
1707
1723

1676
1692
1708
1724

1677
1693
1709
1725

1678
1694
1710
1726

'679
1695
17'1
1727

1728
1744
1760
1776

1729
1745
1761
1777

1730
1746
1762
1778

1731
1747
'763
1779

1732
1748
1764
1780

17.33
1749
1765
1781

1734
1750
1766
1782

1735
1751
1767
1783

1736
1752
1768
1784

'737
1753
,769
1785

1738
1754·
1770
1786

'739
1755
177'
1787

1740
1756
'772
1788

1741
1757
1773
1789

1742
1758
'774
1790

1743
1759
'775
1791

1792
'808
1824
1840

1793
l809
1825
184'

1794
'810
1826
1842

1795
18'1
1827
1843

1796
18'2
1828
1844

1797
18'3
1829
'845

1798
1814
1830
1846

1799
1815
1831
'847

1800
18Hi
1832
1-848

1801
1817
1833
1849

1802
'818
1834
1850

1803
'819
1835
185.

1804
1820
1836
'852

1805
1821
1837
1853

1806
1822
1838
1854

1807
1823
1839
1855

1856
1872
'888
1904

1857
1873
'889
1905

'858
1874
1890
1906

1859
1875
1891
1907

1860
1876
1892
1908

1861
1877
1893
1909

'862
1878
1894
1910

1863
1879
1895
1911

1864
1880
'896
1912

'865
1881
'897
1913

1866
1882
1898
1914

1867
1883
1899
1915

1868
1884
'900
1916

'869
1885
1901
1917

'870
1886
'902
1918

'871
1887
1903
1919

1920
1936
1952
'968

1921
1937
1953
1969

1922
1938
1954
1970

1923
'939
1955
1971

1924
1940
1956
1972

1925
194'
1957
1973

1926
'942
1958
1974

1927
1943
1959
1975

1928
1944
1960
'976

1929
1945
1961
1977

1930
1946
1962
'978

1931
1947
1963
1979

1932
1948
1964
1980

1933
'949
1965
'981

1934
1950
1966
1982

1935
'951
1967
1983

.984
2000
2016
2032

'985
2001
2017
2033

1986
2002
2018
2034

1987
2003
2019
2035

1988
2C04
2020
2036

1989
2005
2021
2037

1990
2006
2022
2038

'991
2007
2023
2039

1992
2008
2024
2040

1<)93
2009
2025
2041

1994
20'0
2026
2042

1995
20'1
2027
2043

1996
2012
2028
2044

1997
2013
2029
2045

1998
20'4
2030
2046

1999
20'5
2031
2047

I

L--~

218

,
i

0

1

5/360 BOS Assembler with I/O Macros

1

1
1

I
I
I
I

i

180
181
182
183

,

i

I
I
1--1

0

I
188
189
18A
18B

I
18C
18D
18E
18F

I
190
191
192
193

I
194
195
196
197

I
198
199
19A
19B

I
19C
19D
19E
19F

3

4

5

6

7

8

9

A

B

C

D

E

F

2048
2064
2080
2096

2049
2065
2081
2091

2050
2066
2082
2098

2051
2067
2083
2099

2052
2068
2084
2'00

2053
2069
2085
2'0'

2054
2070
2086
2102

2055
207.
2087
2'03

2056
2072
2088
2.04

2057
2073
2089
2105

2058
2074
2090
2.06

2059
2075
2091
2107

2060
2076
2092
2.08

2061
2077
2093
2.09

2062
2078
2094
21'0

2063
2079
2095
2"1

2' '2
2128
2'44
2160

2113
2129
2'45
2161

2"4
2130
2146
2162

2115
2131
2147
2163

21'6
2132
2'48
2164

2"7
2133
2'49
2165

2'18
2134
2150
2166

2119
2135
2151
2167

2120
2136
2152
2168

2121
2137
2153
2169

2122
2138
2'54
2170

2'23
2139
2155
2171

2124
2140
2'56
2172

2'25
2141
2157
2173

2'26
2142
2158
2174

2127
2143
2159
2175

2176
2,92
2208
2224

2177
2193"
2209
2225

2178
2194
2210
2226

2179
2195
2211
2227

2180
2196
2212
2228

218,.
2197
2213
2229"

2182
2198
2214
2230

2183
2'99
2215
223'

2184
2200
2216
2232

2185
220'
2217
2233

2186
2202
2218
2234

2187
2203
2219
2235

2188
2204
2220
2236

2189
2205
2221
2237

2190
2206
2222
2238

2191
2207
2223
2239

2240
2256
2272
2288

224'
2257
2273
2289

2242
2258
2274
2290

2243
2259
2275
2291

2244
2260
2276
2292

2245
2261
2277
2293

2246
2262
2278
2294

2247
2263
2279
2295

2248
2264
2280
2296

2249
2265
2281
2297

2250
2266
2282
2298

2251
2267
2283
2299

2252
2268
2284
2300

2253
2269
2285
2301

2254
2270
2286
2302

2255
2271
2287
2303

2304
2320
2336
2352

2305
2321
2337
2353

2306
2322
2338
2354

2307
2323
2339
2355

2308
2324
2340
2356

2309
2325
2341
2357

23'0
2326
2342
2358

231'
2327
2343
2359

2312
2328
2344
2360

23'3
2329
2345
2361

2314
2330
2346
2362

2315
2331
2347
2363

2316
2332
2348
2364

2317
2333
2349
2365

2318
2334
2350
2366

23'9
2335
2351
2367

2368
2384
2400
24'6

2369
2385
2401
24.7

2370
2386
2402
2418

2371
2387
2403
2419

2372
2388
2404
2#20

2373
2389
2405
2421

2374
2390
2406
2422

2375
2391
2407
2423

2376
2392
2408
2424

2377
2393
2409
2425

2378
2394
2410
2426

2379
2395
2411
2427

2380
2396
2412
2428

2381
2397
2413
2429

2382
2398
2414
2430

2383
2399
2415
2431

2432
2448
2464
2480

2433
2449
2465
2481

2434
2450
2466
2482

2435
2451
2467
2483

2436
2452
2468
2484

2437
2453
2469
2485

2438
24"54
2470
2486

2439
2455
2471
2487

2440
2456
2472
2488

244'
2457
2473
2"89

2442
2458
2474
2490

2443
2459
2475
2491

2444
2460
2476
2492

2445
2461
2477
2493

2446
2462
2478
2494

2447
2463
2479
2495

2496
2512
2528
2544

2497
2513
2529
2545

2498
2514
2530
2546

2499
2515
2531
2547

2500
2516
2532
254S

2501
2517
2533
2549

2502
2518
2534
2550

2503
2519
2535
2551,

2504
2520
2536
2552

2505
2521
2537
2553

2506
2522
2538
2554

2507
2523
2539
2555

2508
2524
2540
2556

2509
2525
2541
2557

25'0
2526
2542
2558

25 "
2527
2543
2559

I

184
185
186
187

2

Appendix E

I
I

219

•
I

I

lAO
IA 1
IA2
IA3

I

IA4
IA5
IA6
IA7
I
IA8
IA9 I
IAA'
lAB
I
lAC
lAD
IAE
IAF
I
IBO
IB 1
IB2
IB3
I
IB4
jB5
IB6
IB7
I
lB8
IB9
IBA
IBB
I
IBe
IBD
IBE
IBF

0

2

3

4

5

6

8

9

A

B

C

D

E

F

2560
2576
25'_92
2608

2561
2577
2593
2609

2562
2578
2594
2610

2563
2579
2595
2611

2564
2580
2596
2612

2565
2581
2597
2613

2566
2582
2598
2614

2567
2583
"2599
2615

2568
2584
2600
2616

2569
2585
260'
2617

2570
2586
2602
2618

2571
2587
2603
2619

2572
2588
2604
2620

2573
2589
2605
2621

2574
2590
2606
2622

2575
2591
2607
2623

2624
2640
2656
2672

2625
2641
2657
2673

2626
2642
2658
2674

2627
2643
2659
2675

2628
2644
2660
2676

2629
2645
2661
2677

2630
2646
2662
2678

2631
2647
2663
2679

2632
2648
2664
2680

2633
2649
2665
2681

2634
2650
2666
2682

2635
2651
2667
2683

2636
2652
2668
2684

2637
2653
2669
2685

2638
2654
2670
2686

2639
2655
2671
2687

2688
2704
2720
2736

2,689
2705
272'
2737

2690
2706
2722
2738

2691
2707
2723
2739

2692
2708
2724
2740

2693
2709
2725
2741

2694
2710
2726
2742

2695
2711
2727
2743

2696
2712
2728
2744

2697
2713
2729
2745

2698
2714
2730
2746

269-9
2715
2731
2747

2700
2716
2732
2748

2701
2717.
2733
2749

2702
2718
2734
2750

2703
2719
2735
2751

2752
2768
2784
2800

2753
2769
2785
2801

2754
2770
2786
2802

2755
2771
2787
2803

2756 2757
2772 2773
2788· 2789
2804 2805

2758
2774
2790
2806

2759
2775
279'
2807

2760
2776
2792
2808

2761
2777
2793
2809

2762
2778
2794
2810

2763
2779
2795
2811

2764
2780
2796
2812

2765
2781
2797
2813

2766
2782
2798
2814

2767
·2783
2799
2815

2816
2832
2848
2864

2817
2833
2849
2865

2818
2834
2850
2866

2819
2835
2851
2867

2820 2821 2822 2823 2824
2836 283~ 2838 2839 2840
2852 2853 2854 2855 2856
2868 2869 2870 2871 2872

2825
2841
2857
2873

2826
2842
2858
2874

2827
2843
2859
2875

2828
2844
2860
2876

2829
2845
2861
2877

2830
2846
2862
2878

2831
2847
2863
2879

2880
2896
2912
2928

2881
2897
2913
2929

2882
2898
2914
2930

2883
2899
2915
2931

2884
2900
2916
2932

2885
2901
2917
2933

2886
2902
2918
2934

2887
2903
2919
2935

2888
2904
2920
2936

2889
2905
2921
2937

2890
2906
2922
2938

2891
2907
2923
2939

2892
2908
2924
2940

2893
2909
2925
2941

2894
29'0
2926
2942

2895
2911
2927
2943

2944
29€0
2976
2992

2945
29-61
2977
2993

2946
2962
2'978
2994

2947
2963
2979
2995

2948
2964
2980
2996

2949
2965
2981
2997

2950
2966
2982
2998

2951
2967
2983
2999

2952
2968
2984
30'00

2953
2969
2985
3001

2954
2970
2986
3002

2955
2971
2987
3003

2956
2972
2988
3004

2957
2973
2989
3005

2958
2974
2:990
3006

2959
2975
2991
3007

3008
3024
3040
3056

300'9
3025
3041
3057

30'0
3026
3042
3058

30"
3027
3043
3059

30'2
3028
3044
3060

30'3
3029
3045
3061

30'4
3030
3046
3062

30'5
3031
3047
3063

30'6
3032
3048
3064

3017
3033
3049
3065

30'8
3034
3050
3066

3019
3035
3051
3067

3020
3036
3052
3068

3021
3037
3053
3069

3022
3038
3054
·3070

3023
3039
3055
3071

'--J.--

220

"7

S/360 BOS Assembler with I/O Macros

j

Ii

I

I

,
0

I---+-ICO
IC 1
IC2
IC3
I
IC4
IC5
IC6
IC7
I
IC8
IC9
ICA
ICB
I
.ICC
ICD
ICE
jCF
I
IDO
ID 1
(D2
(D3
I
ID'4
ID5
ID6
(D7
I
ID8
ID9
IDA
(DB
I
IDC
IDD
,IDE
IDF

3072
3088
3104
3120

2
3073
3089
3105
3121

3

5

6

7

8

9

A

B

C

D

E

F

3076
3092
3108
3124

3077
3093
3109
3125

3078
3094
3' '0
3126

3079
3095
31 l'
3127

3080
3096
3112
3128

3081
3097
3113
3129

3082
3098
3114
3130

3083
3099
3' .5
3131

3084
3100
3"6
3132

3085
3101
3117
3133

3086
3102
3118
3134

3087
3103
3119
3135

3136 3137 3138 3139 3140
3'52 3'53 3154 3155 3156
3168 ~169 3170 3171 3172
3184 3'85 3'86 3'87 3188

3141
3157
3173
3189

3142
3158
3174
3190

3143
3159
3175
3'9'

3144
3'60
3176
3'92

3145
3'61
3177
3'93

3146
3162
3178
3194

3147
3163
3179
3195

3148
3'64
3180
3196

3149
3165
3181
3'97

3150
3166
3182
3198

3151
3167
3183
3199

3200
.3216
3232
3248

3201
3217
3233
3249

3202
3218
3234
3250

3203
3219
3235
3251

3204
3220
3236
3252

3205
3221
3237
3253

3206
3222
3238
3254

3207
3223
3239
3255

3208
32'24
3240
3256

3209
3225
3241
3257

3210
3226
3242
3258

3211
3227
3243
3259

3212
3228
3244
3260

3213
3229
3245
3261

3214
3230
3246
3262

3215
3231
3247
3263

3264
3280
3296
3312

3265
3281
3297
3313

3266
3282
3298
3314

3267
3283
3299
3315

3268
3284
3300
3316

3269
3285
330'
3317

3270
3286
3302
3318

3271
3287
3303
3319

3272
3288
3304
3320

3273
3289
3305
3321

3274
3290
3306
3322

3275
3291
3307
3323

3276
3292
3308
3324

3277
3293
3309
3325

3278
3294
33'0
3326

3279
3295
3311
3327

3328
3344
3360
3376

3329
3345
3361
3377

3330
3346
3362
3378

3331
3347
3363
3379

3332
3348
3364
3380

3333
3349
3365
3381

3334
3350
3366
3382

3335
335'
3367
3383

3336
3352
3368
3384

3337
3353
3369
3385

3338
3354
3370
3386

3339
3355
3371
3387

3340
3356
3372
3388

3341 3342 3343
3357 -33~8 3359
3373 3374 3375
3389 3390 3391

3392
3408
3424
3440

3393
3409
3#25
344'

3394
3410
3426
3442

3395 3396 3397 3398 3399
34', 34~2 3413 3414 3415
3427 3428 3429 3430 3431
3443 3U44 3445 3446 3447

3400
34'6
3432
3448

3401
3417
3433
3449

3402
3418
3434
3450

3403
34'9
3f.U5
345'

3404
3420
3436
3452

3405
342'
3437
3453

3406
3422
3438
3454

3407
3423
3439
3455

3456
3472
3488
3504

3457
3473
3489
3505

3458 3459 3460
3474 3475 3476
34QO 3491 3492
3506 3507 3508

3464
3480
3496
35.12

3465
3481
3497
3513

3466
3482
3498
3514

3467
3483
3499
3515

3468
3484
3500
3516

3469
3485
3501
3517

3470
3486
3502
3518

3471
3487
3503
3519

3520
3536
3552
3568

3521
3537
3553
3569

3522
3538
3554
3570

3524 3525 3526 3527 3528
3540 35~1 3542 3543 3544
3556 3557 3558 3559 3560
3572 3573 3574 3575 3576

3529
3545
3561
3577

3530
3546
3562
3578

3531
3547
3563
3579

3532
3548
3564
3580

3533
3549
3565
3581

3534
3550
-3566
3582

3535
3551
3567
3583

3074
3090
3106
3122

3075
3091
3107
3123

4

3523
3539
3555
3571

3461
3477
3,493
3509

3462
3478
3494
3010

3463
3479
3495
3511

I

-i

L-..L--

Appendix E

221

i

I

I

I

i

0

I--+--

3584
3600
36'6
3632

IE4
IE5
IE6
IE7
I
IE8
IE9
lEA
IEB
I
IEC
lED
lEE
IEF
I
IFO
IF 1
IF2
IF3
I
IF4
IF5
IF6
IF7
I
IF8
IF9
IFA
IFB
I
IFC
IFD
IFE
IFF

3585
3601
3617
3633

3586
3602
3618
3634

3
3587
3603
36'9
3635

4

5

6

8

9

A

B

C

D

E

F

3589
3605
3621
3637

3590
3606
3622
3638

3591
3607
3623
3639

3592
3608
3624
3640

3593
3609
3625
3641

3594
3610
3626
3'642

3595
3611
3627
3643

3596
3612
3628
3644

3597
3613
3629
3645

3598
3614
3630
3646

3599
3615
3631
3647

3648 3649 3650 3651 3652
3664 3665 3666 3667 3668
.3680 3681 3682 3683 3684
3696 ~697 3698 3699 3700

3653
3669
3685
370 ~

3654
3670
3686
3702

3655
3671
3687
3703

3656
3672
3688
3704

3657
3673
3689
3705

3658
3674
3690
3706

3659
3675
3691
370'7

3660
3676
3692
3708

3661
36"77
3693
3709

3662
3678
3694
3710

3663
3679
3695
37"

3712
3728
3744
3760

3713
3729
3745
3761

3714
3730
3746
3762

37'5
3731
3747
3763

3716
3732
3748
3764

3717
3733
3749
3765

3718
3734
3750
3766

3719
3735
3751
3767

3720
3736
3752
3768

3721
3737
3753
3769

3722
3738
3754
3770

3723
3739
3755
3771

3724
3740
3756
3772

3725
3741
3757
3773

3726
3742
3758
3774

3727
3743
3759
3775

3776. 3777
3792 3793
3808 3809
3824 3825

3778
3794
3810
3826

3779
3795
3811
3827

3780
3796
3812
3828

3781
3797
3813
3829

3782
3798
3814
3830

3783
3799
3815
3831

3784
3800
3816
3832

378.5
3801
3817
3833

3786
3802
3818
3834

3787
3803
38q9
3835

3788
3804
3820
3836

3789
3805
3821
3837

3790
3806
3822
3838

3791
3807
3823
3839

3840
3856
3872
3888

3841
3857
3873
3889

3842
3858
3874
3890

3843
3859
3875
3891

3844
3860
3876
3892

3845
3861
3877
3893

3846
3862
3878
38'94

3847
3863
3879
3895

3848
3864
3880
3896

3849
3865
3881
3897

3850
3866
3882
3898

3851
3867
3883
38'99

3852 3853 3854 3855
3868 3869 3870 387q
3884 3885 3886 3887
3900 390~ 3902 3903

3904
3920
3936
3952

3905
3921
3937
3953

3906
3922
3938
3954

3907
392.3
3939
3955

3908
3924
3940
3956

3909
3925
3941
3957

3910
3926
3942
3958

3911
3927
3943
3959

3912
3928
3944
3960

3913
3929
3945
3961

3914
3930
3946
3962

3915
3931
3947
3963

3916
3932
3948
3964

3917
3933
3949
3965

3918
3934
3950
3966

3919
3935
3951
3967

3968
3984
4000
4016

3969
3985
4001
4017

3970
3986
4002
4018

3971 3972 3973 3974 3975
3987 3~88 3989 3990 3991
4003 4004 4005 4006 4007
4019 4020 4021 4022 4023

3976
3992
4008
4024

3977
3993
4009
4025

3978
3994
4010
4026

3979
3995
4011
4027

3980
3996
4012
4028

3981
3997
4013
4029

3982
3998
4014
4030

3983
3999
4015
4031

4032
4048
4064
4080

4033
4049
4065
4081

4034
4050
4066
4082

4035
4051
4067
4083

4040
4056
4072
4088

4041
4057
4073
4089

4042
4058
4074
4090

4043
4059
4075
409'

4044
4060
4076
4092

4045
4061
4077
4093

4046
4062
4078
4094

4047
4063
4079
4095

4036
4052
4068
4084

4037
4053
4069
4085

4038
4054
4070
4086

L-.1-

222

7

3588
3604
3620
3636

lEO
IE 1
IE2
IE3

I

2

S/360 BOS Assembler with I/O Macros

4039
4055
4071
4087

I
of

APPENDIX F:

j

,

~----.-

I
I

I
I
I
I LENGTH
1 IMPLIED I
I MODISPECIFIED
I LENGTH I ALIGN- I FIER
BY
I TYPE I (BYTES) I MENT I RANGE
l----tI
--+
characters
I byte
1 as
I • to
I c
I
I needed I
I 256
1
-+------+----+l+- as
I
I byte
1 1 to
1 hexadecimal
I X
I needed 1
I 256
1 digits
I
~---+t
I
--+1 as
I byte
I binary
I B
I 1 to
I needed I
I 256
I digits
I
I----+_
-+-----+--I
I word
I decimal
I F
I 4·
I 1 to
I
I
I 8
I digits
I
l----tI
I
I
I 2
I half
I decimal
I H
I 1 to
I
I word
I 8
I digits
I
1
I
--+
+----+-I
I
I
I
I
to
I word
I 4
I decimal
I E
I
I
I
I digits
I
I 8
I
I----tI
I
I 8
I double I 1 to
I D
I decimal
I
I
I word
I 8
I diqits
I
I
I
I
I
I
I
I
I
I
as
to
I byte
I
1 decimal
l p *)
I need€d
I
I 16
I digits
I
I----tI
+----+-I z *) I as
I byte
I 1 to
1 decimal
1 needed 1
I
1 digits
1 16
I----+_
1
I
1
1 A
I 4
1 word
I any
I 1 to
1
I
I
1 4
1 expression

•

.,

,.---+I

V

I 4

1

1

J----+_
I 2
I S
I
I
I
I
I
I

1

1
1

I
I
I
I---_+_

I Y

1
I

I· 2
I
I

+-----+-----+word
relocatable
3 or
I
I

I

1 half

f word
1

I

1
I

I

1
1 half
1 word
I

I

1 4

--+

I

I NUMBER
1 OF CONRANGE
I STANTS
PER
FOR EXI
I OPERAND I PONENTS

+------+I one

I

1

1

I

I

I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I

I
I
I
I

one
mul tipIe
mul tipIe

1
1
I
I

1
I

I 1 to
I 4
I

I

I

I

I
I
I
I
I

I -85 to
I +75
I -85 to
I +75

multipIe

I -85 to
I +75

I one

I

I
I

I
I

I

1
1
1
1
1

-+-I

1 symbol

1

I

I

I

1
1
1

1 2 only 1 one absolute 1 one
I

I or relocatab-I
I 1-e expression 1
1 or tvo absol-I
1 ute express- I
1
1 ions:
1
I exp (exp)
1
I
I one
I any
I
I expression
I

I

I
I

I
I -85 to
I +75

1
1 one
1
1

1
1 TRUN1 CATIONI
I PADDING
I SIDE

-+-

mul tipIe

I multiI. pIe
I
I multi1 pole

I

I
I

I

I

I

I
I
I RANGE
I FOR
I SCALE
I
I
I

-+

I

1 one

SUMMARY OF-CONSTANTS

I
I

1
1

-187
+346
-187
+346

--+---

I 0-13
I
I
I
I 0-13
I

I

I

I riqht
I
I
I left
I
I
I
I
I
tol
I
I
tOI
I
I
I
I
I

left
left
left

riqht

-+-

I right
I

I

I

I
I
I

1 left

--+
1
I
I
1
I

--+---

I

I
I
I left
I

I

I left

I
I

I
I
I
I
I
-i
I
I
-f
I
I
1
I
I
-I
I
I
~

I

I
-f
I
I
I
-I
I
I
I
-I
I
I
-I
I
I
1
I

1

I left
I
I

-f
I
I
-f

I

1

I
I

1

1
1
I

I

I

1
1

I

I

I

1

I

I left

I
I

1

I

1

I

I

I
.J

*)Length modifier ranqe in DS from 1 to 256.

Appendix F

223

This example (Figure 53) illustrates tbe
files and main-storage area assignments for
one tape file, one card file, and one disk
file.
It is a simplified order and
inventory job in which a master tape is
updated and written onto a disk file, and a
card file of detail orders is processed.
The followinq assumptions are made.

are read in, updated, and punched
from the same I/O area.
d.

3.

•

The old master inventory tape contains
quantity on hand and unit price in
addition to the identifying
information.

•

The card file reflects quantities
ordered.
It is to be completed with
quantity available for shipment, unit
price, and the extensicn of quantity
shipped x unit price.

•

The new master inventory disk file
reflects the decrease in qpantity on
hand due to the current orders, or an
increase when items are returned.

Assembler instructions to define the
input and output areas for the three
files.
a.

Two input and two output areas are
reserved for the master files.
Input records, and fields within
the records, are defined in a
See part
dummy section (DSECT).
3c.

b.

One I/O area is reserved for detail
card records.
Because these are
single unblocked records, the
individual fields within the
records may be defined along with
the allocation of the I/O area as
shown. Note the use of the
zero-duplication factor.

c.

Use of the DSECT (dummy section)
assembler instruction is
illustrated here. This permits
the individual fields within a
record to be addressed
symbolically.
Whenever ~hese
fields are used as an operand of
an instruction, their length may
be implied and their location is
expressed as a displacement
relative to the contents of the
reqister specified for addressing
the dummy section. In this
example, register 3 is assigned to
the master input file by DTFSR
entry IOREG. Therefore, IOCS
makes the starting address of the
current record available to the
problem proqram in register 3.
Because this reqister is also used
to address the dummy section
(USING statement in section 6),
ipdividual fields can be addressed
regardless of which record in the
input area(s) is being processed.

The illustration shows this setup:
,.

Job Control cards to assign devices for
assembly.
It is assumed that a
Supervisor for object program execution
is assembled separately.

2.

Declarative macro instructions to
define the three files. The first
definition is preceded by a
begin-definition card.
a.

Old master tape file.
This is an
input file to be read forward.
It
contains standard volume and file
labels and additional user
80-character file labels.
It is a
card-image file with a blocking
factor of 5, and uses two input
areas with general purpose register
3 assigned for lo~ating individual
records in the input areas.

b.

New master disk file.
This is a
disk output file with the same
characteristics as the tape input
file.
General purpose register 4
is assigned for locating the next
available output-record area.

c.

224

Detail card file.
This is an input
file to be updated. It is read at
the punch-feed-read station of an
IBM 2540 Card Read-Punch.
Records

S/360 BaS Assembler with I/O Macros

4.

End of the three file definition
macro instructions. The user's
source program follows this macro
instruction.

Assembler instruction to resume coding
of original control section.
Because
the DSECT coding interrupted the
control section defined by the START
instruction, a CSECT instruction is
required to resume the coding of the

original control section. The user may
include here the remainder of his
storage assignment instructions and any
constants, tamles, or work areas for
calculations.
5.

User routines required for processing
additional user-standard labels.

6.

Sample instructions to open files and
locate master records that have current
activity. This illustrates the
following!

•

All files to be processed by
logical Ioes must be opened.

•

A GET for an unblocked record to be
processed in a single I/O area
causes the record to be physically
transferred from the I/O device to
main storage. This makes it
available to the problem program.

•

The first GET for a record in a
blocked file causes the physical
transfer of the block(s) of data
from the I/O device to the I/O
area(s).
It also initializes the
specified I/O register with the
address of the first record.
Each
succeeding GET causes the address
of the currently available record
to be placed in the I/O register,
and mayor may not cause a
physical transfer of data.

•

When output files (with labels)
specify an I/O register, the
register is initialized by the
OPEN routine (after label
proc~ssing).
A PUT to an output
file with no work area specified
merely causes the address of the
next available record area to be
placed in the specified I/O
register.
No data is moved within
storage, and physical transfer of
data mayor may not occur.

•

A dummy section is addressed by
means of the USING statement, and
fields (for example, MITEM) within
an individual record that have
been defined in the dummy section
may be referred to by symbolic
names.

•

A record can be moved from an input
file to an output file, both of
which have I/O registers
specified, by the Mve instruction
with explicit length and explicit
base registers.
These base
registers must be the same
registers as those specified by
the IOREG entries in the
corresponding file definitions.

•

All files that have been opened
must be closed.

Appendix G

225

IB,.,

IBM 5yst.ml36D Assembler CDdin; FDrm

t-PRO_ G...._ M--=-IO=-=.C=S-----"£::.. .:.X=A.:. :,.M. .:. :.P. . :;:1..=£_ _ _ _ _ _---r_ _ _ _ _---i

I

DATE

PUNCHING
INSTRUCTIONS

I
I

I

GRAPHIC

I

I

Pl.II'\ICH

I

I

I

I

I
I

I

1

PAG'

6

OF

CARDfLECTRONUM8ER

Id.ntification1

B

N.;.....

M

'J,O;a, I

O~ration

10

'.4

16

~lS15EMlR~~

O~;nd

20

1

I 1•

I

30

1i

I

35

040

III

I: I

i

4.5

II II

50

III

55

I

I

Com.... nh

s.quenc;.

60

I

I

I

I

I
/i/l :VCJ'L!

i

lsIY~~0~'JiWOR'}(.1'

I

i

I

I

I

I::

I!

I

:

I

i

I

I

!

I i

J

I

I'

i

I

I
I

I: 11

i

i

III

'fJ{Jflfl ' ,6'5113SI,'(iSif:3:!J'

I

I

I

: I

I

I

:I

1

I I
I 1

II:

I

//£!X~ti

e.£ADY

®

I

{ '*: ! ! II II:
I
~

11111,

I

I i

I I

~ I

!

I

!

!

I

III
I
:
.siriA'llr 'r4's{J4
: I'
! I I

I

I'
i

I"

i

~

•

I I :

1

:

!!

"

I

I
"

•

'

:

'I

I

I

i

r

:

I

I

I

' : I

I

I

I

I

I

'I

I

:

I

I:

'FILEI D£FINiITION SECTION
I
I
II!!
"DTiP'8'C; ~ I S }(.I
I
I
I ' ,
I
I I I
I'
'MASTER FI L If._ DEE 1 NED ~S AN INPU T FIL E' i
I

:

I

:

I

:1

I

I

I

I

III
II i

II

i

I

I
I

I

I

!

,

I

:
i

.

!

Iii

I

@ -<

I

I

I

,{OA/2£Al=AR'f,AONE,

.

,

I

I

•

,

i

II!!.
I

!

I

,

1

I

I

,

!

I
,

1

I

i

Figure 53.

226

1

!P£VADDR=SY'${J{11,
iF! LABL=STD,
['DREG =-3,

I:

Ioes

i

I

~'OAR.£AZ=ARI£ATWO,

I
I

'
I

'!':

!::
I I

I

!

I!.-'ABADDR=CK.'(JLIJI-AI,B,

ii'

i

Iii
,i

•

II!I
I I

I!!!

I: i I

I

I

WLR£RR=CX.0v..OWLIl,

5/360 BOS Assembler with I/O Macros

!

,

,:

111

!

i

X

I

I

'ii
I: !

I

I

i

':

i I

:

I I

i

I I

I

I

I

!

I

1

~RR.o'pr=CKo~D8LK.,

Example (Part 1 of 6)

I :

:!
I I!
!:
i l l -' I I i i i I
I I Ii' I
I i : 11,
I

Iii I I!
. , I iii

~OFADD/2::£OIF/t1STR

'!

I

I I

X
-'

I

I

I

I :

I

I

i

!

1

I
I

X
I

I

i I

I

I

Iii

I : iii

I

I

i

I!

1111111
I

I

I

x
x r
x

1!11
X I
iJ t i l X

I:!

,

:

,

I

i

:

I

!
,

I

I
I
1

I

II

I

,

I

I

I I

I

IB,.,

IBM Sy.tlml36D AI,"mbl,r Coding Form
....... I. U,I,,,,,

l"OGlAM lOCS E.XAMPLE

.

No_
I

PJ(I

I

PUNCHING
INSTRUCTIONS

I

II'lOGAAMMEI

..

STAUMENT

,.

"

I

I

PUNCH

I

I

I

DATE

0,.... ,1001
10

c;aAPHIC

..

o~~

" I I I" I I I I I I "
"
III I I I I I I I I
II III
Ii
~Af->ITIE RI .FIlLEI IOEF l,"IEO: AISI IA~ DUIH>
,F I LE I
II!I
III I !
III I! I • Ii . i i I : I
OTF SR OEM11C E;=D:l:S KIIIII,ll O'AIR:EIA II=ARE ATHRE
I i
,
;
IOA.RIE AI2'=~A.R E'A1FOU R', I I I I I I I
I
l,oIR,E:G :=4',; : I I I I
I II III I
II I ,
i
RiE'C F!O R'M-iFI} I'll.SLK;,
I I i I: I I ' I : I • I i
I I
; I
S!U1<511 1£1=14(Z\ 8;,1 I I
I
I I I I'I! I: i !
I
: I I
REelSII lEI=8¢,1 I , ! I I I I I I I , I I: I I I
I
,
I TiYPE:F U='I=:O,U T,P;UiTi, I I II I! I I I I I I I I I I ! I
V:E R:I,F YI=IYE,S II I I I II I I I I I I I I I I I I I Ii I :
I
,
: I , I
I i , ; I I I
I! :
I
I II II I I II ! i : I
,F,llE!
DEITA'l
U
,OEF
I.N.E:O' A:5i 'Ai C'OMBiI t-lE O! iF I.L Ei I
I
,
I I I
II II I I,I i I II
I Ii!
I' I : I: I ' : I I
D:T:F"IS:R TIYPEIF LE:=,CM B,t-! D:,.R ECF'OR ~=FiI~ UN$,iB LIK:Sll:c E=Hc;6',
DE,VllC E-REIA D'40,'
:
I! I
I
I :
:I
,
I I
I I DE,VAO D.R-.5Y S'¢¢¢,
I
:
' : i 1
i I
,
I.OARE AII.=OE TAl LC 0,
I I
I: I
!
I I EOFAD DR=EO FOTAll I
I j
I . i !
D~IFEt-!
• I
I
! I I'
I
I!
:
I
II I II I
I
I ! I
I I
I
i
I
! i
I
I ,
,
Ii i !
I
I
1'1'
i I
! : i I
I
I: !
i I I I
I i
,
! i
II I I I i I
III
I

NE.WM:5 TR

"

,

I

:

;

I

;

I

,

~
~

,

J

~

DE TA I I
I

!

I

!

I

,

!

I

,

{ I

!

,

:

•

I
!

,

,

,

I I

i

11

I
I

,
,

,

!

I

,
,

!

Figure 53.

j

:

:

0,6

2.

'-n,incallon·

s.quene.

"

71

J

I
I
I

,

J

,
,

:

,

!

!

,

:

00

I

II
I

I
)(

IX

X

rx

'/.

I
I I,
~ I , I I
I I
I
I I
I II
I I
I
: II I
X : ' I It:

)(

,

,

X
X i

I

i

I i
I I
Ii I I

:

i

i

X
i

I

i

!

.
,

:

!

I

,

!

I!
I

,

,

i

i

:

!

I

:

I

,

!
,
,
,

:

:

i

I

I

:

,

I

I

I
, i

I

I

.I

i

!

,

,

.

PAG.

CAIlO fUCTIlO NUMBER

!

,

,

I
I

I !
I 1
I !
I 1 1
i I I I
I i , I i I!
: I
i
1 ! I 11 I I
,
,
!
I i I 1
I
I j i II
!
I
I
,
,
: i I
i I I I
I I
I i ' I
I ! I : I I
1;
II
I ! I ,
I
i
II
!
! I
i
.;
I Ii
I , I ,
I
,
I
, I I
I ! i
,I
II
:
I
: I
,I
,I
: ! I
,
i : ,
i! ,
I
,
: : I
i! I I I I i I :
I I
: i I !
I
i I
i
,
i I I!
III I
1
J

,

,

I
I

I
I
I

I
I

,

!

..

50

i

I
I

I

C_nll

um

~
~I

I

I
I

I
i •:

,
,

IOCS Example (Part 2 of 6)

IBM Syotaml36D AIolmbier Coding Form

IBM

I-PRo_GlAM---=I:..::=O'--=C=--=S==-----=E.;..:.XA'-'-'-M..;.;..P--"Lc..::E=-----_ _ _ _ _.----_ _ _ _-I

I

DATE

•

10 Opotftltlon

'..

16

~~

20

HlPutr

I

PUNCHING

INSTRUCTIONS

I

I

GRAPHIC

I

I

PUNCH

I

I
I

I
I

I
I

PAG.:3

0,6

CARD fLECTRO NUM8fR

kMntlfieation5.q.Mnc.

30

35

1/1 !O'uT'P'UITi AiRIEiAlS flOiRI

40

..,

50

~AI5ITERI

55

C_nh

IFII LEI US!AS:EI

6S

60

I

I I I

I

USH-'\G
i21~~: PO;S:l:TU)NS:
.,'
iii I I I I I
I
I :MASIrER rrlllL~ INPUlri :ARf:A .2 1- ,FiliR,S11 !'l'r)a POSllrt'10'N5
CjLlZ:0'r. I ! .sFC~:MiD rz:f//r/J: AOSilif IOttS I: I !
! i
til
I I I
'C'L!Z~
I I "'AiSifEiR IflIt£. ,OUITPUiTi 'A'REA: 1\ -I Fit RSiTI 12~t1 PO;St!lll0.NI5
CILlZ~¢i ! I :SEr.loHIO i2i¢¢ POS!IIT l,OM,S:
:, I
II
! iii I I
i I
I

CL2,¢:a
C!L2!(t/li

1"\

@. A,R'EATWO

gs

I iSECbND

I

j

M~EA ~~RIE' OS
A~ ~FOUR

09

os

C:Li2~¢1

i SEK:KJN~ 12!¢'¢A ~o5!rIT l=----=E:...;,.}<.....,;.f>......;,.M'---'-P...,:.L...;,.E_ _ _ _ _---.-_ _ _ _

•

10 OptNllan

IX

14

AIrE

I

I

I

I

VErrALL

WE'A,D IN IA DETAIL

1

'RR'O,R

CArR,\)

I( US I fiG

L~O~ AilE A MASlfiEf< J

O.. iD'MSIrRI

CLt
6H

I(;ARDfLfCTRONUMN.I

PRO~R~~

BALR 2,¢
LaCA~E PROGRAM sv lO~DtNG ~E ts~IE~ 2
USING ,2
I~FORMATIO" ~~n USING THA~ AS A BASE
• U\ \JSE\{EElpI~G, INCLUDING LOADliNG RE.GIS~E~ 16
•
JI~G 11/0 A~EIAS

u TIOTAIl GET
GETM51R GEIf

®

I

I

16

USER'S MAIN-LINE

*La

I

I

I.

~IT"
l~~AG
~ F~RE~C
f~R

AOO~ESS-

RiE.GI !rEI< ~)

DUMMrtl pE irION A"~ FI£lOIS ~I\\\1N IT

MAf.JrrER! o,R!

UllnCArt"lES 1ft, ~IISSINIG

NE~

N!o,.

DETAIL

i

i

BE

I

PUIr
EITMSIrR:

*1

, ! ffHEN; ,G'ET iTHE

NE.'XIT 'MIA T 'R rOt<

Co.MPARl~G
I

I

I

NOi-OF -IFIIlE ,RoUTINES
II
I I i ';
I

!

i

II

iii
!

I

I

i

i

I!

I

!

!

E'O J
EN~O

Figure 53.

I
I
I,' I i ' I
LOCA T E ' I! I
I
I;
i

I

I I

I

I:

i I

I

I

II
!

\;1': I i i

i
I

I

I

I

!

i

I

I

i I
I

I
i

i I ~ ;

I

I:
iii

II
I

I

I

I I

!

I

I

i

I

I,
I

i

I
I

I

I

, iii

IOCS Example (Part 6 of 6)

,Appendix G

229

APP~NDIL~ASSEMBLE1L1!l!ill!AGES

FEATURES COMPARISON CHART

.=.=

Features not shown below are common to all assemblers.
Dash
X

Not allowed.
defined in System/360 Operating System Assembler Language Manual.

= as

r----

1

I
I
I

------.--~,-----------~~--

1

Feature

I No. of Conti nuation Cards/statement
I
(exclusive of macro-instructions)

1

I
I

0

0

J---------------------~

I Input Character Code
I
I
I ELEMENTS:
.Maximum Characters per symbcl
I
J--I
Character self-defining terms
I
I
I
I

I
,EBCDIC

~

I
I
I
I

I
I

Binary self-defininq terms

6

6

Char.
only

X

Length attribute reference

I

r--

I

2 16-1

+-*
3

I
1

I
I
I
I
I

I
1

I

1

I

I
1
I

IASSEMBLER INSTRUCTIONS:
I
l-I
I
DC and DS
I
I--I
1
Expressions allowed as modifiersl
,
I
1
Multiple operands
I
l--t
I
I
I
Multiple constants i~ an operandi
I
1
I

1

IBPS/360 andl
jBOS/360
IOS/360
IA~semblersllAssembler

I
I
I

I
I

I

I
I
I
I

I
I
I
I
I
I

X

2 24 -1

I

'6

+-----4
I
I EBCDIC
I
I
I
I
8

I

j

I

--+-----+------f
I

--+

X

I

X

I
1
I

X
X

I
I
I +-*/

--+
I
+
I
I
I

--+
1
+--

3

X

X

1
I
.1

1

.,

I

X

I
,
J

I

X

I

+1

,

,

X

I

I
12 24 - ,
I
I
X
I
I
I

I

1+-*/
I

I

16

I

Level

I
I

--+

X

1

I
X
I
I 2 24 -1
I
I
X

+
+-*/

2

1

I
I EBCDIC
I
I
I
I
8

I
I
I

I

I
I
I

--+

'---------rl---------,

+-----+
t
I
I
--+-

~

Number of parentheses
i--I
Complex relocatability

1

I

I

--+

I
Liter als
I
I----IIExtended mnemonics
I
i--I
IMaximum Location Counter value
I
I-I
I Multiple Control sections per assembly I
I-I
I EXPRESSIONS:
I
I--I
I
Operators
I
I--I
1
Number of terms
I

I-

BCD &
EBCDIC

--------~

.--

I

T

7090/7094
Support
Package
Assembler

IBPS/360:
ICard Basic
IAssembler

..

I-

In the chart:

1

,
I
I
I
,

I
I

I
,

15 Levels

I

1

,

1

X

,

1

,

I
I
I
I
I

,
I
,

I

X

I

X

I

X

,
I
1

1

1

I

I
J

I

I Except
I Address
I Consts.

I

I

I

I

I

I

I

(Continued)

230

S/360 BOS Assembler with I/O Macros

Appendix H:

Assembler Languages--Features Comparison Chart (Continued)

I

i

i

1
t
I,

1
IBPS/360:
ICard Basic
IAssembler
I
I
I
I
I
I
I
I Except
I B, P, Z,
I V, y, S
I
1 Except
A
I
I
I
I
I
I Except
1 H, E', D
I
I Only C,
I H, F, D
I
I Only C
I
256
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I 1 oprnd
or 25
I
I only
I
2 oprnds
~
I oprnd
I reloc
I only
I
I 1 oprnd
I only

1 7090/7094
1 Support
I Package
1 Assembler
I
I
I
I
I
I
I
1 Except
I B, V
I
I

Feature

1
I
I

Bit length specifications

1

Scale modifier

I

Exponent Modifier

,
,
•I

DC types

I
I

..I
I
J
I
I
lI
I
I-I
I

I
I
I
I
I
I

DC duplication factor
DC duplication factor of zero
DC length modifier
DS types
DS length modifier
DS maximum length modifier
DS constant subfield permitted

~

COpy
I'
I-CSECT
I

J
1
I
I

J
1
I

DSECT
ISEQ
LTORG

PRINT
1
1-TITLE
I
l-COM
I
I
I
ICTL
1
I
l-

1
1
1

USING

1
I
I
I

DROP

,

,

i

1
I
I
I
I
I
I
I
I
I
I
I

,
I
I
I
I
I
I
I
I
I
1
I
I
I
I
I
I

1
I
I
I

1
1
1
I
I
1
1
I
I

1
I
I

i

i

1
1
IBPS/360 and I
IBOS/360
IOS/360
1Assemblers 1 ]Assembler
I
I
X
I
I
I
1
X
X
J
I
I
I
X
X
1
I
I
I
I
I
X
X
I
I
I
I
I
I
I Except
I
X
S
X
I
I
I
I
I Except
I
S
X
I
I
I
I
1
I
X
X
X
I
1
I
I
On'ly C,
I
I
H, F, D
X
X
I
I
I
I
Only C
X
X
I
I
I
I
256
256
165,535
I
I
I
X
X
I
I
I
I
X
I
I
I
I
X
X
I
I
I
I
X
X
1
I
I
I
X
X
I
I
I
I
X
X
I
I
1
1
X
X
1
I
I
I
X
X
X
I
I
I
I
X
1
1
I
1
I
I
oprnd
X
X
1
I
I
I
1
1
2-17 oprndsl
1
oprnd
X
I 6 oprnds 1
reloc
I
1
only
I
I
I
I
1
I
X
X
I 5 oprnds I

,

,

1
I
I
I
I
I
I

1

•I
I
1
I
1
of

I
I
I
I
I
I
I
I
of

I
I
I
I
1
I
I
I

,
,
I

I
I
1
I
I

,
,
,
I
I

I
I
I
I
I
1
I
I
I
I
I
I
I
I
I

(Continued)

Appendix H

231

Appendix H:

Assembler Lanquages--Features Comparison Chart (Continued)

I

I

I
I
I
II

1
I

Fea ture

I

CCW

1

ORG

~

ENTRY

~

I

I

EXTRN

1
i-I
I

CNQP
PU NC H

l1

1

oprnd 2
reloc
only
no blank
oprnd

I
I
I
I

+

1 oprnd

only

I
I

I

I

I

I

I
I

+-----_+_
1

REPRO

I

+

1

I

no blank
oprnd
1 oprnd

only

1
I

max 14
, oprnd
only

I

1 oprnd

I

only

I
I

2 dec
digits

I
I

2 dec
diqits

I
I

+

X

1
I

X

1

I

I
oprnd
I only

f_

I
I
I
I

X

1
I

X

I
I
I

1

I

I

I

I ' oprnd
1 only

1

I 2 dec
I diqits

I
1

I

X

1

+----+-------+-----+_
I
I
I
X
I
+--------+---------+-------f_
I

I

I

I

I

1

I

I

1

I

-+-----+-------1
X
X

I
X

I

X

I

I
I

-1
1
,
I

I

X

~-----------------------+---------+----------+---------f--

IL
Macro
Instructions
--

1
I
~

1

X

I
I
I
1
1

I

I

X

,

I
1
I BPS/3 60 and I
IBOS/360
IOS/360
IAssemblersllAssembler

1

+----+
I
1

,

~

7090/7094
Support
Package
Assembler

I
I

+------+

~

I

1
1

+

1
I
I

1BPS/3 60:
ICard Basic
IAssembler
1

..
I

,

~

I

X

I

-t

I

.L_ _ _ _ _ _ _ .L_ _ _ _ _ _ _ .J.. _ _ _ _ _ _ _ _ _L - -_ _ _ _ _ _ J

Not includinq Model 20.
(Contin ued)

232

S/360 BOS Assembler with I/O Macros

Appendix H:

Assembler Languages--Features Comparison Chart (Continued)

r--

~------------~

I
I
I

Macro Lanquage Features

r--

10perand Sublists

I--

I Attributes of macro-instruction operands inside macro
Idefinitions and symbols used in conditional assembly
linstructions outside macro definitions.
II
ISubstitution in the operation field

I BPS/360 andl
J BOS/360
IOS/360
I AssemblersllAssembler I

-+--------+_---------f
I
I
X
I
+---------+---------1
I
I
I

I
I
I

X

I
I
I

+-------+------~

I
I

I
I

X

I
I

~---------------------------------------+---------+---------I

I

I

~

+----------+-----~

I--

+----------+---------1

I Maximum number of operands
IConditional assembly instructions outside macro
I definitions.

I

49

I
I

X

I

ISubscripted SET symbcls

I

200

I

I
I

X

I
I

I

2

-+-------+--------1
I
I
I
1--------------------------------------+--------+--------1
I
global SETA
I
16
I
2
I
~
+--------+-------1
~

IMaximum number of SET symbcls

I

I-I

~

I

I-I

global SETB

I

global SETC

+_----------+------~
I
16
I
2
I

local SETA
local SETB

~

IL-- local SETC
2

128

I

+--------+
~
I
16
I
2
I
+-------+-------:1
I
128
I
2
,I
-+------+_
I
I

0

I

2

I

-L-_ _ _ _ _ _ _ _L -_ _ _----J

Not including Model 20.
The number of SET symbols permitted by the Operatinq System/360 Assembler
is variable, dependent upon available main storage.

Appendix H

233

APPENDIX I:

SUMMARY OF INPUT/OUTPUT FOR AN ASSEMBLY

i

This table lists the card groups that make up the source deck produced by the
I
programmer, with an explanation of each group.
The groups are listed in the order inl
which they appear in the source deck.
I
1!Qte: All job-control cards must enter the system via SYSRDR, all others via SYSIPT.I
The same device may be assigned to both SYSRDR and SYSIPT.
I
I
REMARKS
CARD GROUP
CONTENTS

I
I- .

First card in group (always required)
Assemble-and-execute is initiated when name of
problem program appears as the second operand.)

Job Control Cardslll JOB ASSEMBLER

I
I

11/
DATE
I
III

Required on first job after IPL.

ASSGN

See Figure 50 for device assignments.
(Only
those assignments not already in effect are
required. )

VOL
DLAB
XTENT

Required for SYSOOO (all assemblies).
See Figure 56 for operands.

I
I
I

III
III
III
I
III
I II
III
III

I

I Assembler
IControl Cards
I
I
I
I Supervisor-

IA~sembly

•

I
I

I

I
I ALOG
IAOPTN
I
IAWORK
1AFILE
I
I Supervisorlassembly
I macro statements.
I Assembler,
I Machine, and
IMacro statements.
I

I---------_+__
I End Card
I END

234

I
I

1
I
I

Last card in group (always required).

I

See Control Cards section for
I
explanation and format.
These cards may appear I
in any order.
I
I

1
I

I

As~embler

,1

or an
independent Supervisor may be assembled.

I
I

I

--+----------+1

I Problem-Program
I Source Cards
I
I

Figure 54.

Required for SYS001 (when the
AWORI<' 2 option is used).

--------+------------1 Either a BOS

I-

I Source Cards

VOL
DLAB
XTENT
EXEC

~

I START card may be omitted if a problem program
I is assembled alone, (START 0 assumed). START
I card must be omitted if a problem program and a
I supervisor are assemble~ together.
+1- - - - .
I Last card of source deck.

Source Deck

S/360 BOS Assembler with 1/0 Macros

I
I
I
I
I
I

,I

r----~i------------ISymbolic I
IUnit
IFunction and Device

I
I
REQUIRED DEVICE ASSIGNMENTS
I
i
ISYSRES
I

I System residence device.
IIBM 2311 Disk Storage Drive.

rISYSRDR
1

r--

I
,
i
'
I
I

I

I
I

IJob-control input device.
May be the same device as SYSIPT.
liBM 1442, 2520, or 2540 Card Read Punch, or 2501 Card Reader.

I

I

.
I

I
1
I

ISource proqra~ input device.
May be the same device as SYSRDR,
1 IBM 1442, 2520 (Model A1 or B1), or 2540 Card Read Punch, or
12501 Card Reader.
IBM 2400-series Magnetic Tape Unit (7- or
19-track) may be used.
(If the data-conversion feature was used
Ito prepare the 7-track tape, it must also be used to read the
Itape.)
Information appearing on tape must be aO-byte unblocked
1 records.
'

1
I
1

I

1

,

ISYSLST

IProgram listing device.
IIBM '403, 1404 (continuous forms only), or 1443 Printer.
IIBM 2400-series Magnetic Tape Unit (9-track, or 7-track with or
Iwithout the data-conversion feature) may be used.
IListinq on tape appears as 121-character print images (a sinqle
I forms-control byte followed by a 120-character line imaqe).
I (This forms-control byte is the command code portion of the CCW
lused durinq printout.)

I
1
I
I
1

I

I

ISYSOOO
1

IUsed for temporary work area durin~ assembly.
IIBM 2311 Disk storage Drive.
~May be same device as SYSRES.

,
I
I

ISYSIPT

I
I

I

I
I
I
1

I
I
I

I

I
I

I

I
1
I

1

r--------~i_-----------.--~--------------------------------------------------.-----~

1

OPTIONAL DEVICE ASSIGNMENTS

1

..

r-----~

ISYSLOG
1
I

IOperator message logging device.
IIBM 1052 Printer-Keyboard, or IBM 1403, 1404 (continuous forms
lonly), or 1443 Printer.,

ISYSOPT
I
I
I

,Object proqram output device.
IBM 1442, 2520, or 2540 Card Read Punch.
IBM 2400-series Magnetic Tape Unit (9~track, or 7-track with
data-~onversion feature) may be used.
output on tape appears as aO-byte unblocked records.
Not requirea when using assemble-and-execute option.

I

1------+

1
1
1
I
I

I
I

I
I
I
I
I

r--

ISYS001
1

I
I _______________
i-.

Used for temporary work area during assembly.
IBM 2311 Disk Storage Drive.
Reduces assembly time by providing additional work area on a
separate
disk
drive.
_____________
_

I
I
I

J

~

I

Mot~l:

When an IBM 2404 Magnetic Tape Unit and Control is used, all tape drives
must be assigned to the same channel.

MQ~~:

For any of the above device assignments, the Supervisor must contain the
corresponding error routines.

Figure 55.

Device Assignments

A'ppendix I

235

r---

--~I-------------

ISymbolic
IUnit
I
I
I
ISYSRES
I

I
IFunction and Device

---------------------.-------------------------------------,I
I

----------------------1

i

REQUIRED DEVICE ASSIGNMENTS

I--

I

,

I System residence device.
IIBM 2311 Disk Storage Drive.
I
IJob-control input device. May be the same device as SYSIPT.
ItBM 1442, 2520, or 2540 Card Read Punch, or 2501 Card Reader.

I
I
I
I
I

ISYSRDR
I
I--I
'
ISYSIPT
jSource progra~ input device. May be the same device as SYSRDR,
I
I
IIBM 1442, 2520 (Model A1 or Bl), or 2540 Card Read Punch, or
I
I
I
12501 Card Reader. IBM 2400-series Magnetic Tape Unit (7- or
I
19-track) may be used.
(If the data-conversion feature was used
I
Ito prepare the 7-track tape, it must also be used to read the
I
I
I
Itape.)
Information appearing on tape must be aO-byte unblocked
I
I
I records.
.
I
~I----------+·------------------------·---------------------------------

ISYSLST
I
I
I
I
t
1
I
,
ISYSOOO
I
I

-------

,

IProgram listing device.
I IBM l40J, '404 (continuous forms only), or 1443 Printer.
IIBM 2400-series Magnetic Tape Unit (9-track, or 7-track with or
Iwithout the data-conversion feature) may be used.
IListing on tape appears as 121-character print images (a single
Iforms-control byte followed by a 120-character line image).
I (This forms-control byte is the command code portion of the CCW
lused during printout.)
I
IUsed for temporary work area durin~ assembly.
IIBM 2311 Disk storage Drive.
~May be same device as SYSRES.

I
I
I
I
I
I
I
I
,
I
I
I

I-----------~I---------------~-~-------------------------------------------------------------·----~I

I

OPTIONAL DEVICE ASSIGNMENTS

I----------r--------.------ --------------------------------ISYSLOG
I
I

IOperator message logging device.
IIBM 1052 printer-Keyboard, or IBM 1403, 1404 (continuous forms
I only), or 1443 Printer..

1----------+
ISYSOPT
I
I
I
I
I

r---

ISYS001
I
I
I
L-

I
I
I

-------..----------------------------

1

IObject program output device.
IIBM 1442, 2520, or 2540 Card Read Punch.
IIBM 2400-series Magnetic Tape Unit (9~track, or 7-track with
Idata-~onversion feature) may be used.
IOutput on tape appears as aO-byte unblocked records.
INot requireu when using assemble-and-execute option.
1
IUsed for temporary work area during assembly.
IIBM 2311 Disk Storage Drive.
IReduces assembly time by providing additional work area on a
Iseparate disk drive.
__

I
I
I
I
I
I

I
I
I
I

I

j

~I______________

Mot~l:

must te

I

-------------~

When an IBM 2404 Magnetic Tape Unit and Control is used, all tape drives
to the same channel.

assign~d

M2te 2: For any of the above device assignments, the Supervisor must contain the
corresponding error routines.
Figure 55.

Device Assignments

Appendix I

235

I

IThis table lists the Disk-label cards,'and their contents.

-.

l----.

I contents

I Card I Field

r-I

I

I

Required for all assemblies

~--.-------------

VOL

Symbolic Unit
File Name

SYSOOO
WORK'

DLAB

Fi Ie Name
Format Identifier
File Serial Number
Volume Sequence Number
Creation Date
Expiration Date
System Code

BaS 8K DISK WORK FILE 1

XTENT Extent Type
Extent Sequence Number
Lover Limit of Extent
Upper Limit of Extent
Volume Serial Number
symbolic Unit

,

Required
000'
Today's Date
Today's Date
optional
1

000
(Define the area, on the disk pack assiqned
to SYSOOO, to be used by the assembler).
Must be the same as DLAB File Serial Number.
SYSOOO

i------L--,-----I

Required only vhen the AWORK 2 option is used.

I

Ii

I

I File Name
I

IVOL
I

ISymbolic Unit

IDLAB IFile Name
I
IFormat Identifier
I
File Serial Number
I
Volume Sequence Number
I
Creation Date
J
Expiration Date
System Code
XTENT Extent Type
Extent Sequence Number'
Lover Limit of Extent
Upper Limit of Extent
Volume Serial Number
Symbolic Unit

Figure 56.

236

SYSOO,
W'ORK2

,

BOS 8K DISK WORK FILE 2
Required
0001
Today's Date
Today's Date
optional
1
000
(Define the area, on the disk pack assiqned
to SYS001, to be used by the assembler).
Must be same as DLAB File Serial Number.
SYS001

Disk Label Cards

S/360 BaS Assembler vith I/O Macros

I

This table lists the card groups that make up the output deck produced
by the assembler, and the conditions of their assembly.
The qroups are
listed in the order in which they appear in the output deck.
Note:
No output deck will be produced when NODECK appears in AOPTN.

I

l - - ) I

I

£~£.Q!!.EI

,

Remarks

I

l - - '
I IPL Loader

,
,
,
,

,

,Used for loading an independent supervisor from a card I
Ireader. Produced when IPL appears in AOPTN.
I

I

l - - '
, Reproduced Cards
,

r

I-

-+

I
I
I

I-

-+

,

, Symbol Table
I External Symbol
I Dictionary (ESD)

IThese reproduced cards result from REPRO or PUNCH
linstructions located before START.

I

'Produced when PCHSYM appears in AOPTN.

,Not produced when NOESD appears in AOPTN.
,

I
I

r------------_+_

r

,

I
1
I

, Supervisor

IEither a BOS or an independent supervisor may be
I produced.

+-I Program Loader
IProduceq
1----------------+
~

I Problem Program
I

I

,

as part of the independent supervisor.

,Consists of TXT, XFR, and reproduced cards.
Ireproduced cards result from REPRO or PUNCH
linstructions located after START.

The

--+

I Relocation Dictionary (RLD) I Produced if relocatable constants are present, except
Iwhen NORLD appears in AOPTN.
I
I
_+_
I End Card
'Produced as the last card of the output deck.
(Next
,
Ito last if an Entry card is produced.)
I
I
I Entry Card
'Produced as the last card of the output deck when
I
,ENTRY appears in AOPTN.
I

Figure 57.

--L

I

,

I
I
I
I
,

I
,

I
,
,
,
I
I

Assembler Output Deck

Appendix I

237

The information in each card is in
EBCDIC--Extended Binary Coded Decimal
Interchange Code.
For each card, the first column indicates
the numbers of the columns to be punched.
The second columrr indicates the information
to be punched.
I.

I

fESD Card

1

•

11
1

~

IMultiple punch (12-2-9).
IIdentifies this as a loader card.

I---+-

.

12-4
1

IESD--External Symbol Dictionary
Icard.
.
l-I
111-121Number of bytes of information
I
Icontained in this card.

1
1
1

I

I

ITXT Card
I
,
11
IMultiple punch (12-2-9).
1
IIdentifies this as a loader card.

I
I
1
1

I

1

,

12-4

,TXT--Text card.

1

I

1

,

16-8
,

IAssembled origin (address of first 1
,byte to be loaded from this card). I

~I----+I------------------------------~
1'1~'2INumber of bytes of text to be
1

1

Iloaded.

I

I

1
1

1 15-16lExternal symbol identification
,
Inumber (ESID) of the control
1
Isection (SD) containinq the text.

~

I

. I

,

1
I
1
115-16lExternal symbol identification
!
1
Inumber (ESID) of the firstSD, PC, 1
1
lor ER on this card. Relates the
I
l
lSD, PC, or ER to a particular
1
1
control section.
1
i
1
117-72 Variable information.
I
8 positions. Name.
I
1 position.
Type code: O=SD,
J
1=LD, 2=ER, or 4=PC.
1
3 positions. Assembled origin_
I
1 position. Blank~
1
3 positions. Control section
1
lenqth, if an SD-type or a PC-type.
1
If an LD-type~ this field ccntains
l i t h e external symbol identification
1
1 number (ESID) of the SD or PC
1
I containing the label.
I----fI
173-76lProqram identification taken from
I
l i t h e name field of the first TITLE 1
1
Istatement before the START card.
1

I---+-

r---+------------------------------.~

177-80lSeguence number startinq with 0001.1

1

I

1
1
1

--------------------~

117-721UP to 56 bytes of text--data or
I
1
linstructions to be loaded.
I
I
I
I
173-76lProqram identification taken from
1
l i t h e name field of the first TITLE 1
1
,statement before the START card.
1
I
I
,
177-80lSeguence number starting with 0001.1
I'

I

IRLD Card
I
•
"
1Multiple punch (12-2-9).
,
I
12-4 IRLD--Relocation Dictionary card.

I

1

111-121Number of bytes of information
1
Icontained in the card.

I

1

I

I

I

I

1
I

,

,Q7-72IVariable information (multiple
1
items).
,
2 positions. Pointer to the
I
relocation factor of the
,
contents of the load constant.
,
2 positions. Pointer to the
f
relocation factor of the control
1
sections in which the load
I
constant occurs.
1
, position. Flaq indicating type
t
of constant.
I
3 positions. Assembled address
1
of load constant.
I
,
173-76lProgram identification taken from 1
l i t h e name field of the first TITLE I
I
Istatement before the START card.
I
-------~

177-80lSequence number starting with 0001.1

Figure 58.

238

Format of Assembler Output Cards (Part 1 of 2)

S/360 BaS Assembler with I/O Macros

I

r--lEND Card

----------"

I

,

I

I SYM Card

I

~--,-

I

I

1

I

11

IMultiple punch (12-2-9).

I

11

I Multiple punch (12-2-9).

•

I

I

I

I

12-4

lEND

I

12-4

ISYM

I

I

I

1

----------1

~~

16-8
I
I

IAssembled or~g~n of the label
Isupplied to the Assembler in the
lEND card (optional).

I
I
I

111-121Number of bytes of information
Icontained in this card.
I

-f

115-161ESID number of the control section I
I
Ito which this END card refers.
I

,14-16IExternal symbol identification
I
Inumber (ESID) of the control
I
Isection (SD) containing ths text.

~--+-

-f

I

f----+-

-f

173-76lProqram identification taken from
l i t h e name field of the first TITLE
Istatement before the START card.
I
~~

177-80lSequence number
L-.._ _..l-

s~arting

I
I
I

•
I

~-~

r-.--f-

117-22lSymbolic label supplied to the
I
IAssembler if this label was not
Idefined within the assembly.
I

I

-i

I
I
I

I

with 0001. I

-f

I
I
I

~

I

17-72 Variable information.
12 columns
8 ppsitions - symbol name.
1 position - type identification
(machine or assembler instruction other than EQU, DC, or DS).
3 positions - Value attribute
(the displacement within
the CSECT).
or
17 columns
8 positions - symbol.
1 position - type identification
~
(EQU, DC, or DS).
I
I 3 positions - Value attribute
(the displacement within
I
the CSECT) •
I
I 1 position - constant type.
I 1 position - lenqth (one byte
less than the constant) •
I
I 3 positions - multiplicity.

r-IXFR Card

I

11

II

IMultiple punch (12-2-9).

~---f----------

12-4

~

16-8
I
I

I

IXFR. Transfer card.

+1-------------

IAssembled origin of entry point
I (after the program is loaded, it
Ireceives control at this point).

-f-----------------------

115--161 External symbol identification
I
Inumber (ESID) of tbe control
I
Isection in which the transfer
J
loccurs.

I

I

I

I

..

,

,

I

173-76lProgram identification taken from
l i t h e name field of the first TITLE
I
Istatement precedinq the START card.1
I

f---f-

117-22lSymbolic label of the entry point.

177-&0ISequence number starting with OOOf.1

f----+-

173-76lProgram identification taken from
l i t h e name field of the first TITlE
I
Istatement before the START card.
~

I

L-

I

177-80lSequence number starting with 0001. I

Figure 58.

I

Format of Assembler Output Cards (Part 2 of 2)

Appendix I

239

------------------------------------------------------,I

T

I

IField
I

Print
I Meaning
positions ,
J - -_ _ _ _ _ _

I
I

~

L-

External Symbol Dictionary (ESD)

.-

'------,

~

ISYMBOL

0.-08

External label.

1'-12

Symbol
SD LD ER -

15-.6

ESD entry number.

18-23

Address of symbol before relocation.

25-30

Length attribute of symbol.

I
ITYPE

I
I
I
I
I
I
lID

I
IADDR
I
ILENGTH
I
ILD
ID
L - -_ _ _ _ _ _ _

type.
Section Definition (named control section)
Label Definition (from ENTRY statement)
External Reference (from EXTRN statement
or v-type constant)
PC - Private Code '(unnamed control section)

ESD entry number of control section where label appears.

34-35

~

_______

~

Instructions
.----------~----

ILOCATN
I
10BJECT
,CODE
I
IWRN
I
ISEQ
I
IERR
I
ICAT
I
IADDR

Location of assembled instruction (hexadecimal).

I 01-06
,
, 08- 21, or
I 08-23

Assembled instruction (hexadecimal).
constant generated (hexadecimal).

03-05

Flag:

possible error in previous statement.

08- 10

Flaq:

Sequence error in previous statement.

13-15

Flaq:

Error in previous statement.

18-20

Flaq:

Catastrophic error in previous statement.

,

23-28

Effective address of 1st operand (hexadecimal).

IADDR 2

29-34

Effective address of 2nd operand

36-39

statement number (decimal).

I

ISTMNT

I

ISOURCE
ISTATEMENT
L-_ _ _ _ _ _ _ _

4.-.20
~

_______

Source statement (card imaqe). Column 40 contains an
asterisk if a source statement is generated.
~

Relocation Dictionary (RLD)

.-

~--------r-

IPOS.ID
I
I
I
IREL.ID
I
I
I
I
I
IFLGS
I
I
I
IADDR
L--_ _ _ _ _ _ _ _ I

03-04

I
I
10-11
I
I
I
, 5- 16
I
I
18-23
______ I

~

Figure 59.

240

(hexadecimal).

ESD ID number of control section containinq the constant.
ESD ID number of control sections containinq the address in
the ccnstant.
I
I
Type of constant.
I
I
'Address of constant before relocation.
I

~

Assembler output Listing (Part 1 of 2)

S/360 BOS Assembler with I/O Macros

I

•IField

Print
positions

I
L

Meaning

------~-----------,~

.----

Diagnostics
i

ISTATEMENT NO.

I
IERROR
IMESSAGES

05-08

Listing sequence number of statement in error.

20-79

Explanation of error

80-' 20

Action taken by assembler.
------------------------------------------------------~

I

,IACTION

I
I
I
I
I
I

Table of Defined Symbols
i

ISYMBOL

I
I
ILEN

I
I

IVALUE

I
I
ITYPE

I

01-08
65-72

Source Label

11-13
75-77

Length Attribute (decimal)

15-20
79-84

Value Attribute (hexadecimal)

24
88

Type Attribute (decimal)

i

Cross-Reference List

..

ISYMBOL

(Replaces Table of Defined Symbols
when CROSSREF appears in AOPTN.)

0'-08

Source Label

'0- 13

Length Attribute (decimal)

.5-20

Value Attribute (hexadecimal)

22-26

Listing sequence number of statement which defines label.

30-34
36-40
42-46
48-52
54-58
60-64
66-70
72-76
78-82
84-88
90-94
96-100
102-106
108-112
114-1 H~

Listing sequence numbers of statements which
contain the label.

I
ILEN

I
IVALUE

I
IDEF*

I

ICROSSIREFERENCE*

I

* The maximum number of symbols and cross references to
symbols that can be listed is 20,625.
~

Figure 59.

Assembler Output Listing

(Part 2 of 2)

Appendix I

241

-.-- - -'-'--- SYMBOL
SAI'IPLE

TYPE 10
SO

---- -

ADDR

- - - --'Exnit;ulsvMiOLDic'iToNiiy-

t

LENGTH LO ID

m
)C

cC;-

01 0012tO 0002E3

-.~

n

:I

: : ::::::::::::::::::=::::::::::::==::::=:::::::::::::::::~ ~ ~
:1(1)

0-<

':<3

0-

o

LOC~TN

OBJECT COO£

ADDRI ADORZ STMHT

SOURCE STATEMENT
SMPLOODI

AOPTN ENTRY

0001

SAMPLE PROGRAM
LutATN

OBJECT CODE

08/21/65

AOORl AODR2 STIIINT

000)
0004
0005 SAMPLE
0006
001)1
0009 PRINT

ISEQ
PUNCH
START
PRINT
OTFBG
OTFSR

DOLO

001338

00133A

OOU62
00U64
001]611
001178
00137(,

oOlillo
00UII4
001188
00ll8t
OOllAE
OOllAf
001413
001411
001408
00153F
001928

OOS7
0059 IUGII~
0'50
0060
0061
0069
ISU
0015
4120 500t
0141l
0076
0263 5015 2000 OUAF 00000 0071 MOVE
0018
4133 0001
00001
0083
4230 5014
OUU
00B4
9504 5014
OllAt:
0085
4180 5058
0086
01392
4122 0064
00064
0087
UFO 5021"
01368
0088
0089 EHDPROG
0095
0100 TEST
0101 KAPA
484848484848484B
0102 MESSAG£
(2tlE2t9C3400607
0103
E6t9E3C840C9D501
0104
48484B4848484848
0105
0106

71.80
iI PHASE SAMPLE. sa
4800
NOGEN
DISK

242

SIfPlDOOl
SMPlOOO4
SlfPlOO05
SHPLOOO6
SH'lOOOT

BLKSJZE'IOO.CONT~Ol'VES.DEVADOR'SVSLST.OEYrCE'PRrNTER.IOXSMPlOO08

AREA1'KAPA,RECFORM,FIXUNB,TYPEFlE'OUTPUT

OTFEN
BALR
USING
OPEN
tNTRl

5.0
•• 5
PRINT
PRINT.SK.l

SR

1,3

SlfPlM09
SMPLD010
$MPLOOll
SH'LOO12
SM'loon
SMPLOO14
S"PlOOU
SHPlOOl&
SMPlOOIT
SH'lOO18
S"'PlOO19
SMPlOO20
SMPlIlOn
S"PlOO22
SM'Loon
5MI'lOO24
S"'lOO2IJ
SIlt"lOO26
S"JLOD27
S"PLoon
S"PLDD29
S"PlOO'O
SMPLOOn
SMPLOO]2

LA
MVC
PUT

2.MESSAGE
UPA.oUa
PRINT
LA
3.1I3a
STC
3.TEST
TEST.xil04a
Cll
BE
ENDPROG
LA
2.1001:2a
8
MOVE
tNTlll PRINT.SK.l
EQJ
OS
ell

os

DC
DC
Dt
DC
END

CllOO

CL100a ••••••••• t8M SYSTEM /360 •••••••• ;
tllODiSASIC OPfRATING SYSTEM ASSE~8lERa
tLlOoaWITH INPUT OUTPUT MACROS-AK DISKi

CL 100 ••••••••••••••••••••••••••••••••• a

BEGIN

::-:=:::::::=~------------------------------------~:-------Figure 60.

'AS! 002

SOURCE STATEMENT

Example of an Assembler Listing (Part 1 of 2)

S/360 BOS Assembler with I/O Macros

It/ilptOO31

-

:I

CIt
~

c

n

0

:I

-

-

-

-

-

-

-

'flLlIt'l1'Tblf'1flmO"iilRV- -

~

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

'05.10 REL.IO FLGS lDDR
01
01
01
01
01
01
01
01
01
01
01
01
01

01
DC
01
04
01
01
01
04
01
08
01
04
01
04
01
08
01
DC
01
OC
aloe
01
OC
01
DC

0012eo
0012el
0012eD
0012E4
0012F9
001314
001120
001329
001134
001150
00U5e
001374
001398

T
.a

CD

o

n

Q

o

~

o

;.
o
~

Q

-<

OIACNOSTlCS

08128/6'

NO ffIRORS' IN THIS ASSEMBLY

TlBLEOF DEFINED SYMBOLS
SYMBOL
BEGIN
EHOPROG
ICCIOOOI
lc;ewoo01
IGCBOOO)
16CIIOOOI
10CCOOOS
IPRROOOl
IPKTOOOl
. ItAPA
MESSAGE

MOVE
PRINT
PAINU
PRI,NTIS
PRINTC
PItIHTP
SAMPLE

nSf

LEN

VALUE

Z

Inl

4

1392

Z

UIA

I

1321
12C4

2

.
8

1
4
100
100
6
1

"

...

1
I

1

TYPE
-t

0-

X

CD

X

o

A

IZFI

A

1350

A

12FZ

X

12E6

I
C

UAF
14n
U61

c

In..

A

1330
1300
1202
12eo
UAf

X

nco

Q

I
I

-

I

I

1

•e

1

.--'-- - - - - - - - - -- - - - - - Figure 6 O.

Example of an Assembler Listing (Part 2 of 2)

Appendix I

243

,
The followinq is a listing of the card qroupsreguired for the execution of an
I
object proqram when a disk-resident system is not used. Card qroups produced by the I
Assembler in addition to those listed here are the External ~ymbol Dictionary (ESD)
I
and the Relocation Dict~onary (RLD), which are used only if a Linkaqe Editor run is
I
required before execution.
I
~--------------------------------------------------------------------~,
ICard Groups (in order
I Loqic of Execution of the Object Program
I
lof load inq)
I
I

+----------------------------------------The operator initiates the loading of the

~--"-

IIPL Loader

IPL Loader with

~

the load key on the eonsole.

I
I

ISupervisor
IProqram Loader

I
I

r

IFirst Problem Proqram;
lEnd Card

I

IData (if present
I in card form);
IData End Card

I

ISecond Problem Proqram;
I End Card

I
I

The IPL Loader loads the Supervisor and the
Program Leader, and then transfers control to the Program
Loader.
The Proqram Loader loads the First Problem
Program, and then transfers control to it.
The First Problem Program runs to end-of-job,
Sharing control with the Supervisor.
When the First Problem Proqram reaches end-of-job,
control is transferred back to the Program Loader which
loads the next Problem Program and transfers control to it

IData (if present
lin card form)

I
I

I (Anyone or several of
Ithese Prob1em Proqrams
Imay be a Job Control
Iprogram. See Operatinq
IConsiderations. )

~

I
I

ILast Problem Program;
lEnd Card

I

IData (if present
lin card form) ;
IData End Card

lI
I
I
I
I
I
I
I
I
I

When the hopper becomes empty, an error message
will be transmitted to the operator, and the
system will enter the wait state.
----------------------~

If the operator has more Problem Programs or data cards to run, he must place
these cards in the hopper and press the interruption key to resume the operation.
If another Supervisor is to be used, that Supervisor and a Proqram Loader must be
loaded together by the IPL Loader.
If the execution of a Problem Proqram causes the Program Loader to be overlaid or
otherwise disturbed, the Supervisor and the Program Loader must be reloaded toqether
by an IPL Loader before the next Problem Program can be executed.

Figure 61.

244

I
I
I
I
I
I
I
I
I
I

The Object Run When a Disk-Resident System Is Not Used

S/360 BaS Assembler with I/O Macros

APPENDIX J:

Diagnostic messages are printed if
violations of the assembler language are
detected by the Assembler program.
With
each message is printed the number of the
related source program statement, and the
associated action taken by the Assembler
program (Figure 62).
If more than one
error is detected for a source statement,
the diagnostic messages for all errors
detected are listed.
In this case, the
Assembler takes the action that is the most
severe (for the errors detected), and that
action is printed with the diagnostic
messages.
The following list gives the types Qf
assembler actions in the order of their
severity. The most severe action is given
first.

ASSEMBLER DIAGNOSTIC MESSAGES

ASSEMBLY IN ERROR (AlE) - The user's
program cannot be executed. The
assembly runs to completion, but only
the diagnostic messaqes preceding the
ASSEMBLY IN ERROR message may be
considered valid.
GENERATION TERMINATED - Generation of one
macro is terminated.
This does not
affect the generation of other ma~ros.
STATEMENT TREATED AS COMMENTS (STC)
STATEMENT INCOMPLETELY ASSEMBLED (SIA) - If
the statement is a machin~ instruction,
the amount of main storage necessary
for the instruction is reserved and
filled with zeros.
STATEMENT ASSEMBLED (SA)

r-------

----~i----------------------------------------ri-----

JDiagnostic Message
I
I
IASSEM CTL CD-INVALID
INAME FIELD
J
I
I

IMeaning
I

+-

IAn AOPTN, AWORK, or an ALOG card
Ihas been detected with an entry
lin the name field. The name
Ifield was igncired, but the rest
lof the card has been processed.

r---------

----rl~------------------------------------~I~---

lASSEM CTL CD-INVALID OR
IMISSING OPERAND IN
,CONTROL CARD
I
I
I
I
~

IAn AOPTN card was given with no
loperands or with an operand
Ifunction which does not equal one
lof the valid options that can be
Ispecified. The invalid operand is
lignored and any other operands
Ipresent are processed.
,Bits 37, 38, and 39 in a CCW
Istatement are not zero.

------------4_

ICONSTANT TRUNCATED
I

r--

ILLEGAL FORMAT

I
I
I
I
I
I
,
I
I
I
I
I
I
I
I

ISA
I

I
,

I

I

ISpecified constant length is less
I than the actual constant length.

ISA
I

I
I

I

I

I

11.
12.

13.
I

14.
15.
I
16.
I
I
I

Invalid delimiter.
Missing field in CCW statement.
Extra field (s) appear in sta tement operand.
First operand is a literal.
More than one literal operand
encoun tered.
Blank operand in a machine
instruction or in a CCW, DROP,
lCTL, USING, orXFR assembler
instruction.

I

Figure 62.

ISlA
I
I
I
I
I
I

iINotes

----------rl----------------------------------+I----------~I----~

IBITS 37 THROUGH 39 IN CCW
IARE NON-ZERO

I

IAssociated
I Action
I
ISA
I
I
I
I

SIA

I
I
I
,
I

I
I
I

L
I
I
I

Assembler Diagnostic M€ssages (Part 1 of 7)
Appendix J

245

I

IDiagnostic Message
I
I
IILLEGAL MODIFIER IN DC
I
1

I
I
I
I
~-------.----------------

IIMMEDIATE DATA INVALID
1
I
I
I
~

IIMPROPER START VALUE
I
I
1

,

IINVALID ASSEM CTL CD
1

I
I
I
I
I
I .-

.-

IINVALID BOUNDARY ALIGNMENT
I
I

•INVALID

EXPRESSION

\

IINVALID LENGTH VALUE
1
I
I
I
I
I
I
I

I

Figure 62.

i

i

IMeaning
I

IAssociated INotes
I Act;i.on
I

+1--------------------------------+
I ••
1
12.
1
13.
1

,

'
II
I SA

,I

I
1
I

1
I
I

Incorrect modifier or modifier
value in a DC statement.
Incorrect combination of
exponent modifiers.
Exponent and/or scale cannot be
applied to the constant
provided.

+I T he

value in a START sta temen t is
I not a multiple of eight. (The
Ivalue given is increased to the
Inext higher multiple of eight).

I

•

I
I

1

ISlA
I
I
1
I
I
I·
1
1
I
IThe immediate operand in an SI
ISlA
linstruction is:
1
11. Not a self-defining term.
I
I
12. An invalid self-defining
term (e. g., more than one byte) I
1

I
1
I
1
1
1
1
1
I
I
I
I
I

1
I
I

I
I
I
I
I
I
I
,
I
I
I
I
I

--+--------~I~--~~'

11. The operand of an AWORK card
is not a single operand of
I
1
either 1 or 2.
12. The name field of an AFILE
.I
card is blank or contains ALL.
13. The operand field of an AFILE
1
card is not LIBRARY or LIBRARY,
1
RETAIN.
1
IInstruction is not aligned on the
Iproper boundary, ie, for use vith
Ian execute instruction.
I

11.
I
I
I
12.
I
13.
I
1
14.
I
I
15.
I
I
For
1.
2.
3.

4.

I!
246

i

For all instructions except
CCW, DC, ORG, EQU, and USING:
the value of the expression
is negative.
The expression has more than
three terms.
The expre~sion is complexly
relocatable, but it is not
alloyed for this instruction.
The terms in a multiply or
divide expression are not
absolute.
An arithmetic operator begins
or ends an expression.
SS type instructions only.
Length is neqative.
Length is greater than 256
For tvo-Iength instructions:
a. L1 or L2 is negative.
b. L1 or L2 is greater
than '6.
For multiply and divide
instructions:
a~
L1 or L2 is negative,
b. Ll greater than 16,
or L2 greater than 8.
c. L2 is greater than Ll.

Assembler Diagnostic Messages (Part 2 of 7)

S/360 BOS Assembler vith I/O Macros

ISTC
I

I
1
I
1
1
1
1
ISA
1
1
I

SIA

SIA

I
I
1
1
J

I
I
1
I
I
I
I
I

IIDiagnostic

Message

I
I
1INVALID LITERAL
ISPECIFICATION

I
1
1

1
I

1
I
J-INVALID NAME FIELD

IINVALID OCCURRENCE
IOF ASSEMBLER OPERATION

I
I
1

1
I
IINVALID REGISTER IN
IUSING OR DROP
I
1

I
I
I
I
I
I

----~l------------------------------------~I~----------TI-------'

IMeaning
I
I
11. A literal appears in the
1
first operand of an
1
instruction.
12. The literal is incorrect.
I
(The rules for literals are
I
identical to the rules for
1
DC constants.)
13. Literal operand has no left
I
parenthesis or apostrophe.

IAssociated
I Action
I
ISlA

I

I

11.
I
I
I
I
I
12.
I
13.
I
14.
I
I
15.

Fer all instructions except
TITLE: The statement name
begins with a non-alphabetic
character. ($, w, and # are
considered alphabetic cnaracters.)
The statement name is longer
than eight characters.
Nonalphameric characters appear
within the statement name.
A statement name is present
in a statement which may not
have a name.
A DSECT statement has no name.

I
I,.
I
12.
1
13.
I

Program has more than one
START card.
A START card is improperly
placed in the program.
A LTORG appears within a
dummy control section.

1
11.
I

I
12.

I
I

3.

IINVALID REGISTER
ISPECIFICATION

1.

I
I

2.

,

3~

I
I
I
I

4.

I-

I

IINVALID SELF DEFINING
ITERR

Register specified in a
USING or DROP statement is
other than 0 to 15.
Register 0 is specified in a
USING statement with a nonzero absolute value.
Register 0, when used with a
USING statement, is not the
tirst register specified.
Register specified is other
than 0 to 15.
Floating point register specified must be 0, 2, 4, or 6.
Base register specified in a
relocatable operand.
In a USING or DROP statement,
a relocatable expression
appears in an R1, R2, a3, R4,
or R5 field.

I
I

IThe self-defining term:
11. is too large.
12~
is too long.
13. contains an invalid character.

L--

I

Figure 62.

INotes

1
I

I
I
I
I
I

1
1
I

1
1
1
1

I
I
I
I
I

I
I
I
I
I

I
1
I
I
I
I

1

,

I

SA

ISTC

1
I
I

1
I
I
I
I
I
I
I
I
I
I
I

-+ISlA
I
I
I
I
I
I

1
I

I

I

ISlA
I
I
I
I

Assembler Diagnostic Messages (Part 3 of 7)

Appendix J

247

.r---------------------------~

IDiagnostic Message
I

r--'---------LIMIT EXCEEDED

i

i

IMeaning
IAssociated INotes
I
I Action
t
I
I
I
11. The value of the location
AlE
I
I
counter has exceeded 224-'
I
12. The value of the location counI
I
ter set by the ORG statement
I
I
has gone below the initial
,
I
value of the control section.
I
13. The total number of CSECT,
I
I
DSECT, EXTRN, and DC (VI
I
type) statements exceeds 255.
I
14. The total number of CSECT and
I
I
DSECT statements exceeds 32.
I
+I
I
IAn inner macro instruction has
ISTC
11, 2
I been gi ven wi thin a third level
I
I
Imacro. (This macro will not be
I
I
1expanded.)
I
1

I
I
IMACRO-INNER MACRO
I
I NESTING DEPTH
I
IEXCEEDED
1
I
I
I
--------------------~I--+-----------~I------~I
IMACRO INST-INVALID
11. Operand longer than 8 charISTC
I
I
IOPERAND
1
acters.
1
I
I
I
12. Operand has an equal sign in
I
I
1
I
I
other than the first position.
I
I
I
I
I
I
I
I
IMACRO INST-TOO
IMo~e than 49 operands in a macro
ISlA
I
IMANY OPERANDS
linstruction. The extra operands
I
I
lare iqnored.
I
I
I
l--+I
1
IMACRO INST-UNDEFINED
IKeyword in macro instruction does
ISlA
I
IFEYWORD
Inot match any keyword defined in thel
I
I
Iprototype. This operand is ignored; I
I
I
1
I
I all other operands are processed.
I
INOTE: Only one message appears whenl
I
I
Imore than one undefined keyword
I
I
I
lappears in the same card of a macro I
I
linstruction.
I
I
I
l---~
-+--------+I----~I
IMACRO-INVALID DATA IN
INon-numeric character encountered
ISTC
1,2
I
lin an AIF, AIFB, or StTB statement I
I
IARITHMETICOPERATION
I
Iwith an arithmetic relation or a
I
I
I
IS~TA statement.
I
I
~------~---------------+---

I
IMACRO-INVALID RESULT
lIN ARITHMETIC OPERATION
I
I
I

r-

IMACRO-INVALID
ISUBSTRING
I
l---IMACRO-INVALID SYSLST
IREFERENCE
I
IIMACRO-LONG FINAL RESULT
lIN A CHAR. OPERATION
I
IL-______.______________________

Figure 62.
248

--~I--------~------~'

I
I
IFor an AIF, AIFB, or SETB stateISTC
Iment with an arithmetic relation
I
lor a SETA statement:
I
11. Result is negative.
I
12. Result is greater than 2 24 - , .
I
I
I
ISpecified substring not wholly
ISTC
Icontained in the character string
I
lof a SETC instruction.
I
I
I
ISYSLST reference to a parameter
ISTC
Inumber qreater than 49 was
I
lencountered.
1
I
-+
ICharacter string result has exceededlSTC
leight characters in an AIF, AIFB, orl
ISETB statement with a character
I
Irelation
or a SETC statement.
I ________
_____._______________
-L

~

Assembler Diagnostic Messages (Part 4 of 7)

S/360 BOS Assembler with I/O Macros

1,2

1, 2

I
I
I
I
I
I
1
1
I
I

I
11, 2
I

1

1

I

I
11,2

I
I

I

I

1
I
I
I
I_________"I

._~I

I

II

I

I

IDiagnostic Message

IMeaning

.1

I

IAssociated
IAction
I
ISTC

INotes
I

I

+-

I
I
I

+-

IMACRO-LONG INTERMEDIATE
~RESULT IN A CHAR.
IOPERATION

IMACRO SEQUENCE SYMBOL
I NOT FOUND
I

I

IMACRO-UNDEFINED OP
ICODE

I
I

I

I

r-

IMNOTE (plus a message
Icontained in the macro
I def ini tion)
I

INo sequence symbol found in a
Imacro-definition for an AGO,
IAGOB, AIF, or AIFB statement.

I

1

1.

3.

I

I
I

1
1

1
I

14.

Identical symbols appear in
the name fields of two or
more statements.
For an EXTRN statement:
a. Operand is identical to
the name field of another
statement.
b. Two or more statements
have identical oper~nds
The name fields of a CSECT
and a DSECT statement are
identical. The statement
encountered second is considered unnamed.
Base register(s) specified in
USING statement(s) can not
be applied.
A base register has been specified in a relocatable operand.
An absolute displacement is:
a.
Negative.
b. Greater than ~095.
No base register specified.

----------------+_
TERMINATED
IOperator

IOPERATION
ION UPSI BIT 7
I
I
I

Figure 62.

I

I
12.
I
I
13.
I
I

I
I

r--

------------+_
11.

12
1
1

IA message from the macro coder to
the macro user, qenerally identifying an error in the macro
instruction.

2.

I
I
I

STC

+-

MULTIPLE DEFINITION

IHOT ADDRESSABLE
I

I
I 1, 2
I
I
I
I
I
I
I
I
I
1
qeneration I 1, 2
terminated I
1

IAn instruction with an operation
tcode which is not recognized as
la valid System/360 operation code,
land is not contained in the macro
Ilibrary, was found durinq macro
I qeneration.

l--

r--

.

ICharacter string has exceeded
Isixteen characters for an AIF,
IAIFB, or SETB statemeht with a
Icharacter relation or a SETC
Istatement.

intervention due to
Iloop during macro generation
I (UPSI bit 7 was turned on) •
IAGOB, AIFB, and inner macro
Icalls are not processed.

-+

ISlA
I
1

I
I
I
I
I
I
I
1
ISTC

1
1
1
I

I 1, 2
1

1
I
I

Assembler DiagnQstic Messages (part 5 of 7)

Appendix J

249

.-

I

IDiagnostic Message
I

I--

ISTATEMENT FORMAT CANNOT
BE ANALYZED

IMeaninq

IAct~on

I
I
1•

2.

3.
4.

5.

6.

17.
J

I
I

I
I
I

I
I

18.

l--

ISYMBOL NOT PREVIOUSLY
I DEF INED
I

}
ITOO MANY CONTINUATION
ICARDS
I

I-

ITOO MANY REGISTERS
ISPECIFIED IN USING
lOR DROP STATEMENT
I
IUNDEFINED OPERATION
ICODE
I
I

l--

IUNDEFINED SYMBOL
I
I

L--

-+

Invalid term in a CNOP
STC
statement.
Erroneous operand in an
ICTt, ISEQ, ORG, or EQU
statement.
Blank operand in a DC, DS,
EXTRN, or ENTRY statement.
For a DC, or DS:
a. First character in operand
field is not alphabetic,
numeric, or an apostrophe.
b.
No apostrophe or alphabetic character follows
the duplication factor.
c.
No terminating apostrophe.
d. Terminating apostrophe
followed by a nonblank character.
e. Length specified is
non-numeric.
f.
Duplication factor is lonqer
than eiqht decimal digits.
g.
Invalid constant type.
h.
Explicit le~qth qreater
~jan 256 or equal to O.
~.
~~plicit lenqth for a
V-type constant is 1 or 2.
DC or literal has no fourth
subfield.
Parentheses are not paired.
In a DC or CCW statement:
a.
A field is missing.
b. Bad data is given.
No initial apostrophe or no
operand in a PUNCH or TITLE
statement.

+-

IA symbol in the operand of an ORG
lor EQU statement is not defined
lin a previously encountered inIstruction.

I

IAn instruction (other than a
Imacro instruction) has more than
lone continuation card.
I
IMore than five registers are speclified in a USING or DROP stateIment.

I

IMnemonic operation code is not
Irecognized as a valid IBM System/
1360 operation code, and is not
Icontained in the macro library.

-t-

IA symbol has been referenced but
lit is not defined in the name
Ifield of any instruction.

Assembler Diagnostic Messages (Part 6 of 7)

S/360 BOS Assembler with I/O Macros

I

INotes
I
I

ISTC
I
I
I
I
ISTC
I
I
I
ISlA
I
I
I
ISTC
I
I
I
-+-----------r------~

ISlA
I
I

~-------------------------------------~I~------

Figure 62.

250

------------------r-IAssociated

__--~------~

r-

-,--

I
IDiagnostic Message

I
IMeaning

IUNPAIRED AMPERSAND
I
I
I
I

IOdd number of ampersands enIcountered in a constant.. (Two
lampersands must be specified
Ifor every ampersand wanted in
la constant.)

J----------------+_

--.--

--.~i------~

IAssociated
I Action
I
I SA
I
I
I
I,

I
INotes
I
I
I
I
I
,I

r--

I
I
I NOT..§:

1

11I
I
I

1

12.
I
1

These messages refer to statements in the assembly which contain additional
information. This additional information is: the macro name, the operation code
of the instruction in error ~ithin the generated'macro, and a pointer to that
instruction.
Macro diagnostic messaqes may be caused by improper codinq of a macro-definition,
or by improper data in the macro instruction (for example, alphabetic characters
supplied for a lenqth specification).

Figure 62.

Assembler Diagnostic Messages (Part 7 of 7)

Appendix J

251

APPENDIX K:

SUMMARY OF-IMPERATIVE MACRO INSTRUCTIONS

r-------.------------I
r-I

r-

i

Macro Format

I

----------~

Input/Output Control Macros
i

i

I

i

IName
I
I

10perationiOperand
I
I
I
----oj
IBCLOS
Idtfname
I
rI
I
~
1
IBOPEN
I (SEe Bina±1~chronous-Communication for operands to be used with 1
I
I
I the BOPEN macro.)
I
I
-+I
I
IblocknamelCCB
ISYSnnn,command~list-name,X'yyyy'
I
I
f
~
,
I
ICDCNV
Itype,startaddr,lenqth
I
•
I

I
I
•
I
I

r-

I
I
I
I
1
1
1

r-I
I
I
I
I
1

rI
r-

1
I
I

r1

I
1
1
1

1

1

r-I
I
I
I
I

r--1
1
,

252

I
I CHK,PT
I
ICHNG
I
ICLOSE
I
I
ICNTRL
I
I
I
I

I
I
I

IDSPLY

-+-

I DIALO
I
I
IENDFL

---I-

IERRPT
1
1ESETL

+-------------------------In, restart-name, SYSnnn, DISK

•I

I
----------~------ISYSnnn
I
Ifilename
Ifilename1,filename2,filename3,...

J

I

1

r----------------.----------------------------Ifilename,SEEK

,I

I
I
I
t

Ifilename,code,n,m

I

rIdtfname,code,n
r-

,
I
,

Idtfname,code

1

Ifilename,r,r
1
17See Proc~sinq - with_.§~.Y~- for the operand that may be used
Iwith the DIALO macro.)
I
I filename

1
-I
I

--------------.--------------------------------------------1I

+--

Idtfname
1

I
,

I

~

1
,

I filename

I
t·
1EXCP
Iblockname
I
1
-I
IFEOV
1filename
I
-+--~I~-----------------------------------I
1GET
I filename
1
Ifilename,workname
I
1
I
r-I
I
Ifilename"IS
1
I
Ifilename,workname,IS
I
I
+
I
IIDIAL
1 (See Bina~-SynchronousCommunication for operands to be used with 1
I
Ithe IDIAL macro.)
1
Iii
,
ILBRET
11
1
I
12
1

---I-·--------+I---------·----~---------------------------

+------------------------------------------

I

10PEN
1

---L-

+--

1filename
1fil~ename' ,filename2,. • • •
,

S/360 BOS Assembler with I/O Macros

,

I
I

,

r--

IName

J-I
.I
I
1
I

1

I

.1

•

IOperationlOperand
-+-1------+1-IPRTOV
Ifilename1n,routine-name
I
I
1PUT
1filename
I
Ifilename,workname
I
I-1
Ifilename"IS
1
Ifilename,workname,IS

"'1- - - _ + _

1

I
,
1
I
I
I
I
I
I

---+--

IRDLNE

I

Ifilename

I

,I

r--·----~I~-------~I------------------------------------·

READ

Ifilename,KEY
I filename, ID

I
I
I

~-

I

Ifilename,KEY,IS

~ename'OR1tc~~e}
Idtfname,STR

I
I
I

~

Idtfname,BsC,type-code

rl-------4--------+___

I

RELSE

,

I

Ifilename

'~-------~I----------+I------------------------------------------------------------------~

I
I
1
.-

IRESCN
I
ISCLOS
I
I SETFL

I-I
I

I
I SETL
I
I

I

1

r-I
I

~I~---

ISOPEN
I

r-------_+_

ITRUNC
I
1WAIT

1
I
I

I
1
I

Ifilename,r,r,n,F
I
Idtfname
I
1filename

~

I
1
I
I filename, BOF
I
I filename, KEY
I
Ifilename,idname
I
1
I
1 (See Processinq,with 5TR Devices for the operands that may be used I
I with the SOPEN macro.)
I
I
--------------------------~
I filename
1
I
1
I block name
I

I

'~----'---+I--------+--

I
I
I
I

IWAITF
I
IWAITM

r--

~

_______

1

I filename
1
Iblockname1,blockname2,...
Iblocknamen,reg

I
I
I
I

--rl----------rl------·------------------------~

IWRITE
I
I
I
I
I
I
I
I
I
I
I

~

Ifilename,KEY
Ifilename,ID
Ifilename,RZERO
Ifilename,AFTER
J
Ifilename,NEWKEY,IS

I
I
I
I
I
I
I
I

r--Ifilename,KEY,IS

r-------~--------------------------------------------------------~

I
I
I
I

Idtfna(Il€,STR

~

Idtfname,BSC,type-code

,

Appendix I<'

253

r--

,

,

IName

IOperationlOperand

Supervisor Communication Macros

I

i

r------~I--------~I----------

I

I

ICOMRG
I
IDUMP

I
I
I

•I

I
IEOJ

I

•I

I
IEXCP

I
Iblockname

~

r------~I--------~I---------

:

:EXIT~:}

•I

I
IFETCH

I
I
-------------------~

,I

I
Iname

r'-------+I---------rl-----I
IMSG
Icode,REPLY
r--

I
I
I
IMVCOM
Ibyte,n,location
Ir-------;I---------+___
I
ISTXIT
In,pc-name,it-name,oc-name

I--

I
I
I

•
--r-

I IOCFG

•

Supervisor Assembly Macros

,I

Ikeyword=YES,keyword=YES, •••

r-----~--------+I---

I
I
I
I
I
I
I-I

•

I SEND
I
ISUPVR
I

--+ISYMUN
•

I n,REP
I
IDISK=YES,CONFG=nnnnnnnn,TR=YES,CR=YES,SAVEREG=yes
ICONFG=nnnnnnnn,TR=YES,CR=YES,CHKPT=YES

+-------------------------------------------------In,X'ccuu',X ddss',X'ccuu',X'ddss'
1

..l-

,

Job Control Assembly Macros

I
I
----------~

I
1

IJBCTL
I

IRSTRT

,__......._ _ _ _ _ _.1..

254

I

__________________________________.____________________________J

S/360 BOS Assembler with I/O Macros

AP~DIX

,--

i

i

L:

i

BLANKL-2Q]~TE

I

i

BLANK, AND INTERMEDIATE LRC REQUIREMENTS

I

I

I

- - , - - - - r " l- - -.....

1
1

1 BOS/BPSI7702 17702
17711 17711
11978 11978
11013
11009 11009
1 BI NARY 1BCD
1BINARY 1BCD
1 BINARY I BCD
1
1BIN ARY 1BCD
1 STR
J
-+
1
1
1
1
1
1
1
---+---+1-- - - - I
ITransmits IROXN
IROXN IINVALIDIROXN IINVALIDIROXN 12480
12480
IROXN 12480
1Blank
I
1
1
I
1
1
1
1
1
I
-+---f-1
1
1
I
-+
1
--+I----t
,
I
ITransmits 12480
12480 12480
12480 12480
12480 IINVALIDIINVALIDI2480 12480
ISubstitutel
1
1
I
I
1
I
I
I
1
IBlank
1
I
1
I
I
1
1
1
I
I
1------+
,I
1
1
I
I
I
I
+---+-1- - - - f
ITranmits I YES
I NO
I NO
I NO
I NO
I YES
1YES
I YES
I NO
1YES
Iand r eI or
1
I
J
1
I
1
1
I
I
1cei ve s
I NO
1
1
I
I
1
I
I
I
I
lintermed. 1
1
1
1
1
1
I
1
I
1
ILRC
I
I
1
I
I
1
1
1
1
I
l-I
I
1
I
1
I
1
1
I
1
1
IReceives 1 Blank IBlank IINVALIDIBlank ISubst. IBlank IINVALIDIINVALIDIBlank IINVALIDI
JROX N i l
I
1
1Blank I
1
1
I
1
I
l-I
I
I
1
I
+---+
+I
-+
I
IReceives I Subst. I Subst. I Subst. I Subst. I Subst. I Blank. 1Blank I Blank I Subst. I Blank I
12480
IBlank IBlank IBlank IBlank IBlank ,IBlank II
1
IBlank ,I
1I
,
, - - L_ _ _-'-_ _ _
,
---'~,

-r--------,

,'---'--r]--------rll

17 bit Tape Code 17 bit Tape Code I
1 (E ven parity)
I (Odd parity)
I

I
1

ICard Code
1

IBlank

INo Punches IInvalid

r-

,

ISubst.
IBlank
'--

I

1

12-8
Ipunches
,

-+--------+--------1
IC bit
-+---------t
IC-A Bits
I

IA Bit

I

- - ' - -_ _ _ _ _ _ _ _ .1.

The 7702, 771., '978, and 1009, all in binary mode, handle blank
and SUbstitute blank compatibly with BCS/BPS STR support.
THE CDCNV macro instruction may be modified to transmit a blank as
2-4-8-0, or to receive a 2-4-8-0 as a blank. This modification may
be used to provide compatibility with the 7702, 1009, and 1978 in
BCD, and the 1013.
To modify CDCNV, type E, for transmitting a blank as 2-4-8-0,
execute the following instruction before converting the first record:
MVI IOCTBLE+64,X'2E
To modify CDCNV, type F, for receiving a 2-4-8-0 as a blank,
execute the'following instruction before converting the first record:
MVl IOCTBLF+46,X'40'
The CDCNV macro expansion provid~s the table for translation on
the first expansion of a particular type. Therefore, if the problem
program uses types E and F, modified and not modified, in the same
program, the byte in question must be modified before each CDCNV
(type E or F) used.

APPENDIX L

255

HEXADECIMAL
REPRESENTATION

LENGTH
IN BYTES

ACK-O

1070

2

ACK-l

1061

2

ENQ

2D

EOT

CHARACTER

MEANING

PROVIDED
BY *

Even-odd positive alternating
a c knowl edg me nts

IOCS
(pr .pr.)

1

Inquiry--requests permission
to send

IOCS
(pr .pr.)

37

1

End-of-transmission character

IOCS

DLE STX

1002

2

Start-of-transparent-text
sequence

pr.pr.

DLE EOT

1037

2

Disconnect sequence

IOCS

WABT

107F

2

Wa i t-before-transm itti ng
sequence

IOCS

DLE ETX

1003

2

End-of-transparent-text
sequence

IOCS

DLE ETB

1026

2

End-of-transparent-block
sequence

IOCS

STX EOT

0237

2

Positive acknowledgment but
signifies inabil ity to continue

pr.pr.

DLE ENQ

102D

2

Disregard this record

IOCS

NAK

3D

1·

Negative acknowledgment requests retransmission

IOCS

SOH

01

1

Start-oF-header character

pr .pr.

* pr .pr.

- Th is character is supplied by the problem program as a part of the text message.

(pr .pr.) - This character is included by the problem program after the last ID-character in
each ID-sequence.
IDCS-BSC support (macro routines or error recovery procedures) supplies this character.

256

S/360 BOS Assembler with I/O Macros

PART-2---SUMMARY-OF-CHECKS-TO-BE-~ADE-AT-I/O-CQMPtETION-

CHECK

LOCATION

IF ON, CHECK FURTHER FOR

LOCATION

Normal Completion

BSC flag byte I-COMPLETION
bit 0

No further checking is necessary
unless a READ operation--then
check EOT or DLE EOT received
(which are normal completions).

BSC FLAGS
byte II-RECEIVED f1ags-bit 6

I/O Error

BSC flag byte I-COMPLETION
bit 1

Lost data (READ macros)

TRANSMISSION
FLAGS--byte II
(dtfname + 7)
bit 0

Message Format Error

BSC flag byte 1-COMPLETION
bit 2

Bus-out check

bit 1

Intervention required

bit 3

Time out

bit 6

Unit exception*

bit 5

Th is bit alone:
1. unrecogn izable response
characters
2. text messages with invalid
text-framing characters

-----------

Invalid ID (JDIAL only)

BSC flag byte I
COMPLETION
bit 5

Invalid ACK (WRITE macros or
(DIAL)

BSC flag byte I
COMPLETION
bit 7

Unexpected response and a
bit in byte II--RECEIVED
flags (EOT, WABT, etc.)**

BSC flag byte I
COMPLETION
bit 6 and byte
II RECEIVED
flags

*

Set by PIOCS to indicate unit exception ·on a WRITE command, which occurred because the CPU
attempted to transmit while ~n receive mode. This normally is a contention situation, occurring when
both CPUs attempt to transmit at the same time. Because the line has probably been "cleared" by a
READ command with the skip flag on, issued by PIOCS, a retry of the failing macro will probably be
successful.

**

If an EOT is received as an unexpected response to a WRITE macro on a switched line, the transmitting
CPU (which issued the WRITE macro) should issue a CNTRL EOT macro. This allows the remote
(receiving) CPU to issue CNTRL ENQ and to transmit.

APPENDIX M

257

PART 3 -

SAMPLE~RA~

The BOS/BSC sa~ple program (Figures 63 and
64) illustrates line contrel procedures for
a leased line and error checking after the
completion of BSC macros. The listings are
self-explanatory.
Fig~£§~J:

80-characte~ records are read
from a card reader and sent to the
remote CPU (Figure 63). At EOF on the
reader, EOT is sent to the remote CPU,
signifying end-pf~transmission.
READ
TQ (inquiry) is issued to prepare to
receive records from the remote CPU.

258

S/360 BOS Assembler with I/O Macros

The 80-character records received are
printed. At end-of-job, the ERRPT
macro is issued to display the error
statistics and transmission count.
Fiqure-64: CNTRL Prepare is issued to
prepare to receive records from the
remote CPU. The 80 characters received
are printed.
When EOTis received,
CNTRL ENQ is issued.
80-character
records are read from a card reader and
sent to the remote CPU (Figure 63). At
end-of-job, the ERRPT macro is issued
to display the error statistics and
transmission count.

1/ J08 ASSEM8LER

II OATE 67130
II VOL
II OLA8
II XTENT
II EXEC

••

•

WTFllE

BSCFILE

ENTRY
TESTA,S
'SAMPLE PROGRAM - CPU-A'
X'lFOS'

OTF8G DISK
OTFSR BLKSIZE=SO,DEVADDR=SYSIPT,DEVICE=READ40,EOFADDR=EOT,
•
IOAREA1=ROCARD,TYPEFlE=INPUT
OTFSR BlKSIIE=SO,OEVADDR=SYSLST,DEVICE=PRINTER,IOAREAl=RDCAR0,.
TYPEFlE=OUTPUT
DTFEN

DTfRF 8EGIN,3
OTF8S DEVADOR=SYS002,AREA=WTAREA,LENGTH=WTlEN,BSCFlAG=ERRFlG, •
RCOUNT=7

• INfTIAlIIATION--OPEN'S
•BEGIN 8ALR REG6,0

•

USING
OPEN
aOPEN
WAIT
TM

al

•
•

*•

Figure 63.

AND BOPEN

*,REG6
ROFIlE, WTF IlE
OTFNAME=BSCFILE,INTRFC=B,DIAl=NO
8SCFILED
TEST FOR NORMAL COMPLETION OF aOPEN
ERRFLG,X' SO·
ERPT
NO---ERRPt EXIT VES---CONTINUE

SET UP BSC CC8 FOR WRITE (AND READ) OPERATION
l
LA
ST
LH
STH

REG5,THREE
REG4, SDCARD
REG4,WTAREA
REG4,lENGTH
REG4,WTlEN

SET UP REGISTER FOR
SET UP AREA ADOR ESS
WITH DATA AREA
SET UP LENGTH FIELD
DATA lENGTH

RETRY lOOP
FIELD OF cca
ADDRESS
OF CCB WITH

REQUEST PERMISSION Of REMOTE CPU TO SEND (CNTRl ENO)

ENOSND

*

*

8SC FILE DEFINITION SECTION

•8ASE

*•

111111!',

FILE DEFINITION SECTION--CARD READER AND PRINTER

RDFIlE

••

AOPTN
REPRO
PHASE
TITLE
START

SYSOOO,WORKl
'80S SK DISK
0001,65099,65099,'0000000000000'
1,000,0116000,0195009,'111111',SYSOOO

CNTRl
WAIT
TM
80
TM

BSCFILE,ENO
BSCFILED
ERRFlG,X'SO'
PROCEDE .
ERRFLG,X'22'

eo
LA

CHKl
REG7,ENQSND

TEST fOR NORMAL COMPLETION OF CNTRl
YES---CONTINUE NO--TEST FOR MESSAGE FORMAT ERROR AND
UNEXPECTED RESPONSE
BOTH CONDITIONS--CONTINUe CHECKING
SET UP RETURN ADDRESS FOR TIME OUT

(Part 1 of 3)

APPENDIX M 259

CHKl

8

TM
80
TM
80
TM
8l

8CT
8

**

YES---RETRY THE CNTRL ENQ
STill GETllNG WABT---WA8T EXIT

GET A RECORD FROM THE CARD READER--SEND IT TO CPU-8 CREMOTE)

*PROCEDE

*
RDACD
SNDCD

*

TM

REG5,THREE
PGMSW,X'Ol'

80
GET
WRITE
WAIT
TM
80
TM

SNDCD
RDFIlE
8SCFILE ,8SC, TT
BSCFILED
ERRFlG,X'80'
RDACD
ERRFlG,X'Z2'

80
lA

CHK2
REG7,SNDCO
ERROR
ERRFlG+l,X'OZ'
ENOOJ
ERRFlG+l,X'Ol'
ERROR!
PGMSW,X'Ol'
REG5,ENOSND

l

8

CHK2

TM
80
TM
8l
01

8CT

** END-OF-FIlE---SEND EOT (CNTRl
* (CNTRl PREPARE)
*EOT
CNTRL 8SCFILE,EOT
PREPARE

*

WAIT
TM
Bl
READ
WAIT
TM
80
TM

BSCFIlED.
ERRFlG,X'SO'
ERROR!
BSCF II E, 8SC, TO
BSCFIlED
ERRFlG,X'SO'
READ
ERRFlG,X'Z2'

eo

CHK3
REG7,PREPARE
ERROR
ERRFlG+l,X'02'
ENDOJ
ERRORl

lA

B

CHK3

TM
80
8

**

ANY OTHER--ERROR EXIT
WAS UNEXPT. RESP. ANENQ(CONTENTION)
YES--TRY A READ NO-WAS THE UNEXPT. RESP. AN EDT
YES---END OF J08 NO--WAS THE UNEXPT. RESP. A WABT

ERROR
ERRFlG+l,X'08'
READ
ERRFlG+l,X'OZ'
ENOOJ
ERRFlG+l,X'Ol'
ERRORl
REG5,ENQSND
EWA8T

RESET REGISTER FOR RETRY LOOP
WAS THE CNTRl ENQ REISSUED BY THE
WRITE ROUTI NE
YES--SKIP GETTING A NEW RECORD
GET A RECORD FROM THE CARD READER
SEND IT---WRITE-TYPE IS 'CONTINUE'
TEST FOR NORMAL COMPLETION OF WRITE
YES--GET ANOTHER RECORD TO SEND NOTEST FOR MESSAGE FORMAT ERROR AND
UNEXPECTED RESPONSE
80TH CONDITIONS--CONTINUE CHECKING
SET UP RET.URN ADDRESS FOR TIMEOUT
ANY OTHER--ERROR EXIT
WAS THE UNEXPT. RESP. AN EDT
YES--END OF JOB NO--WAS THE UNEXPT. RESP. A WABT
No---ERROR EXIT YES-SET SWITCH TO RESENO THIS RECORD
SEND ENQ AGAIN
EDT) AND PREPARE TO RECEIVE ENQ

TEST FOR NORMAL COMPLETION OF CNTRl
No--ERROR EXIT YES-TEST FOR NORMAL COMPLETION OF CNTRL
YES--CONTINUE NO-TEST FOR MESSAGE FORMAT ERROR AND
UNEXPECTED RESPONse .
80TH CONDITIONS--CONTINUE CHECKING
SET UP RETURN ADDRESS FOR TIMEOUT
ANY OTHER--ERROR EXIT
WAS THE UNEXPT.RESP. AN EOT
YES--NORMAL END OF J08
No--ERROR EXIT

RECEIVE A RECORD AND PRINT IT USING SAME DATA MEA ANO LENGTH

*READ

READ

BSCFllE,BSC,TN

RECEIVE A RECORD--READ-TYPE ,CONTINUE

---------------------------~-------------------------------

Figure 63.

260

(Part 2 of 3)

5/360 BaS Assembler with I/O Macros

•
.'

BSCfILEO
ERRfLG,X'SO'
REG1,READ
ERROR
ERRfLG+l,X'02'

BO
PUT

ENDOJ
WTflLE
READ

TEST FOR NORMAL COMPLETION OF READ
SET UP RETURN ADDRESS fOR TIMEOUT
NO--ERROR EXIT YES-TEST FOR EDT RECEIVED WITH NORMAL
COMPLETION
YES--NORMAL END Of JOB
NO--PRINT THE RECORD
RECEIVE ANOTHER RECORD

ERRfLG,X'40'
ERRORl
BSCfILEO+3,X'OZ'
TIMEOUT
ERR
ENOOJB

TEST FOR 1/0 ERROR
NO-EXIT YESTEST fOR TIMEOUT
YES--GO TO ROUTINE ELSE
ISSUE INDICATIVE MESSAGE
SEND AN EOT INDltATiNG END Of JOB

PGHSW,X'J.O'

HAS TIMEOUT BEEN RETRIED
YES--EXIT
NQ--TURN ON SWITCH INDICATING RETRY
RETRY

B

ERROR EXIT

*ERROR
ERRORl

••

WAIT
TM
LA
BZ
TM

TM
BZ
TM
BO
MSG

B

TIME OUT

*TIMEOUT

TM
BO
01

8R
MSG
B

*+10

PGHSW.X·10'
REG7
TIME
ENOOJB

•*•

WABT EXIT

••

NORMAL END-Of-JOB EXIT

eWA8T

*ENDO.J
ENDOJB

ERPT

•

MSG
B

MSG
EOU
CLOSE
BeLOS
WAIT
ERRPT

WA8T
ENOOJB

EOJ

ISSUE EOJ MESSAGE

*RDfIlE,WTfILE

CLOSE THE fILES

8seflLE
8SCflLED
8SCfILE

PRINT THE ERROR STATISTICS

EOJ

*
•* REGISTER EOUATES
*REGIt
EOU
4
REG5
ItEG6
REG7

*
*

EOU
EOU
EOU

ISSUE INDICATIVE MESSAGE
GO TO END OF JOB

5
6

7

WORK REGISTER
COUNT-CONTROLLED LOOP REGISTER
BASE REGISTER
TIMEOUT RETURN ADDRESS

CONSTANTS

*THReE
LENGTH
PGMSW

DC
DC
DC

F'3'
X'02'
CLBO
X'03'
H'SZ'
X'OO'

•*

END

BASE

SOCARO

ROCARD

DC

DC

OS

LOOP COUNT
STX
DATA AREA
ETX
DATA LENGTH
PROGRAM SWITCH--CONTRO~S EXIT fROM
WABT LOOP

II END

Fiqure 63.

(Part 3 of 3)

APPENDIX M 261

II
II
II
II

JOB ASSEMBLER
DATE 67130
VOL
SYSOOO,WORKI
DLAB
'BOS 8K DISK
0001,65099,65099,'0000000000000'
II XTENT
1,000,OI16000,0195009,'111111',SYSOOO
II EXEC
AOPTN ENTRY
REPRO
PHASE TESTA,S
TITLE 'SAMPLE PROGRAM - CPU-B'
START X'lFOS'

•

•

RDFLE
WTFLE

** BSC
*BASE
BSCFLE

•*
•
*

Figure 64.
262

FILE DEFINITION SECTION
DTFRF BEGIN,3
DTFBS DEVAODR=SYS002,AREA=RDAREA,LENGTH=RDLEN,BSCFLAG=ERRFG,
RCOUNT=-7

BALR
USING
OPEN
BOPEN
WAIT
TM
BZ

REG6,O
.,REG6
ROFLE,WTFLE
DTFNAME=BSCFLE,INTRFC=B,DIAL=NO
BSCFLED
ERRFG,X'SO'
TEST FOR NORMAL COMPLETION OF BOPEN
ERPT
NO---ERRPT EXIT, YES---CONTINUE

SET UP BSC cca FOR READ (AND WRITE) OPERATION
L
LA
ST
LH
STH

REG5,THREE
REG4,STCARO
REG4,RDAREA
REG4,LENGTH
REG4,RDLEN

SET UP REGISTER FOR
SET UP AREA ADDRESS
WITH DATA AREA
SET UP LENGTH FIELD
DATA LENGTH

RETRY LOOP
FIELD OF CCB
ADDRESS
OF CCB WITH

PREPARE TO REAO BY RECEIVING ENQ FROM REMOTE CPU

*PREPARE

•

DTFBG DISK
DTFSR BlKSIZE=80,DEVADDR=SYSIPT,DEVICE=READ40,EOFADDR=ENDOJ, *
IOAREAl=WTCARD,TYPEFLE=INPUT
DTFSR BLKSIlE=SO,DEVADDR=SYSLST,OEVICE=PRINTER,IOAREA1=WTCAR0,.
TYPEFLE=OUTPUT
DTFEN

INITIALIZATION--OPEN'S AND BOPEN

*BEGIN

•

•

FILE DEFINITION SECTION--PRINTER AND CARD READER

*

**

1111111',

CNTRL
WAIT
TM
BO
TM

BSCFLE,PRP
8SCFLED
ERRFG,X'SO'
READ
ERRFG,X'22'

BO
LA

tHCKI
REG7,PREPARE

(Part 1 of 3,)

S/360 BOS Assembler with I/O Macros

TEST FOR NORMAL COMPLETION OF CNTRL
YES--CONTINUE NO-TEST FOR MESSAGE FORMAT ERROR AND
UNEXPECTED RESPONSE
BOTH CONDITIONS--CONtINUE CHECKING
SET UP RETURN ADDRESS FOR TIMEOUT

*

CIiCKl

B
TM
BO
B

ERROR
ERRFG+l,X'OZ'
ENQSND
ERRORl

* RECEIVE A RECORD AND PRINT
*
*
READ BSCFLE,BSC,TN
ReAD
*
WAIT BSCFLED

*
•*

TM
LA
BZ
TM

ERRFG,X'SO'
REG7,READ
ERROR
ERRFG+l,X'OZ'

BO
PUT
B

ENCSND
WTFLE
READ

ANY OTHER--ERROR EXIT
WAS THE UNEXPT. RESP. AN EOT
YES--GO TO WRITE
NO---ERRQR EXn
IT
RECEIVE A RCD FROH CPU-A---READ-TYPE
CONTINUE
TEST FOR NORMAL COMPLETION OF READ
SET UP RETURN ADDRESS FOR TIMEOUT
NO--ERROR EXIT YES-TEST FOR EOT RECEIVED WITH NORMAL
COMPLETION
YES--BEGIN SENDING RECORDS
NG--PRINT THE RECORD
RECEIVE ANOTHER RECORD

REQUEST PERMISSION OF REMOTE CPU TO SEND CCNTRL ENO)

4'

ENQSNO

•

CNTRL
WAIT
TM
BO
TM

BSCFLE,ENQ
BSCFLEO
ERRFG,X'SO'
PROCEDE
ERRFG,X'ZZ'

80

CHCKZ
REG7,ENCSNO
ERROR
ERRFG+l,X'OS'
ENOOJO
ERRFG+l,X'OZ'
ENDOJ
ERRFG+l,X'Ol'
ERRORl
REGS,ENQSNO
EWABT

LA
8
OiGK2

TM
60
1M

BO
1H

BI

aCT
B

TEST FOR NORMAL COMPLETION OF CNTRL
YES--CONTINUE NO-TEST FOR MESSAGE FORHAT ERROR AND
UNEXPECTED RESPONSE
BOTH CONDITIONS--CONlINUE CHECKING
SET UP RETURN ADDRESS FOR TIMEOUT
~NY OTHER--ERROR EXIT
WAS UNEXPT. RESP. AN ENQ(CONTENTION)
YES--END THE JOB NO-WAS THE UNEXPT. RESP. AN EOT
YES--NORMAL END OF JOB NO-WAS THE UNEXPT. RESP. A WABT
NO--ERROR EXIT
VES--RETRY THE CNTRL EN~
STILL GETTING WA.8T-WAST EXIT

**

GET A RECORD FROM THE CARD READER--SENO IT TO CPU-A (REMOTE)
..PRoOl-cOE
REG5,THREE
RESET REGISTER FOR RETRY LOOP
L

..
ROACD
SNOCO

..

MVI
TM

STCARD,X'OZ'
PGMsw,x'ol'

80

SNDCD
ROFLE
BSCFLE,BSC,TT
BSCFlED
ERRFG,X'SO'
RDACD
ERRFG,X'22'

GET
WRITE
WAIT
TM
BO
TM
BO

LA
8

Figure 64.

CHCK3
REG7,SNDCD
ERROR

RESTORE THE STX CHARACTER
WAS THE CNTRL ENQ REISSUED BY THE
WRITE ROUTINE
YES--SKIP GETTING A NEW RECORD
GET A RECORD FROM THE CARD READER
SEND IT---WRITE-TYPE IS 'CONTIN~E'

TEST FOR NORMAL COMPLETION OF WRITE
YES--GET ANOTHER RECORD TO SEND NOTEST FOR MESSAGE FORMAT ERROR AND
UNEXPECTED RESPONSE
BOTH CONDITIONS--CONTINUE CHECKING
SET UP RETURN ADDRESS FOR TIMEOUT
ANY OTHER--ERROR EXIT

(Part 2 of 3)

APPENDIX M 263

CHCK3

TM
BO
TM
BI
OI

BCT

* CONTENTION
*
*ENOOJQ MSG
B

* ERROR
*
*E~ROR

WAS THE UNEXPT. RESP. AN EOT
YES--END OF JOB NO-WAS THE UNEXPT. RESP. A WAST
NO--ERROR EXIT YES-SET SWITCH TO RESEND THIS RECORD
SEND ENQ AGAIN

EXIT
CENQ
ENDOJB

ISSUE INDICATIVE MESSAGE
SEND AN EOT INDICATING END OF JOB

ERRFG.X·40·
ERRORl
BSCftED*3yX'02'

TEST FOR 1/0 ERROR
NO--EX IT YES-TEST FOR TI MEOUT
YES--GO TO ROUTINE ELSE
ISSUE INDICATIVE MESSAGE
SEND AN EDT INDICATING END OF JOB

EXIT
TM

BI
TM

ERRORl

ERRFG+l,X'02'
ENDOJ
ERRFG+1,X'01'
ERRORl
PG"'SW,X'Ol'
REG5,ENClSND

BO
MSG
B

TIMEOUT

ERR
ENDOJB

*

* TI"EOUT
*
TIMEOUT TM
BO
01

OR
MSG
B
*

* WAST
*EWA8T

MSG

ERPT

ISSUE INDICATIVE MESSAGE
GO TO ENO OF JOB

MSG
CNTRl
WAIT
CLOSE
BClOS
WAIT
ERRPT

EOJ
BSCFlE,EOr
BSCFlED

ISSUE EOJ MESSAGE
SEND AN EOT

RDFlE,~HFLE

CLOSE THE FILES

BSCFlE
8SCFLED
BSCFlE
PRINT THE ERROR STATISTICS

*
*

EOJ

REGISTER EQUATES

*
REG4
REG5
REG6

REG7

*
*

WAST
ENDOJB

NORMAL END-OF-JOB EXIT

ENOOJ
ENOOJB

**

HAS TIMEOUT BEEN RETRIED
YES--EXIT NO-TURN ON SWITCH INDICATING RETRY
GO TO RETRY

EXIT
B

*
**

PGMSW,X'lO'
*+10
PGMSW,X'lO'
REG7
TIME
ENDOJB

EQU
EOU
EQU
EQU

4
5
6

7

CONSTANTS

'THREE
"

LENGTH
PGMSW

DC
DC
OS
DC
DC
DC

F' 3'
X' 02'
ClBO
X'03'
H'8Z'
x·OO'

*
*

END

BASE

STCARD
WTCARD

II END

Fiqure 64.

264

WORK REGISTER
COUNT-CONTROLLED LOOP REGISTER
BASE REGISTER
RETURN ADDRESS FOR TIMEOUT

(Part 3 of 3)

S/360 BaS Assembler with I/O Macros

LOOP COUNT
STX
DATA AREA
ETX
DATA LENGTH
PROGRAM SWITCH--CONTROLS EXIT FROM
WABT lOOP

PAB!~~~BSC

SUPPORT CHANNEL PROGRAMS

The BOS/BSC Support channel programs (CCW
lists) set up by BSC macros to facilitate
the sending and receiving of data to and
from a remote CPU follow. For a
description of each macro and/or type
operation, refer to Binary_Synch~ono~~
CO!!U!l~.!!ic atJ:on.
These command sequences may be useful to
the problem program which must interface
with some other BSC support, such as DOS
BTAM BSC.

Using the DIAL keyboard operand coded on
the BOPEN macro instructicn, one of the
followinq BSC channel programs is set up.

.

------------~-------------------.

IDIAL operand
j--

IDIAL=YES
I
j--

I channel commands

+--

I Disable
I Set Mode

+-

I Disable
I Set Mode
I Enable

IDIAL=NO
I
I
L---

~,

_______

i

,,

,
channel commands

I
I
IBCLOS Macro
I

-+-, Disable

L-

--L-

I
-f

,

I Set Mode

I
J

The appropriate channel program for R~AD is
set up according to the type-code spec~~ied
on the READ macro instruction.
r----

,Type-code

,

~

I channel commands

I

ACK
I READ data

I
I
I
I
I
-f

r-

+---------------1

r-

+-

ITN (Continue)
I
ITP (Repea t)
I

,

ITG (Continue with
Ileadinq graphics)
I
I
ITL (Repeat with
Ileading qraphics)
I
I
ITQ (Inguiry)

, WR ITE
I
I
I
I
I
I

WRITE NAK
READ data

,

WRITE qraphics
WRITE ACK
READ data

I
I

,

+- WR ITE

graphics
I
I WRITE NA K
I READ data

-+- READ
I

I
I
I
-f
I

ENQ

-'-

Using the parameters on the IDIAL macro
instruction and the problem
program-supplied IDLST, one of the
following BSC channel programs is set up.
r-

IIDIAL operands

~------

I channel commands

I-------___t_
IDIAL-ANS or
IDIAL=MAN and
, OPTYPE=RD

r

I
I
I
,

En.able
READ [RCVID] ENQ
WRITE [SNDID] AC!{-O
READ data

----------+_

IDIAL=CALL and
IOPTYPE=WT Q£
IDIAL=MAN and
IOPTYPE=WT
,

I
I
I
I
,

Dial or Enable
WRITE [SNDID] ENQ
READ [RCVID] ACK-O
WRITE data
READ response

IDIAL=CALL and
IOPTYPE=WTX or
IDIAL=MAN and
IOPTYPE=WTX
I
I

I
I
I
I
I
I

Dial or Enable
WRITE [SNDID] ENQ
READ [RCVID] ACK-O
WRITE data
WRITE DLE ETX
READ respons~

L-

I

r-

,

BCLOS Ma.f£g
The following BSC channel program is set
up.

J

WRITE Macro
rne appropriate channel proqram for WRITE
is set up according to the type-code
specified on the WRITE macro instruction.
i

~

I

Itype-code
I channel commands
I----------+__
ITT (Continue)
I WR ITE data
I
I READ response
I
I
ITC (Conversational) I WRITE data
I
I READ data (or
I
I response)
f--+ITX (Transparent
I WRITE data
I Text)
I WRITE DLE ETX
I
I READ response
I
-+ITXB (Transparent
I WRITE data
IBlock)
I WRITE DLE ETB
I
I READ response
,
I
lTV (Transparent
I WRITE data
I WRITE DLE ETX
I Conversational)
I
I READ data (or
IL-______________.____ I response)

I
----1

I
I
-f
I
I
I
I
I
I
I

,

I
I
I
I
I
I
I
I

~

APPENDIX M 265

PART5-BOS/BSCTP OPCODES
For each operation type (code parameter on
the CNTRL macro instruction) the
appropriate channel program is set up.
r---

------------~

loperation type

I

I channel commands

BOS/BSC support uses bytes 40-47 of the
channel command word (CCW), which are
normally not used, for a IITP op code ll ,
indentifying to PIOCS the operation being
performed by the command.

I

I--

+---

,

r-------~I------------

i

IWABT (Wait before
I Tra nsmi tting)

J WRITE WABT
I Prepare
I READ response

I

I

I
I
I
-I
I
I
I
I
I

I
I
IPRP (Prepare)
I

r-

IENQ (Inquiry
I

i

IDSC (Disconnect)
I

I
I

J

ITP CODE I

I
I

I
I
I
IX'O,.

I
I
I

I

I

1

i WRITE Disconnect

1
,I

I
I x' 02'
I
I

I

I

I
I
I
I
I
,

Prepare
READ response

---f

WRITE ENQ
READ response

-+-

(DLE EOT)

I
I

II
I
I EOT (Ie ased line)
I WR ITE EOT
I
I+--------------1
I EOT (dial line)
I WRITE EOT
I
I
I READ
response
_______ ---L-_
__
_ _ _ _ _ _- - JI

IX' 03'

I
IX'04'

I
IX'05'

I
I
IX'07'

I

WRITE special characters: DLE
ETB, DLE ETX, qraphics, or WABT
WRITE [ ID] ENQ
WRITE [ID] ACK-O
READ response to CNTRL ENQ
EOT

..{)~

READ [ID] ACK-.O

IX'09'

WRITE response to text or ENQ
READ or WRITE text

, ,.

IX'20'
IX' 21 '

I

S/360 BOS Assembler with I/O Macros

Prepare, Enable, Dial, or
Disable command

I
I X'
I
I

266

I

MEANING

READ response to text
WRITE EOT, DLE EOT, Set Mode

X'24'

READ ENQ (READ TQ or READ
response after Prepare)

X'31'

READ Skip - error recovery

X'32'

WRITE ENQ - error recovery

X'34'

READ ENQ - error recovery

X'35'

WRITE DLE ENQ - error recovery

X'39'

WRITE NAK or current SNDACK error recovery

A-Type Address Constant ••••••••••••••••

43

ABORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

Absolute and Relocatable Expressions •••
18
Absolute Expressions •••••••••••••••••••
18
Absolute Terms •••••••••••••••••••••••••
12
ADAREX (DTFIS) •••••••••••••••••••••• 107,158
ADD (DTFIS IOROUT) •••••••••••••••••• 107,162
Adding Records to a File (by DAM)...... 92
Adding Records to a File
(by ISFMS) •••••••••••••••••••• 102,107,158
Addition of Records, and Overflow Areas
(for ISFMS) •••••••••••••••••••••••••• 101
Address Constant, A-Type ••••••••••••••• 43
Address Constant, S-Type ••••••••••••••• 43
Address Constant, V-Type............... 44
Address Constant, Y-Type •••••••••••••••
43
Address Constants •••••••••••••••••••••• 42
Addresses - Explicit and Implied ••••• ~20,30
Addressing •••••••••••••••••••••• 20,23,29,51
Addressing Dummy sections •••••••••••••• 25
Addressing External Control sections ••• 27
Address, Base •••••••••••••••••••••••••• 6,20
Address, Explicit ••••••••••••••••••••• 20,30
Addres s, Impli ed'•••••••••••••••••••••• 20,30
ADDRTR (DTFIS IOROUT) ••••••••••••••• 107,162
AFILE Card ••••••••••••••••••••••••••••• 193
AFTER (DTFDA) ••••••••••••••••••••• 92,95, 152
Alignment, Boundary •••••••••••••• ~.20,35,38
Alignment, Forcing with DS statement ••• 45
Alignment, Instruction ••••••••••••••••• 29
ALL (DTFPH MOUNTD) ••••••••••••••••••• 67,172
ALOG Card •••••••••••••••••••••••••••••• 192
Alternate Tape Drive Nonstandard Labels
(Tape) ••• • • • • • • • • • • • • • • • • • • • • • • • • • • • • 71.
ALTTAPE (DTFSR) ••• , ••••••••••••• .;...... 139
Ampersand •••••••••••••••••••••••.•••••• 15,38

AOPTN Card ••••••••••••••••••••••••••••• 192
Appendix A: Character Codes •••••••••• ~ 197
Appendix B~
Machi~e-Instruction
Mnemonic Codes ••••••••••••••••••••••• 203
Appendix C: Assembler Instructions •••• 211
Appendix D:
Machine-Instruction Format 212
Appendix E:
Hexadecimal'-Decimal Number
Conversion Table ••••••••••••••••••••• 214
Appendix F: Summary of Constants •••••• 223
Appendix G: IOCS Example •••••••••••••• 224
Appendix H: Assembler Languages -Features Comparison Chart •••••••••••• 230
Appendix I:
~ummary of Input/Output for
an Assembly •••••••••••••••••••••••••• 234
Appendix J:
Assembler Diagnostic
Messages ••••••••••••••••••••••••••••• 245
Appendii K: Summary of Imperative Macro
Instructions. • • • • • • • • • • • • • • • • • • • • • • •• 252
Appendix L: Blank, substitute Blank, and
Intermediate LRC Requirements •••••••• 255
APpendix,M: ,Binary Synchronous
Commun~cat~on ••••••••••••••••••.•••••• 256
AREA (DTFBS) ••••••••••••••••••••••••••• 167
AREA (DTFSN) •••••••• ~ •••••••••••••••••• 165

Areas for Consecutive Processing,
storage. . . . . . .. . . . . .. . . . . .. .. . .. . . . . . . . .. . .
75
Areas for DAM, Storage ••••••••••••••••• 89
Areas for ISFMS, Storage ••••• 96,106,161,164
Area, Cylinder Overflow (ISFMS) ••••••.• 101
Area, Defining Fields of •••••••••••••••
45
Area, Independent Overflow (ISFMS) ••••• 103
Area, Overflow (ISFMS).................. 101
Assemble a Supervisor,
Organization to ••••••••••••••••••• 182, 188
Assembler ••••••••••••••••••••••••••• 5,23,34
Assembler File (AFILE) ••••••••••••••••• 193
Assem~ler Instruction Statements ••• 5,34,211
Assembler Log (ALOG) ••••••••••••••••••• 192
Assembler Option (AOPTN) ••••••••••••••• 192
Assembler Workarea (AWORK) •••••• ~ •••••• 193
Assembler Languages -- Features
Comparison Chart...................... 230
Assembler-Language Structure •••••••••••
11
Assembler-Language Subset Relationship. 195
Assembler-Language Coding Conventions..
8
Assembling ••••••••• "••••••••••••••••••• 5, 183
Assembling the Job Control Proqram ••••• 191
Assembly ••••••••••••••••••••••••••••••• 5,23
Assembly of the Macro ••••••••••••••••••
55
ASSGN ..............................................

144

Asterisk •••••••••••••••••••••••••••••••
15
AWORK Card ••••••••••••••••••••••••.•••• 193
BACK (DTF SR READ)...................... 148
Backspace to Interrecord Gap (BSR) •••• 83,85
Backspace to Tape Mark (BSF) •••••••••• 83,85
Back wards, Read Ta pe •••••••••••••• 69,77, 132
Base Address...........................
6
Base Register ••••••••••••••••••••••• 6,20,23
Base Register Address Calculation •••••• 6,20
Base Register Instructions •••••••••••••
20
Base-Displacement Form of Addresses....
6
Basic Proqramming suppo~t Relationships
6
BCLOS Macro, for BSC Support •••• 124,136,252
Begin Column............................
8
Begin Literal Pool •• ~ ••••••••••••••••••
50
Beg,in-Defini tion Card (DTFBG) ••••••• 137, 138
Binary Constant - B ••••••••••••••••••••
39
BinarySelf-Defiriing Term..............
14
Binary Synchronous
Communication ••••••••••••••••• 116,166,256
'B L KS I ZE ( D'I" FDA) • • • • • • • • • • • • • • • • • • • • • • •• 1 5 2
BLKSIZE (DTFSR)........................ 142
Block Count for Checkpoint Records •• 130,132
Block-Length Field ••••• ~ • • • • • • • • • • • • • • • 74
Blocked Records (for Consecutive) .72,78,148
Blocked Records (for DAM) •••••••••••• 89,156
Blocked Records (for ISFMS).106,107,111,163
BOPER Macro, for BSC Support ••••• 67,117,252
Boundary Adjustment •••••••••••••••• 20,29,44
Boundary Alignment for Constants •••••• 35,38
BSC Support, Expanded CCB ••••••••••• 126,166
BSC Support, File Definition Macros •••• 166
Index

267

BSC Support, Imperative Macros ••••••••• 116
BSC Support, Line Control •••••••••••••• 116
BSF (Backspace to Tape Mark) ••••••••• ~83,85
BS R (Backspace to Interrecord Gap) •••• 83,85
Building Records in the Output Are~ •••• 77
Building Records in a Work Area •••••••• 79
Capacity Record (for DAM) •••••••••••••• 92
Card Error ••••••••••••••••••••••••••••• 144
Card File (CLOSE)...................... 136
Card Read-Punch (IBM 2540),
CNTRL for •••••••.••••••••••.••••••••• 85
Card Read-Punch (IBM 1442 or 2520),
CNTRL for •••••••••••••••••••••••••••• 86
Card R~cord Maximum Size •••••••••••••••
75
Carriage Channel 9 Punch ••••••••••••• 88,1e7
Carriage control, Printer ••••••••••••• 79,83
Carriage Skip (SK)...................... 85
Carriage Space (SP).................... 85
CCB Macro ••••••••••••••••••••.••••••••• 125
CCB, Expanded for BSC •••••••••••••••••• 126
CCB, Expanded for STR ••••••••.••••••••• 165
CCW - Define Channel Command Word •••• 46,211
CDCNV Macro •••••••••••••••••••••••••••• 115
Channel Command Words (CCW) •••••••••• 46, 145
Channel Configuration Supported by IOCS 56
Character Constant -C- •••••••.•• ; •••••• 38
Character Self-Defining Term •.•••••••••
15
Character Set ••••.••••••••••••.••••••• 11, '97
Checking Alignment ••••••••••••••••••• ~~
29
Checking User Standard Labels (Disk) •••
68
Checkpoint Records .•••••••••• 85,130,.36,142
CHECKPT (DTFSR) ••••• ~ ••••••••••• ~ ••• ~ •• 142
CHKPT Macro •••••••••••••••.•••••••••• 130, 184
CHNG Macro •••••••••••••••••••••••••• ~87,129
CKPTREC (DTFSR) ••••••••••••••••••••• 131,' 42
CLOSE Macro ••••••••••••••••••••••••• '35,180
Closed File, Reopening a •••• ~ .•••••• ~ •• 1,35
CMBND (DTFSR TYPEFLE) .............. 77,79,150
CNOP - Conditional No Operation •••••• 51~2"
CNTRL Macro •••.••••••••••••••••••••• 83,85,95
CNTRL, for BSC Support •••••••• 84,87,116,252
CNTRL, for STR Devices ••••••••••••••• ~. 115
Code Conversion (CDCNV) Macro •••••••••• 115
Code-Translation Table ••••••••••••••••• 197
Codes, Extended Mnemonic................ 32
Codes, Machine-Instruction •••.••••••••• 31
Codes, Operation ••••••••••••••••••••••• 5, 10
Coding Conventions ••••••••••••••••••••• 8,'7
Cod"ing Form •••••.••••••••• , . . . . . . . . . . . . .

8

Combined File (CMBND).................. 77
Command Control Block (CCB) •••••••••• 69,125
Comments Entries ••••••••••••.••••••••••
10
Communication, Operator ••••••• ~.173,175,181
Communication Region (COMRG) ••••••••••• 173
Compatibility..........................
5
Completion •••••••• ~ •••••••••••••••••• ;. 132
Complex Relocatable Expressions •••••••• 43
COMRG Macro ••••••••••••••••••••••••• 174,'77
Conditional No Operation -- ~NOP ••••••• 51
CONFG (SUPVR Macro)...................... 184
Consecutive Processing •••••••••••• 57,71,138
corisole (DTFSR DEV ICE) • • • • • • • • • • • • • • • •• 145
Constants, Address" •••••••.••••••••••• 42,223
Constants, Decimal (P and Z) ••••••••• 42,223
Constants, Defining •••••••••••••••••••• 35

268

S/360 BaS Assembler with I/O Macros

Constants, Exponent Modifier •••••••••••
~7
Constants, Fixed-Point (Fand H) •• 37,40,223
Constants, Floating-Point (E and D) •• 41,223
Constants, Length Modifier •••••• ~ •••••• 37
Constants, Multiple ••••• ~ ••••••••••••• 35,38
Constants, Operand Subfield 1:
Duplication Factor •••••••••••••••••••
36
Constants, Operand Subfield 2:

Type..................................

36

Constants, Operand Subfield 3:
Modifiers ••••••••••••••••••••••••••••
36
Constants, Operand Subfield 4:
Constant •••••••••••••••••••••••••••••
38
Constants, ~cale Modifier ••••••••••••••
37
Constant, Binary (B) ••••••••••••••••• 39,223
Constant, Character (C) •••••••••••••• 38,223
Constant, Hexadecimal (X) •••••••••••• 39,223
Continuation Cards, Macro
Instruction •••••••••••••.•••••••••• 54, 138
Continuation Indicator Column,
Macro Instruction •••••••••••••••••• 54,138
continuation Lines. •.• •.•• ••• ••• ••• ••• •••
8
Continue Column •••••••••• ·••••••••••••••
8
continue Column, Macro Instruction •••••
54
Control Cards •••••••••.••••••••••••• ·•• 68,192
Control Character •••••••••••••••••••••• 144
Control Dictionary.....................
26
CONTROL (DTFDA')........................ 152
CONTROL (DTFSR) •••••••••••••••••••••• 83,142
Control Instructions, Program ••••••••••
48
Control Section, First.~ •••••••••••••••
24
Control Section, Unnamed· •••••••••••••••
25
Control Section Location Assignment ••••
24
Control Sections •••••••••••••••••••• 6,23,60
Control Sections, External (Addressing)
27
Control, Input/Output ••••••••••••••••••
55
Control, Punch and Printer ••••••••••••• 79
Conversion Table, Decimal-Hexadecimal
Numbers •••••••••••••••••••••••••••••• 214
Core Image Lib'rary •••••••••• " •••••••••• 174
COREXIT (DTFSR)........................ 142
Count Area (DAM) •••••••••••••• ,.. • ••••••
92
CR (EXIT Macro)........................ 175
CR (SUPVR Macro) ............. ".. •• • • • • • •• '84
CRDERR (DTFSR) ••••••••••••••••••••••••• 144
Creating a File or Adding Records to
a File (by DAM) •• ! • • • • • • • • • • ~ • • • • • • • •
92
CSECT - Identify Control Section ••••• 25,211
CTLCHR (DTFSR)......................... '44
cylinder Index ••••••••••••••••••••••• 99, 105
Cylinder Overflow Area (ISFMS) ••••••••• 103
CYLOFL (DTFIS)' ....................... '03, '58
CYNDEX (DTFIS) •• ~ ••••••••••••••••••• 105,158
Data Area (DAM)........................
92
Data Conversion Special Feature •••••• 77,13'
Data Definition Instructions •••••••••••
35
DC - Define .Constant ••••••••••••••••••• 35
Decimal Constants - P and Z •• ~ •••••••••
42
Decimal Self-Defining Term •••••••••••••
14
Declarative File-Definition Macro ••••••
59
Defining Fields of an Area •••••••••••••
45
Defining Symbols •••••••••••••••••••••••
13
Definitions, Literal ••••••••••••••••••• 36
Definitions, Macro.....................
53
DERREX (DTFIS)......................... 158

Detail Entry, File Definition Macro
Instru~tion •••••••••••••••••••••••••• 138
DEVA DDR (DTFBS) _ • • • • • • • • • • • • •• •• • • •• • •• 167
DEVADDR (DTF·PH) •••••••••••••••••••••••• 171
DEVADDR (DTFSN) •••••••••••••••••••••••• 165
DEVADDR (DTFSR) ••••••••••••••••••••• 139, 144
DEVICE (DTFDA)......................... 152
DEVICE (DTFSR) ••••••••••••••••••••••••• 144
Diagnostic Messages •••••••••••••••••••• 245
DIALO Mac~o, for STR Devices ••••••• ~.59,1'4
Digits, Hexadecimal ••••••••••••••••••••
15
Digits, Numeric ••••••••.••••••••••••••••
11
Direct Access Method (DAM) .~ •• 58,88,138,151
Disk 11 (DTFDA DEVICE}.................. 152
Disk 11 (DTFSR DEVICE) • • • • • • • • • • • • • • • • •• 145
Disk End-of-Volume ••••••••••••••••••••• 133
Disk Error, Uncorrectable •••• ~ ••••••••• 158
Disk File, CLOSE ••••••••••••••••••••.••• 135
Disk File, Creating a (by DAM)......... 92
Disk File, Cylinder Index Area of
(ISFMS) •••••••••••••••••••••••••••••• 105
Disk File, Macro Instructicn tc Load or
Extend by ISFMS •••••••••••••••••• ~ ••• 105
Disk File, Master Index Area of (ISFMS) 105
Disk File, Pri me Area of {ISFM S) •• • • • •• 105
Disk File, Reopeninq a ••••••••••••••• 67,135
Disk (SUPVR Macro)..................... 184
Disk Input File •••••••••••••••••• 67,'33,145
Disk Labels ..... ~ •••••••••••••••••••••••
63
Disk Labels, User Trailer •••••••••••••• 133
Disk Output File ••••••••••••••••• 68,133,147
Disk Record Indices (for ISFMS)........
97
Disk Records, Organization of
(for ISFMS) •••••••••••••••••••••••••• 96
Disk Records, Processing consecutively. 72
Disk Records, Processing by the
Direct Access Method •••••••••••••••• 58,88
Disk Records, Processing by ISFMS •••••• 96
Disk Storaqe Drive (IBM 2311),
CNTRL Macro for •••••••••••••••••••••• 86
Disk Workarea ••••••••••••••••• ~........
7
Displacement ••••••••••••••••••••••••••• 6,18
DLAB (Job Control Card) •••••••••••••• 67, 107
DRriP - DROP Base Register •••••••••••• 22,211
DS - Define Storage •••••••••••••••••• 44,211
DSECT - Identify Dummy Section ••• 25,21',224
PSKXTNT (DTFIS) •••••••••••••••••••••••• 160
DSPLY Macro............................ 82
DTAREX· (DTFIS) •••••••••••••••••••••• 105,160
DTFBG Macro ••••••••••••••••• '•••••••• 137,138
DTFBS Macro, for BSC Support ••••• 60,138,166
DTFDA Macro ••••••••••••••••••• 59,88, 138,151
DTFEN Macro •••••••••••••••••••••••••••• 138
DTFIS Macro ••••••••••••••••••• 59,96,138,158
DTFPH (Macro Instruction) •••••••••••• 60,171
DTFRF Macro, for BSC ~upport ••••••••••• 166
DTFRF Macro, for STR Processing •• 60,112,170
DTFSN Macro, for STR
processing ••••••••••••••••• 60-,112,138,165
DTFSR Macro ••••••••••.•••• ~ •••••• 59,138,139
Dummy section Location Assignment •••••• 25
Dummy Sections, Addressing ••••••••••••• 25
DUMP Macro •••• '•••••••••••••••••• 174,180,182
Duplication Factor, Special Uses of •••• 45
Duplication Factor for Constants •••••• 36,45
DUPREX (DTFIS Duplicate-Record
Check)~ ••••••••••••••••••••••••••• 107,160

EBCDIC Codes ••••••••••••••••••••••••• 10,150
EF (End-of-File) •••••••••••.•••••••••••• 134
E,JD ••••••••••• ~ . . . . . . . . . . . . . . . . . . . . "'....

86

EJECT - Start New Page ••••••••••••••• 47,211
END - End Assembly •••••••••••••••• ~ •• 52,211
End Assembly...........................
52
End Column ••••••••••••••••••• ~.........
8
End File Load Mode..................... 106
End set Limit (ESETL) •••••••••• ~ • • • • • •• 110
End-of-Definition Card (DTFEN) ••••••••• 138
End-of-File ••••••••••••••••••••••••• 132,134
End-of-File Detection •••••••••••••••••• 145
End-of-File Record (Disk) ••••••••••• 107,133
End-of-Job (EO.J) ••••••••••••••••••••••• 182End-of-Volume, Disk •••••••••••••••••••• 132
End-of-Volume, Forced (Tape)........... 134
ENDFL Macro •••••••••••••••••••••••••• 05,106
Entries, Comments ••••••••••••• ~ ••••••••
10
Entr ies, Name •• , . . . . . . . . . . . . . . . . . . . . . . . .
10
En tries, Operand •••••• '. • •• • • • • • • • • • • • • •
10
Entries, Operation.....................
10
ENTRY - Identify Entry-Point Symbol •• 27,211
Entry Cards •••••••••• .; ••••••••••••••• _. '38
EOF ••

~

. . . . . . . . . . . . . . . . . . . . . . . "•••••••• 132,134

EOFl (Tape Label Identifier) ••••••••• 65,136
EOF (DTFSN) •••••••••• ~ ••••••••••••••••• 115
EOFADDR' (DTFIS) ••••••••••••••••••••• 133,161
EOFADDR (DTFSR) .................... ~.; 133,145
EOJ Macro ••••••••••••••••••••••••••• 174,182
EOV ••••••••••••••••••• ~ ••••••••• '32,134,139
EOV1 (Tape Label Identifier) •••••••••••
65
EQU - Equate Symbol ••••••••••••••• 13,34,211
Erase Gap (ERG - Write Blank Tape) •••••
83
ERRBYTE (DTFDA Error Status Byte} •••• 95,154
ERROPT (DTFSR) ••••••••••••••••••••••••• 145
Error Condition, Retry for Parity •••••• 145
Error Condition, Uncorrectable (Disk) •• 154
Error Indications ••••••••••••••••••••• 6,143
ERRPT Macro, for BSC Support •••• 124,182,252
ESETL Macro............................ 1'10
EV (End-of-Volume) ••••••••••••••••••••• 134
Evaluation of Expressions ••••••••••••••
17
Example of an Organized File (by ISFMS) 103
Example of IOCS (Appendix G) ••••••••••• 224
EXCP Macro (Execute Channel
Program) ••••••••••••••••••••••• 69,129, 174
EXIT Macro •••••••••••••••••••••••••• 174,175
Ex plici tAd dress •••••••••••••••••••••. 20,30
Exponent Modifier for Constants ••••••••
37
Expressions ••••••••••••••••••••••' ••••• 13, 17
Expressions'", A'bsolute..................
18
Expressions, Coding of •••••••••••••••••
17
Expressions, Complex Relocatable •••••• ,
43
Expressions, Evaluation of •••••••••••••
17
Expressions, Relocatable •••••••••••••••
'8
Expression, Multi term. • • • • • • • • • • • • • • • • •
17
Expression, singie Term~ •••••••••••••••
17
Extend a Disk File by ISFMS,
Macro Instructions to •••••••••••••••• 105
Extended Mnemonic Codes ••••••••••••••••
32
External Control Sections, Addressing..
27
External Signal •••••••••••••••••• ·•••••• 173
External SymboT Dictionary (ESD)....... 192
EXTRN - Identify External Symbol ••••• 27,211

Index

269

FEOV Macro, Tape Records •••••••••••• 134,137
FETCH Macro •••••••••••• P • • • • • • • • • • • • 174,175
Fields, Defining ••••••••••••••••••••••• 45
.Field, Identification-Sequence.........
11
FILABL (DTFSR} ••••••••••••••••••••••• 65,146
File Definition Macros ••••••••••••••• 59~137
File Header Label, Standard (Tape) •••••
65
File Limits (Disk}..................... 63
File Tra~ler Label, Standard (Tape) •••• 65
Fi len a me 3 Field......................... 1 09
FilenameB Field ••••••••••• ;. •••••••••••• 136
FilenameH' Field ••.•••••••••••••••••••••• 106
Filename s (File Definition)............ 138
Fitename U Field........................ 109
File, Creating or Adding Records to
(by DAM) •••••••••••••••••••• ' . . . . . . . . •

92

File, Example of an Organized (by ISFMS) 103
File, Load or Extend (by ISFMS) •••••••• 105
First control Section.~ •••••• ~ ••••••••• 22
FIXBLK (DTFIS RECFORM) ••••••••••••••••• 163
FIXBLK (DTFSR RECFORM) ••••••••••••••••• 149
Fixed-Length Records (for Consecutive) 72,78
Fixed-T.ength Records (for ISFMS)....... 96
Fixed-Length Records (for DAr-$) ••••••••• 156
Fixed-Point Constant, Scale Modifier for 37
Fixed-Point Constants - F and H••••••• 37,40
FIXUNB (DTFDA RECFORM) .................. 156
FIXUNB (DTFIS RECFORM) ••••••••••••••••• 163
FIXUNB(DTFSR RECFORM} ••••••••.••••••••• 148
Floating-Point Constant, Sc~le
Modifier for... •.••••••••••••••••••••• 37
Floating-Point CQnstants - E and D•••• 37,41
Forced End-of-Volume (Tape) •••••••••••• 134
Forcinq Alignment (DS ~tatement)....... 45
Format-1: Standard File Label ••••••••• 63
Format-2: Standard File Label ••••••••• 64
Format-3: Standard File Label ••••••••• 64
Formats, Machine-Instruction ••••••••• 31,212
Formats, Standard File Label (Disk) •••• 63
Format, Constant Specifying~ ............ 38
Format, Keyword (Macro)................ 54
Format, Literal ••••••••••••••••••••••••
17
Format, Macro Instruction •••••••••••••• 54
Format, Positional (Macro)............. 54
Format, Statement......................
8
Format, Statement (Summary of) •• • • •• • • • 11
FORWARD (DTFSR READ) ••••••• ~ ••' ••••••••• 148
FSF (Forward Space to Tape Mark) •••••• 83,85
FSR (Forward Space to Interrecord Gap) 83,85

General Restrictions on Symbols ••••••••
13
Generate Transfer Card -- XFR •••••••••• 50
GET Macro •••••••••••••••••••••••••••• 75,111

HDR1, HDR2, etc.
(Tape Label
Identifier).......................... 65
Header Card, File Definition
Macro Instruction •••••••••••••••••••• 138
HEADER (DTFSR)......................... 146
Hexadecimal Constant -- x............... 39
Hexadecimal Digits •••••••••••••••••••••
14
Hexadec'imal Self-Defining Term •••••••• 14,42

270

S/360 BOS Assembler with I/O Macros

IBM 2311 Disk Storage Drive, CNTRL
Macro for ••••••••••••••••••••••••••••
86
IBM 1285 Optical Reader, CNTRL for •••••
86
IBK 1442 or 2520 Card Read-Punch,
CNTRL for ••••••••• ~ ••••••••••••• 4 • • • •
86
IBM 2540 Card Read-Punch, CNTRL for ••••
85
IBM 1052 Printer-Keyboard •••••••••••••• 181
ICTL - Input Format Control •••••••••• 48,211
ID-Verification •••••••••••••••••• 59,117, '18
Identifi6ation - Sequence Field ••••••••
"
IOIAL Macro, for BSC Support •••••••• 117,252
IDT. . OC (DTFDA) •••••••• .o ••••••••••••••• 9 1, '54
IDNAME (DTFIS) •••••••••••.••••••••••••• 110
ID, Record (DTFIS) •••••••••••••••••• 106,111
ID, Record Reference After (for DAM) •• 92,94
ID, Record Reference by (for DAM) .91,93, 154
IGNORE (DTFSR ERROPT) •••••••••••••••••• 146
ILIDEX (DTFIS) ••••••••••••••••••••••••• 161
Imperative Macro Instruction •••• , •••• 60,252
Implied Address ••••••••••••••••••••••• 20,30
INAREA (DTFSR) ••••••••••••••••••••••• 79,146
INBL KSZ (DTFSR) ••••••••••••••••••• '. • • •• 147
Independent Overflow Area (ISFMS)...... 103
Indexed Sequential File
Management System (ISFMS) ••• 58,96,138,1.58
Indices (for ISFMS).....................
97
Initialization. • • • • • • • • • • • • • • • • • • • • • • • • 63
Input Area, processing Records in the..
76
Input File, Disk ••••••••••••••••• 67,133,145
Input File, Tape ••••••••• 69,133,136,142,145
Input Format Control -- ICTL •••••••••••
48
INPUT (DTFDA TYPEFLE) •••••••••••••••••• 157
INPUT (DTFPH TYPEFLE) • •• • • • • • • •• • • •• • •• 173
INPUT (DTFSR TYPEFLE) •••••••••••••••••• 150
Input Sequence 'Checking ~- ISEQ ••••••••
49
Input/Output Control Macros •••••••••••• 55
INQ (DTFSN) •••••••••••••••••••••••••••• 115
Inserting Records (ISFMS) •••••••••••••• 102
Instruction, Base Reqister •••••••••••••
20
Instruction, Symbol Definition (EQU)...
34
Instruction Aliqnment and Checkinq •••••
29
Instructions, Assembler ••••••••••••••••
34
Instructions, Data Definition ••••••••• 34,35
Instructions, Listinq Control ••••••••• 34,46
Instructions, Machine ••••••••••••••••••
29
Instructions, Macro ••••••••••••••••••••
53
Instructions, Program Control ••••••••• 34,48
Interruption Han~ling •••••••••••• 21,173,182
Interval Timer· ••••••••••••••••••••••••• 180
Invalid Symbol"s........................
13
IOAREA1 (DTFDA) •••••••••••••••••••••• 94,155
IOAREA1 (DTFSR) •••••••••••••••••• 79,142,146
IOAREA2 (DTFSR) ••••••••.••••••••••••• 142,146
IO ARE AL ( DT F IS) • • • • • • • • • • • • • • • • • • • • • • 9 6 , 1 6 1
IOAREAR (DTFIS) •••••••••••••••••••••• 96, 161
IOAREAS (DTFIS) ................... 96,1 11, 161
IOCFG Macro........................... .... 186
IOCS Example (Appendix G) •••••••••••••• 224
IOCS, Channel Confiquration
su pported by ••••••••••••••••••••••• 56, 186
IOCS, I/O Units Handled by.~ •.••••••••••
55
IOCS, Logical and Physical •••• ~ ••••••••
56
IOREG (DTFIS) •••••••••••••••••••••••• 96, 161
IOREG (DTFSR) ....................... 76,78,147

IOROUT (DTFIS) •••••••••••••• 105,107, 109, 162
IPL (Initial Program Loader) ••• '•••••••• 188
I/O Areas for Consecutive ••••••••• 15,76,146
I/O Areas for DAM •••••••••••••••••••••• 88
I/O Areas for ISFMS •••••••••••••• 96,111,161
I/O Assembly -- Summary •••••••••••••••• 234
I/O Configuration (IOCFG) •••••••••••••• 186
IIO Requests ••••••••••••••••••••••••••• 173
I/O Units Handled by IOCS •••••••••••••• 55
ISEQ - Input Sequence Checking •••• ll,49,211
ISFMS (Indexed Sequential File
Management System) •••••••••• 58,96,138,158

JBCTL Macro •••••••••••••••••••••••••••• 191
Job Control ASSGN Card ••••• ~ ••••••••••• 144
Job Control DLAB Card •••••••••••••••••• 67
Job Control Program •••••••••••••••••••• 130
Job Control RSTRT Card ••••••••••••••••• 131
Job Control TPLAB Card ••••••••••••••••• 10
Job Control VOt. Card •••••••••••••••••• 67,69
Job Control XTENT Card ••••••• 67,144,157,158
Job-Cont~ol-Assembly Macros •••••.••• 190,191
KEY (DTFIS) ••••••••••••••••••••••••• 108,110
Key, Record Reference by
(for DAM) ••••••••••••••••••••••• 93,94,155
Key, Record Reference by (for ISFMS) ••• 94
Key Area for DAM....................... 89
Key Area for ISFMS ••••••••••••••••••••• 96
Key Field in Main Storage (for DAM) ••• 89,93
Key Field in Main Storage
(for ISFMS) •••••••••••••••••••••••• 96,102
Key Field within a Record
(for ISFMS) •••••••••••••••••••••••• 96,102
Key Length, Maximum (for DAM).......... 89
KE YARG ( DT FDA) ••••••••••••••••••••••• 9 3, , 55
KEYARG (DTFIS) •••••••••••••••••••••• 108,162
KEYT.EN (DTFDA) •••••••••••••••••••• 89,94,155
KEYLEN (DTFIS) •••••••••••••••••••• 96,99,163
KEYLOC (DTFIS) ••••••••••••••••••• 96,107,163
~eypunch Instructions (Coding Form) ••••
8
Keyword Format ••••••••••••••••••• 54, 137,184
LA BADDR (DTFDA Label Address).......... '55
LA BA DDR (DTFPH Label Address) • • • • • • • • •• 172
LABADDR (DTFSR Label Address).......... 148
Label Formats, Standard File (Disk) •••• 63
Label Return (LBRET Macro)............. 71
Labels, Disk ••••••••••••••• '••• '.. • . •• • • • 63
La bels, Nonstandard (Tape) ••••• 65,69,70,134
Labels, Standard Tape •••••• 65,69,70,133,148
Labels, User-Standard duce Followinq Card •••••• 49,211
RESCN Macro ••••••••••••••••••••••••••••
82
Restrictions on Registers ••••••••••••••
20
Restrictions on Symbols ••••••••••••••••
'4
Retrieve Records Randomly by ISFMS ••••• 108
Retrieve Records Sequentially by ISFMS. 109
RETRVE (DTFIS IOROUT) •••••••••••••••••• 162
REW (Rewind Tape)......................
83
REWIND (DTFSR) •••••••••••••••••• 135, '36, '49
Rewind and Unload Tape (RUN)...........
83
Rewind Tape (REW).......................
83
RR Format •••••••••••••••••••••••••••• 31,212
RS 'Format •••••••••••••••••••••.••••••• 32,212
RSTRT (,-lob Control Card) ••••••••••••••• 131
RSTRT Macro •••••••••••••••••••••••••••• 191
RTRVEX (DTFIS) •••••••••••••••••••••• 108, 163
RUN (Rewind and Unload Tape) •••••••••••
83
RX Format •••••••••••••••••••• ~ ••••••• 32,212
RZERO (DTFDA). ,. • • • • • • • • • • .. • •• • • • • • •• • • •
95

S-Type Address Constant ••••••••••••••••
43
SAVEREG (SUPVR) ••••••••••••••••••••• 175, 184
Scale Modifier for constants •••••••••••
37
Scale Modifier for Fixed-Point
Constant •••••••••••••••••••••••••••••
37
Scale Modifier for Floatinq-Point
Constant •••••••••••••••••••••••••••••
37
SCLOS Macro, for STR Devices ••••••••• 62,116
Search Multiple Tracks (D~M) ••• 89,91,93,157
Sectioning and Linking.~ ••••••••••••••• 6,23
section One - Introduction.............
5
Section Three - Instructions •••••••••••
29
Index

273

Section Two - General In£ormation......
8
SEEK ADR (DTFDA) •••••••••••••••••••••• 95,156
Select Stacker (SS)....................
86
Self-Defining Term, Binary •••••••••••••
14
Self-Defining Term, Decimal ••••••••••••
14
Self-Defining Term, Character ••••••••••
15
Self-Defining Term, Hexadecimal ••••••• 14,42
Sel£-Defining Terms ••••••••••••••••••••
14
Self-Definin~ ·Terms, Using •••••••••••••
14
SEND Macro ••••••••••••••••••••••••••••• 187
SEQNTL (DTFIS TYPEFLE) • • •• • • •• • • • • • • • •• 164
SEQNTL (DTFIS UPDATE) •••••••••••••••••• 164
Sequence Check (by ISFMS) •••••••••••••• 108
Sequence-Link Field in Overflow
Records (ISFMS) •.••••••••••••••••••••• 102
Sequential Processing by ISFMS •••• 59,96,109
Sequential Retrieval by iSFMS, Macro
Instructions for ••••••••••••••••••••• 109
Set Exit (STXIT Macro) •••••••••••••• ~74, 179
Set Limit (SETL)....................... 110
Set Location Counter -- ORG •••••••••••• 50
SETFL Macro •••••••••••••••••••••••••••• 105
SETL Macro •••••••••••••••••••••••••• 110,163
Seven-Track Tape •• ~ •••••••••••••••••• 77,192
SI Format •••••••••••••••••••••••••••• 32,212
Simultaneous Read-While-Write Tape
Control Units........................ 87
SINGLE (DTFPH MOUNTD) ••••••••••••• 67,68,172
SINGLE Te~m Expression •••••••••••••••••
16
Sizes of Records....................... 75
SK (Skip to Carriage-Tape Channel) ••••• 85
SKIP (DTFSR ERROPT) •••••••••••••••••••• 146
SOPEN Macro, for STR Devices ••••••••• 62,112
Source Program.........................
5
Source Sta~ements •••••••••••••••••••••• 5,11
SP (Carriage Space).................... 85
SPACE - Space Listing •••••••••••••••• 47,211
Special Characters •••••••••••••••••••••
11
Special Addressing Consideration ••••••• 51
Special Uses of the Dupli~ation Factor
(DS Statement)....................... 45
SQCHEX (DTFIS) ••••••••••••••.••••••• 106,164
SRCHM (DTFDA) ••••••••••••••••••••••• 155,157
SS (Select Stacker).................... 86
SS Format •••••••••••••••••••.•••••••• 32,212
SS D. • • • • • • • • • • • • • • • • • • • • • • • • . • • • • • • • • • •

86

Stacker Selection ••••••••••••••••••••• 86,87
Standard File Label Formats (Disk) ••••• 63
Standard Labels, User-Written
(Tape) ••••••••••••••••••••••• ·••••• 133,136
Standard Ta~e Labels ••••••••.•• 65,69,70,133
Standard Volume Labels (Disk) ••••••••• 63,68
START - Start Assembly._ ••••• A • • • 24,191,211
Start New Page--EJECT •••••••••••••••••• 47
Statement Format ••••••••••••.•••••••••• 8, 11
Statement Boundaries....................
8
Statement Example............ ••••••••••
10
Statements, Assembler Instruction......
5
Statements, Assembler-Language.........
5
Statements, Machine Instruction •••••••• 5,~9
Statements, Macro Instruction •••••••••• 53
Statements, Program....................
5
Statements, Source.....................
5
STD (DTFSR FILABLE).................... 146
Storage Area for Consecutive Processing 75
Storage Areas fot ISFMS •••••••••• 96,106,109
Storage Areas for DAM •••••••••••••••••• 89
Storage, Reserving......................
44
274

S/360 BOS Assembler with I/O Macros

STR, Expanded CCB •••••••••••••••••••••• 165
STR, File Definition Macros •••••••••••• 112
STR, Imperative Macros ••••••••••••••• 60,112
STR, Processing with~ •••••••• 59,'12,138,165
Structure, Assembler Language ••••••••••
11
STXIT Macro .......................... 174,179
Subset Relationships, Assembler
Language •••••••••••••••••••••••••• ~ •• 195
Summary of Statement Format............
11
Supervisor ••••••••••••.•••••••••••• 13,56,176
Supervisor Call......................... 173
Supervisor End (SEND Macro) •••••••••••• 187
Supervisor Interruption Routine •••••••• 176
Supervisor, Organization to Assemble ••• 188
Supervisor Patch Area •••••••••••••••••• 187
Supervisor-Communication Macros ••••• ~54,173
Supervisor-Assembly Macros ••••••• 54,182#183
SUPVR Macro •••••••••••••••••••••••••• 13, 184
Symbol Definition Instruction (EQU) ••••
34
Symbol Length Attribute Reference......
16
Symbol Table...........................
13
Symbol Value ••••••••••••••••• -.'!' • • • • 13,15,35
Symbolic Language....... •.•• ••• •• •••••••
5
Symbolic Linkages ••••••••••••••••••••••
26
Symbolic units (SYMUN Macro)........... 185
Symbols •••••••••••••••••••••••••••• 10,13,24
Symbols, Defining......................
13
Symbols, General Restrictions orr •••••••
14
Symbols, Previously Defined............
14
SYMUN Macro ••••••••••••••••••••••••• 139,185
SYSOOO-SYS254 ••••••••••• 144,157,171,173,185
SYSIPT •••••••••••••••••• 144,157,171,173,185
SYSLOG •••••••••••••••••• 144,157,173,176,185
SYSLST •••••••••••••••••••••• 144, 157,173,185
SYSO PT •••••••••••••••••• 1 44, 157 , 171 , 173, 1 85
SYSRDR •••••••••••••••••••••• 144,157,173,185
Tape (DTFSR DEVICE) • •• •• • •• ••• •• ••••••• 145
Tape, Seven-Track...................... 77
Tape, Write Blank (ERG)................
83
Tape Control Units, Simultaneous
Read-While-Wri tee ••••• •• • ••• •• • ••• • •• -87
Tape File, Reopening a ••••••••••••••••• 135
Tape Files, Unlabeled •••••••••••••••• 66,i35
Tape Input File •••••••••• 69,133,136,142,145
Tape Labels, Nonstandard ••••••• 65,69,70,134
Tape Labels, standard •••••• 65,69,70,133,172
Tape Movement Functions ••••••••••••••••
83
Tape Out·put File ••••••••••••••••• 69, 134,136
Tape Record, Minimum and Maximum Sizes.
75
Tape Units, CNTRL for •••••••••••••••••• 83
TEL (DTFSN)............................ '15
Term, Binary Self-Defining •••••••••••••
14
Ter~, Character Self-Defining ••••••••••
15
Term, Decimal Self-Defining ••••••••••••
14
Term, Hexadecimal Self-Defining •••••••• 14
Terms ••••••••••••••••••••••••••••••••• 13,14
Terms, Absolute........................
14
Terms , Literal.........................
16
Terms, Relocatable •.•••••••• ·•••••••••• '3,18
Te r ms, Self - De fin i n g • • • • . • • • • • • • • • • • • • • 1 4
Terms and Expressions..................
t3
Timer, Interval .......................... 180
TIMER (SUPVR Macro) •.• •• ••• •.• •• . . ••••• 180
TITLE - Identify Assembly Output ••••• 46,211
TPLAB (Job Control Card)...............
70
TPMARK (DTFSR) •••••••••••••••••••.••••• 149

TR (EXIT Macro)........................ 175
TR (SUPVR Macro) ••••••••••••••••••••••• 184
Track Index (ISFMS) •••••••••••••••••• 99,105
Track Reference Field (DAM) •••••••••• 91, 156
Track Reference (for DAM) ••••••••••••• 58,91
TRANS (DTFS'R) •••••••••••••••••••••••••• 149
Transient Area ••••••••••••••••••••••••• 182
Translation Table, Code •••••••••••••••• 150
TRUNC Macro (Truncate) ••••••••••••••• 80,150
Truncate--TRUNC........................ 80
TRUNCS (DTFSR) ••••••••••••••••••••••• 80,150
Type Specifications for Constants ••••••
36
TYPEFLE (DTFDA)........................ 157
TYPEFLE (DTFIS) ••••••• ' •••••••••••••• 108,164
TYPEFLE (DTFPH) •••••••••••••••••••••••• 172
TYPEFLE (DTFSR)........................ 150
Types of Processing •••••••••••••••••••• 57
Types of Records for Consecutive
Processinq........................... 72
Types of Records for DAM ••••••••••••• 89,156
Types of Records for ISFMS ••••••••••• 96,163

UHt1, UHL2, etc.
(Label Identifier) •• 64,69
Unblocked Records (for
Consecutive) •••••••••••••• 72,75,76,78,149
Unblocked Records (for DAM) •••••••••• 89,156
Unblocked Records (for ISFMS) ••••••• 111,163
UNDEF (DTFDA RECFORM).................. 156
UNDEF (DTFSR RECFORM).................. 149
Undefined Records (for
Consecutive) ••••••••••••••••• 72,75,79,149
Undefined Records (for DAM) •••••••••• 89,155
Universal Character Set •••••••••••••••• 150
Unlabelled Tape Files •• ' •••••••••••••• 66,135
UNLOAD (DTFS R REWIND) •• • • • • • • • •• •• • • • •• 149
Unnamed Control Section ••••••••••••••••
25
UPDATE (DTFIS) •••••••••••••••••• 108, 109,164
UPDATE (DTFSR) ••••••••••••••••••••••• 79,150
Updating ••••••••••••••••••••••••••••••• 79
User ~railer Labels for Disk ••••••••••• 133
User-Standard File Labels
(Disk) ••••••••••••••••••••••• 64,68,71,172
User-Standard I,abels (Tape) ••• 65,71, 136,172
USING - Use Base Address
Re gist er ••••••••••••••••••••• 20,21 ,43, 2' 1
USING Instruction, Programming with ••• 20,22
Using Self-Defining Terms ••••••••••••••
14
UTLO, UTL 1, etc.
(Label Identifier). 64,133

V-Type
Value,
VARBLD
VARBLK

Address Constant ••••••••••••••• 27,44
Expression ••••••••••••••••••••• 18,43
(DTFSR) ••••••••••••••••••••••• 79, '51
(DTFSR RECFORM) •• • • ••• • •• •• •• • •• 149

Variable-Length Records (for
Consecutive) ••••••••••••••••• 72,75,78, 149
Variable-Length Records (for DAM) •••• 89,156
Variety in Data Representation.........
6
VARUNB (DTFSR RECFORM) ••••••••••••••••• 149
VERIFY (DTFDA) ••••••••••••••••••••••••• 157
VERTFY (DTFIS)......................... 164
VERIFY (DTF SR) • • • • • • • • • • • • • • • • • • • • • • • •• 151
VOL2, VOL3, etc.
(Label Identifier) •••
63
VOL1, VOL2, etc.
(Label Identifier) •••
65
VOL (Job Control Card) •••••••••••••••• 67,69
Volume Labels (Disk)...................
63
Volume Table of contents (VTOC)........
63
VTOC •••••••••••••••••••••••••••••••••••
63

WAIT Macro •••••••••••••••••••••••••• 112,129
WAITF Macro •••••••••••••••••••••• ~ .58,81,95
WAITM Macro •••••••••••••••••••••• 62,112,129
WLRERR' (DTFIS)......................... 164
WLRERR (DTFSR) ~ ••••• ~ •••••••••••••••••• 151
Work Area, Building Records in a
(Consecuti ve) • • • • • • • • • • •• •• • • • • • • • • • • 76
Work Area for Consecutive ••••••••• 75,76,151
Work Area for ISFMS ••••••••••••••••• 111, 164
Work Area, processing Records in a
(Consecutive) • • • • • •• •• • • • • • • • • • • • • • •• 151
WORKA' (DTFSR) ••• ' •••••••••••••••••••• '47,151
WORKL (DTFIS) •••••••••••••••••••• 96,106,164
WORKR (DTFIS) ••••••••••••••••••••• '••• 96,165
WORKS (DTFIS) •••••••••••••••••••••••• 96,165
WRITE ,Macro •••••••••••••••••• 94,106,107,108
WRITE Macro, for BSC Support
(DTFBS) ••••••••••••••••••••••••••• 122,253
WRITE Macro, for STR Devices (DTFSN)... 115
Wr it eTa p e Mark (W T M) • • • • • • • • • • • • • • • • • •
83
WRITEID (DTFDA) •••••••••••••••••• 94,152,157
WRITEKY (DTFDA)........................ 157
Writing Checkpoint Records ••••••••••••• 130
Writing User-Standard Header
Labels (Disk)........................
68
Wrong-Length Record ••••••••••• ; •••••••• 151
WTM (Write Tape Mark)..................
83

XFR - Generate a Transfer Card ••••••• 50,21'
XTENT (Job Control
Card) ••••••••••• 67,99,105,133,144,157,158
XTNTXIT (DTFDA) •••••••••••••••••••••••• 157
XTNTXIT (DTFPH) •••••••••••••••••••••••• 173
Y-Type Address Constant ••••••••••••••••

43

Zoned Format, Decimal Constant.........

42

Index

275

C24-3361-6

International Business Machines Corporation
Data Processing Division
112 East Post Road, White Plains, N.Y.IOBOI
[USA.Only]
IBM World Trade Corporation
821 United Nations Plaza, New York, New York 10017
[International]

READER'S COMMENT FORM
Form C24-336'-6

IBM System/360 Basic Operating System
Assembler with Input/Output Macros
Specifications

• How did you use this publication?
As a reference source .............................. 0
As a classroom text .................................. 0
As a self-study text .................................. 0
• Based on your own experience, rate this publication
As a. reference source:
Very
Good

Good

Fair

Poor

Very
Poor

Very
Good

Good

Fair

Poor

Very
Poor

As a text:

• What is your occupation? ................................................................................................................... .
• We would appreCiate your other comments; please give specific page and line references
where appropriate. If you wish a reply, be sure to include your name arid address .

.
..
• Thank you for your cooperation. No postage necessary if mailed ·in .the U.S.A.

C2.4·3361·6

YOUR COMMENTS PLEASE •••
This SRL bulletin is one of a series which serves as reference sources for systems analysts,
programmers and operators of IBM systems. Your answers to the questions on the back of this
form, together with your comments, will help us produce better publications for your use. Each
reply will be carefully reviewed by the persons responsible for writing and publishing this
material. All comments and suggestions become the property of IBM.

··

Please note: Requests for copies of publications and for assistance in utilizing your IBM system should be directed to your IBM representative or to the IBM sales office serving your
locality.

Fold

Fold

4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

e._ ••••••••

~

••••••••••••••••••••••••••••••••••••• :

··

FIRST CLASS
PERMIT NO. 1359
WHITE PLAINS, N. Y.

BUSINESS

REPLY

MAIL

NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES

POSTAGE WILL BE PAID BY •••

IBM Corporation
112 East Post Road
White Plains, N. Y. 10601

Attention: Department 813

.. ....................................................................;- .................................................. .:
,

Fold

International Business Machines Corporation
Data Processing Division
112 East Post Road, White Plains, N.Y.IoBol
[USA.only]
IBM World Trade Corporation
821 United Nations Plaza, New York, NawYork 10017
[International]

Fold



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2013:05:31 08:26:28-08:00
Modify Date                     : 2013:05:31 08:16:20-07:00
Metadata Date                   : 2013:05:31 08:16:20-07:00
Producer                        : Adobe Acrobat 9.55 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:05037890-5f70-fc41-b04b-6502b2ec34eb
Instance ID                     : uuid:bb415f72-687a-c44d-9969-2d156f253efb
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 279
EXIF Metadata provided by EXIF.tools

Navigation menu