File Number 1130-30
Form C26-5929-4
IBM
Systems Reference Library
IBM 1130 Subroutine Library
This publication describes the libraries provided with the following
programming systems:
• 1130 Card/Paper Tape
• 1130 Disk Monitor Version 1
• 1130 Disk Monitor Version 2
These libraries may be referenced within this manual as C/PT,
DM1, and DM2, respectively. The library for DM2 is known
as the System Library. DM2 core addresses are given in
symbolic form. Figure 4 lists the absolute equivalents of
these symbolic addresses.
The programming system libraries consist of input/output,
conversion, arithmetic and functional, and utility subroutines.
Included in the descriptions are calling sequences for the subroutines
and explanations of the parameters involved.
The section on conversion subroutines describes the codes used to
communicate with the 1130 system I/O devices. An appendix lists
these codes and shows their relationship to each other.
PREFACE
The publication describes how the programmer can
use the IBM 1130 library subroutines to increase the
efficiency of his programs and decrease his wilting
and testing time. The libraries include the follow-
ing programs.
• Interrupt Service Subroutines
• Interrupt Level Subroutines
• FORTRAN I/O Subroutines
• Data Code Conversion Subroutines
• Arithmetic and Functional Subroutines
• Selective Dump Subroutines
• Utility Programs
The subroutines are available for use with both the
1130 Assembler and the 1130 FORTRAN Compiler.
The Utility Programs are executable under Monitor
control.
In Assembler language, the user calls the sub-
routines via a calling sequence. The appropriate
subroutine calls are generated by the FORTRAN com-
piler whenever a read, write, arithmetic, or CALL
statement is encountered. This publication describes
each subroutine and the required calling sequence.
All subroutines in the 1130 libraries are included in
the lists that appear in Appendix A.
It is assumed that the reader is familiar with the
methods of data handling and the functions of instruc-
tions in the IBM 1130 Computing System. He must
also be familiar with the assembler or compiler used
in conjunction with the subroutines. The following
IBM publications provide the prerequisite information.
IBM 1130 Functional Characteristics (Form
A26-5881)
IBM 1130 Computing System Input/Output Units
(Form A26-5890)
IBM 1130 Assembler Language (Form C26-5927)
IBM 1130/1800 Basic FORTRAN IV Language
(Form C26-3715) ~
The operating procedures manuals for the program-
ming systems also provide information on subrou-
tine usage. These manuals are:
IBM 1130 Card/Paper Tape Programming^ystem
Operators Guide (Form C26-3629)
IBM 1130 Disk Monitor System Reference Manual
(Form C26-3750)
IBM 1130 Disk Monitor System, Version 2,Pro-
gramming and Operator's Guide (Form C26-3717)
MACHINE CONFIGURATION
The use of the library subroutines requires the
following minimum machine configuration:
IBM 1131 Central Processing Unit with 4096
words of core storage
IBM 1442 Card Read Punch, or IBM 1134 Paper
Tape Reader with IBM 1055 Paper Tape Punch
In addition, the following input/output units and
features can be controlled by the input/output sub-
routines. (7"he 1403, 2310, 2501 and 1231 are sup-
ported by DM2 only. )
Console Printer/Keyboard
Single Disk Storage
1132 Printer
1627 Plotter
1403 Printer
2310 Disk Storage
2501 Card Reader
1231 Optical Mark Page Reader
Synchronous Communications Adapter
Plotter subroutines are described in IBM 1130/1800
Plotter Subroutines (Form C26-3755),
SCA subroutines are described in IBM 1130
I
Synchronous Communications Adapter Subroutines
(Form C26-3706). '~~
Foujth Edition
This edition (C26-S929-4) is a major revision of the previous edition (C26-5929-3) which
is now obsolete . Information has been added that enables the user to program either version of
the 1130 Disk Monitor System. Changes are indicated by a vertical line at the left of affected
text and a bullet (•) at the left of a title of a changed illustration.
Specifications contained herein are subject to change from time to time. Any such change
will be reported in subsequent revisions or Technical Newsletters.
A form is provided at the back of this publication for reader's comments. If the form has
been removed, comments maybe addressed to IBM Corporation, Programming Publications
Department 232, San Jose, California 95114.
International Business Machines Corporation 1965, 1966
CONTENTS
INTRODUCTION v
INTERRUPT SERVICE SUBROUTINES 1
ISS Characteristics 1
Methods of Data Transfer 1
Interrupt Processing 1
ILS Operation 2
ISS Operation 2
General Error-Handling Procedures 4
Basic ISS Calling Sequence 6
Assignment of Core Storage Locations (DM1 and C/PT
System) ^
Assignment of Core Storage Locations {DM2 System) tO
Descriptions of Interrupt Service Subroutines H
1442 Card Read Punch Subroutine (CARDO and CARDl) ... 11
2501 Card Reader Subroutines (READO and READl) 15
1442 Card Punch Subroutines (PNCHO and PNCHl) 14
Disk Subroutines (DM1 and C/PT System) 15
Disk Subroutines (DM2 System) 19
DISKZ - Disk Input/Output Subroutine 23
1132 Printer Subroutine (PRNTl) 24
1132 Printer/Synchronous Commimications Adapter
Subroutine (PRNT2) 26
1403 Printer Subroutine (PRNT3) 27
Keyboard/Console Printer 29
Paper Tape Subroutines (DM1 and C/PT System) 31
Paper Tape Subroutines (DM2 System) 33
Plotter Subroutine (PLOTl) 35
Plotter Subroutine (PLOTX) 35
1231 Optical Mark Page Reader Subroutine (OMPRl) 37
SUBROUTINES USED BY FORTRAN (DM1 AND C/PT
SYSTEM) 39
General Specifications 39
Error Handling 39
Descriptions of I/O Subroutines 39
TYPEZ - Keyboard/ Console Printer I/O Subroutine 39
WRTYZ - Console Printer Output Subroutine 40
CARDZ - 1442 Card Read Punch Input/Output Subroutine . . 40
PAPTZ - 1134/1055 Paper Tape Reader Punch I/O
Subroutine 40
PRNTZ - 1132 Printer Output Subroutine 40
DISKZ - DM1 Disk Input/Output Subroutine 40
SUBROUTINES USED BY FORTRAN (DM2 SYSTEM) 41
General Specifications (Except DISKZ) 41
Error Handling 41
Descriptions of I/O Subroutines 41
TYPEZ - Keyboard/Console Printer I/O Subroutine 41
WRTYZ - Console Printer Output Subroutine 42
CARDZ - 1442 Card Read Punch Input/Output Subroutine . . 42
PAPTZ - 1134/1055 Paper Tape Reader Punch I/O *
Subroutine 42
PRNTZ - 1132 Printer Output Subroutine 42
PNCHZ - 1442 Output Subroutine 43
READZ - 2501 Input Subroutine 43
PRNZ - 1403 Printer Subroutine 43
DATA CODE CONVERSION SUBROUTINES 44
Descriptions of Data Codes 44
Hexadecimal Notation 44
IBM Card Code 45
Perforated Tape and Transmission Code (PTTC/8) 45
Console Printer Code 46
Extended Binary Coded Decimal Interchange Code
(EBCDIC) 46
1403 Printer Code 46
Conversion Subroutines 46
BINDC 48
DCBIN 48
BINHX 48
HXBIN 49
HOLEB 49
SPEED • SO
PAPEB 51
PAPHL 52
PAPPR 54
HOLPR 54
EBPRT 55
BIDEC 56
DECBI 57
ZIPCO 57
ARITHMETIC AND FUNCTIONAL SUBROUTINES 60
Real Data Formats 60
Real Number Pseudo-Accumulator 62
Calling Sequences 62
Arithmetic and Functional Subroutine Error Indicators ... 66
Functional Subroutine Accuracy 67
Extended Precision Subroutines 67
Standard Precision Subroutines 68
Elementary Fimction Algorithms 69
Sine-Cosine 69
Arctangent 70
Square Root 70
Natural Logaiithm 71
Exponential 71
Hyperbolic Tangent 72
Real Base to Real Exponent 72
SELECTIVE DUMP SUBROUTINES 73
Dump Selected Data on Console Printer or
1132 Printer 73
Dump Status Area 73
SPECIAL MONITOR SUBROUTINES 74
I DM2 System 74
FLIPR (LOCAL/SOCAL Overlay) 74
RDREC (READ *ID Record) 74
CALPR (Call System Print) 74
FSLEN (Fetch Phase IDs and Fetch System Subroutine) .... 74
SYSUP (DCOM Update) 74
DM! System 75
Overlay Subroutines (Flippers) 75
SYSTEM UBRARY MAINUNE PROGRAMS (DM2 SYSTEM) . . • 76
Disk Maintenance Programs yg
Paper Tape UtUity (PTUTL) 78
WRITING ISS AND ILS (DM1 AND C/PT SYSTEM) 79
Interrupt Service Subroutines 79
Interrupt Level Subroutines 79
APPENDK A. USTING OF SUBROUTINES 85
APPENDIX B. ERROR DETECTED BY THE ISS
SUBROUTINES 92
APPENDIX C . SUBROUTINE ACTION AFTER RETURN
FROM A USER'S ERROR SUBROUTINE 94
APPENDIX D. CHARACTER CODE CHART 95
APPENDIX E. CORE REQUIREMENTS 99
APPENDIX F. EXECUTION TIMES 101
INDEX 105
■
INTRODUCTION
It is often necessary to repeat a group, or block, of
instructions many times during the execution of a
program (examples include conversion of decimal
values to equivalent binary values , computation of
square roots, and the reading of data from a card read-
er). It is not necessary to write the instructions each
time a function is required. Instead, the block of
instructions is written once, and the main program
transfers to that block each time it is required.
Such a block of instructions is called a subroutine .
Subroutines normally perform such basic functions
that they can assist in the solution of many different
kinds of problems.
When a main program uses a subroutine several
times, which is the common situation, the block of
instructions constituting the subroutine need appear
only once. Control is transferred from a main pro-
gram to the subroutine by a set of instructions known
as a calling sequence, or basic linkage. A calling
sequence transfers control to a subroutine and,
through parameters , gives the subroutine any control
information required.
The parameters of a calling sequence vary with
the type of subroutine called. An input/output sub-
routine requires several parameters to identify an
input/output device, storage area, amount of data to
be transferred, etc. ; whereas an arithmetic/func-
tional subroutine usually requires one parameter
representing an argument. Each calling sequence
used with subroutines in the 1130 system consists of a
CALL or LIBF statement (whichever is required to
call the specific subroutine), followed by the DC state-
ments that make up the parameter list. The calling
sequences for the various subroutines in the libraries
are presented later in the manual. Each subroutine
is self-contained, so that only those subroutines
required by the current job are in core storage during
execution.
INTERRUPT SERVICE SUBROUTINES
The interrupt service subroutines (ISSs) transfer data
from and to the various input/output devices attached
to the computer. These subroutines handle all the
details peculiar to each device, including the usually
complex interrupt functions, and can control many
input/output devices at the same time by overlapping
their operations.
transfer. These devices are provided with control
information, word-coimts, and data from the user's
I/O area. Once initiated, data transfer proceeds con-
currently with program execution. An operation-
comiplete interrupt signals the end of an I/O operation
when all data has been transferred. All disk drives,
the 1403 Printer, and the 2501 Card Reader operate
via a data channel.
ISS CHARACTERISTICS
To fully understand subsequent descriptions of each
ISS, the user should be familiar with the following
characteristics, which are common to all ISSs:
• Methods of data transfer
• Interrupt processing
• ILS (interrupt level subroutine) operation
• ISS (interrupt service subroutine) operation
• General error handling procedures
• Basic calling sequence
METHODS OF DATA TRANSFER
IBM 1130 I/O devices and their related subroutines
can be differentiated according to their methods of
transmitting and/or receiving data.
Direct Program Control
Serial I/O devices operate via direct program control,
which requires a programmed I/O operation for each
word or character transferred. A character interrupt
occurs whenever a character I/O operation is com-
pleted. Direct program control of data transfer is
used for the following system I/O devices: 1442 Card
Read Punch, 1442 Card Punch, 1134 Paper Tape
Reader and 1055 Paper Tape Punch, Console Printer,
Keyboard, 1132 Printer, and 1627 Plotter.
Data Channel
Other system I/O devices operate via a data channel,
which requires an l/O operation only to initiate data
INTERRUPT PROCESSING
Interrupt processing is divided into two parts, level
processing and device processing. The flow of logic
in response to an interrupt is: user program inter-
rupted, level processing begun, device processing
begun and completed, level processing completed,
and user program continued.
Level Processing
Level processing consists of selecting the correct
device processing subroutine, performing certain
housekeeping functions, and clearing the level by a
BOSC instruction when interrupt processing is com-
plete.
Level processing is done by the ILSs (interrupt
level subroutines). Entered by interrupts, ILSs give
temporary control to device processing subroutines
(ISSs) and eventually return control to the user pro-
gram. The interrupt entrance address is stored dur-
ing the loading of a core load or program, in the
appropriate interrupt branch address; location 8 for
interrupt level zero (ILSOO) , location 9 for interrupt
level one (ILSOl) location 12 for interrupt level
four (ILS04). The device processing entrance address
is computed during the loading of a core load from
identifying information that is a part of the ILS.
In the card/paper tape system, the device proces-
sing entrance address is stored during the loading of
a program from identifying information stored in the
ILS, in the compressed ISS header card, and in the
loader interrupt transfer vector.
Device Processing
Device processing consists of operating an l/O device,
processing the interrupts, and clearing the device by
an XIO (sense DSW) instruction when interrupt proces-
sing is complete.
Interrupt Service Subroutines 1
Device processing is done by the ISSs (interrupt
service subroutines). The ISSs can be entered by a
calling instruction (LIBF or CALL), which either
requests certain Initialization to be done or requests
an I/O device operation. They can also be entered by
an ILS as part of the interrupt processing. The calling
entry point is specified in the ISS statement. The
interrupt entry points are set up in the ISS and identi-
fied in the ILS. They are entered indirectly throv^h
a branch address table.
ILS OPERATION
The ISS/ILS package services all input/output inter-
rupts.
Description
There is one ILS for each interrupt level used. Each
subroutine determines which device on its level caused
a particular interrupt; preserves the contents of the
Accumulator, the Accumulator Extension, Index Reg-
ister One (XRl), and the Carry and Overflow indica-
tors; and transmits identifying information to the ISS
(Disk Monitor ILSs also save Index Register Two
(XR2)).
Interrupt service subroutines are loaded first so
that the loader loads only the ILSs that are required.
For example, if a main program does not call the 1132
Printer subroutine, the subroutine for interrupt level
1 (ILSOl) need not be loaded because no interrupts will
occur on that level. An ILS cannot be called; it is in-
cluded in a core load or program only if requested by
an ISS (see ISS-Define Interrupt Service Entry Point
in IBM 1130 Assembler Language, Form C26-5927).
When the ILSs are loaded, the core addresses as-
signed to them are incorporated into the appropriate
locations in the Interrupt Transfer Vector (words 8-
13) . Interrupts occurring during execution of a user
program cause a Branch Indirect, via the interrupt
branch address, to the correct ILS.
Recurrent Subroutine Entries
Recurrent entries to a subroutine can result from
interriq)ts. For example, during execution of the
Console Printer subroutine, a disk interrupt can start
execution of a subroutine to handle the condition that
caused the disk interrupt. If this handling includes
calling the Console Printer subroutine, certain in-
formation is destroyed, the most important of which
is the return address of the program that originally
called the Console Printer.
To prevent the loss of data resulting from such a
recurrent entry, the user must provide the program-
ming required to save the return address and any
other data needed to continue an interrupted subroutine
after an interrupt has been serviced.
NOTE: All ISSs were written with the assumption
that all LIBFs would be executed from the mainline
level of interrupt priority. There are no provisions
in any ISSs to handle recurrent entries.
ISS OPERATION
This section briefly describes the operation of the
ISSs. This description, along with some basic flow-
charts, should make it easier for the reader to under-
stand the descriptions of individual subroutines
presented later.
The disk subroutines are included here as ISSs even
though in the Disk Monitor ^stem they are not truly
ISSs. They do however, have most of the character-
istics of an ISS.
ISS Subdivision
Each ISS is divided into a call portion and an interrupt
response portion. The call portion is entered when a
user's calling sequence is executed; the interrupt
response portion is entered as a result of an I/O
interrupt.
Call Processing
Each ISS saves and restores the contents of the Accu-
mulator and Extension, Index Registers; and the Carry
and Overflow indicators. The call portion, illustrated
in Figure 1, has four basic functions:
1. Determine if any previous operations on the
specified device are still in progress.
2. Check the calling sequence for legality.
3. Save the calling sequence.
4. Initiate the requested I/O operation.
The flow diagram (Figure 1) is not exact for any
one ISS. It is only a general picture of the Internal
operation of the call portion of an ISS.
Determine Status of Previous Operation. This func-
tion can be performed by using a programmed sub-
routine-busy Indicator to determine if a previous
operation Is complete. The CARDl subroutine is a
I
Entry
-^ Yes
y'
'
v^No ^
No
X^ Function .
'H'revlous^
Operation
■Complete/
/ i?eturn to User
V^ at LIBF + 2
)
lYes
TEST
Function
Return
at LIBF
toUser^
Legal
CALL
No
Set up for j
Illegal Call
Error
Set up for
Device Not
Ready Error
Set
Busy
Indicators
(Exit to ^
Location 41 J
Save Calling
Sequence
Parameters
C Return to User ^
Determine
Requested
Function
Initiate
I/O
Operation ;
(Return ^
to User )
good example. When an operation is started on the
1442, a subsequent LIBF CARDl for the 1442 is not
honored until the subroutine -busy indicator is turned
off. A call to any other ISS subroutine, such as
TYPEO, is not affected by the fact that the CARDl
subroutine is busy.
Each ISS, except PAPTN, can use one program-
med subroutine -busy indicator to determine if a
previous operation is complete. The PAPTN sub-
routine uses two busy indicators, one for the paper
tape reader and one for the punch. If an operation is
started on the reader, a subsequent LIBF PAPTN for
the reader is not honored until the Reader Busy indi-
cator is turned off. However, a LIBF PAPTN for the
paper tape pvinch is treated in the same manner as a
call to any other ISS and is not affected by the fact
that the paper tape reader is busy.
Check Legality of Calling Sequence. Calling se-
quences are checked for such items as illegal func-
tion character, illegal device identification code,
zero or negative word coimt, etc.
Save Calling Sequence. The call portion saves, within
itself, all of the calling sequence information needed
to perform an I/O operation. The user can modify a
calling sequence, even though an I/O operation is not
yet complete.
NOTE: The I/O data area should be left intact during
an operation because the ISS is continually accessing
and modifying that area.
Initiate I/O Operation. The call portion only initiates
an I/O operation. Subsequent character interrupts or
operation complete interrupts are handled by the
interrupt response routine.
Interrupt Response Processing
The I/O interrupt response portion of an ISS is
illustrated in Figure 2.
Operation. An I/O interrupt causes a user program
to exit to an interrupt level subroutine, which in turn
exits to the I/O interrupt response portion of an ISS.
The interrupt response portion checks for errors,
does any necessary data manipulation, initiates
character operations, and initiates retry operations
in case of errors. It then returns control to the
interrupt level subroutine, which returns control to
the user.
Figuie 1 . Call Poition of an ISS
Character Interrupts. These interrupts occur for
devices under direct program control whenever data
Interrupt Service Subroutines 3
Entry
Return
Level
to Interrupts
Routine J
Housekeep
Manipulate
Data as
Specified
Yes
Clear
Busy
Indicators
Re-lnrtiote
I/O /
^Operation/
Clear
Busy
Indicators
f Return to InterrupA
VLevel Routine J
can be read or written, e.g. , a card column punched
or a paper tape character read.
Operation Complete Interrupts. These interrupts
occur in disk and card operations when a specified
block of data has been read or written, e. g. , a disk
record read.
Error Detection and Recovery Procedures.
These
However,
Figure 2. Interrupt Response Portion of an ISS
procedures are an important part of an ISS
little can be done about reinitiating an operation
until a character interrupt or operation complete
interrupt occurs. Therefore, error indicators are
not examined imtil one of these interrupts occurs.
Recoverable Device. This is an I/O device that can
be easily repositioned by a subroutine or by an oper-
ator and an l/O operation reinitiated. If a device is
not recoverable, or if an error cannot be corrected
after a specified nimiber of retries, the user is in-
formed of the error condition. If a device is re-
coverable, the user may request, via his error
subroutine , that the operation be reinitiated.
GENERAL ERROR -HANDLING PROCEDURES
Each ISS has its own error detecting portion, which
determines the type of error and chooses an error
procedure. (In this context, the term, error, in-
cludes such conditions as last card, channel 9,
channel 12, etc.) Errors fall into one of two
categories: those that are detected before an I/O
operation is initiated, and those that are detected
after an I/O operation has been initiated. Appendix
B contains a list of the errors detected by the ISSs;
Appendix C contains descriptions of the actions taken
by each ISS after the return from user -written error
subroutines.
Pre-Operative Error Detection
Before an ISS initiates an I/O operation, it checks the
device status and the legality of calling sequence
parameters. If a device is not ready, or a param-
eter is in error, the subroutine stores the address
of the LIBF statement in core location $PRET(28) and
exits to core location $PRET+1 (29), which is a WAIT
instruction. The Accumulator contains an error
indicator that defines the error (see Appendix E).
This error indicator consists of four hexadecimal
digits that are defined as follows.
Digit 1 identifies the ISS subroutine called:
I DM1 and C/PT System DM2 System
1 - CARDO or CARDl
2 - TYPEO or WRTYO
3 - PAPTl or PAPTN
1 - CARDO, CARDl, or
CARDZ} PNCHO,
PNCHl, orPNCHZ
2 - TYPEO or TYPEZ,
WRTYO or WRTYZ
5 - DISKO, DISKl, orDISKN 3 p^pxl PAPTN,
PAPTX, or PAPTZ
6 - PRNTl
7 - PLOTl
4 - READO, READl, or
READZ
18 - SCATl, SCAT2, or SCATS 5 - DISKZ, DISKl, or
DISKN
6 - PRNTl or PRNTZ
7 - PLOTl or PLOTX
8 - SCATl, SCAT2, or
SCATS
9 - PRNT3 or PRNZ
A - OMPRl
I Digits 2 and 3 are reserved.
Digit 4 identifies the error:
- device not ready
1 - illegal LIBF parameter or Illegal specification
in the I/O area.
There is a WAIT instruction In core location
I $PRET+1 and a branch instruction (BSC I $PRET)
in the next location. Therefore, the LIBF may
be executed again (after the error condition has
been corrected) by pressing PROGRAM START on the
console. The user can, if he chooses, replace these
two instructions with an exit to his own error sub-
routine.
Post-Operative Error Detection
After an I/O operation has been started, certain con-
ditions may be detected about which the user should
be informed. The conditions might be card jams for
which manual intervention is needed before the opera-
tion can continue; read checks that have not been cor-
rected after a specified nvimber of retries; or indica-
tions of equipment readiness, such as last card or
channel 12 indicators. All these conditions are de-
Itected by the Interrupt response portion (see
ISS Operation).
No Error Parameter. If no error parameter is
included in the calling sequence that initiated the I/O
operation and a post-operative error condition is
detected, the card/paper tape system subroutine
initiates a Wait procedure (programmed loop) , which
continues until an operator corrects the detected
condition.
I The DM2 system does not use a programmed
loop, but rather branches to a post-operative error
trap that is similar to the pre-operative error trap.
Each interrupt level (1-4) has its own post-operative
error trap with accompanying WAIT address.
Level 1
Level 2
Level 3
Level 4
$PST1
$PST2
$PST3
$PST4
Processing resumes after the operator corrects
the detected condition and presses PROGRAM
START.
Error Parameter Included. If an error parameter is
included in the calling sequence, a Branch and Store
Instruction Coimter instruction (BSI) to the user's
error subroutine specified in the calling sequence is
executed. Identifying information is placed in the
accumulator and extension (see Appendix B). When
the user's error subroutine returns control to the ISS
using the return link (see Basic ISS Calling Sequence ) ,
the subroutine examines the Accumulator. If the
user has cleared the Acciunulator before returning
to the subroutine, he is requesting that the error
condition be ignored and the operation terminated.
If the user has not cleared the Accumulator, he is
requesting that the operation be restarted, in which
case the subroutine reinitiates the operation before
returning to the user's main program.
Implications of the User's Error Subroutine. It is
Important to note that a user's error subroutine
(entered via the LIBF error parameter address) is
executed as part of the interrupt processing. The
interrupt level is still on, preventing recognition of
other interrupts of the same or lower priority. This
has the following implications:
1. Return must be made to the ISS subroutine via
the return link (set up by the BSI instruction
executed by the ISS subroutine). Otherwise,
normal processing cannot be continued because
the ISS must return to the ILS to restore the
contents of the Accxmiulator and Extension,
Status Indicators, and Index Registers.
Interrupt Service Subroutines 5
2. Return must be made with a BSC instruction, not
a BOSC instruction. Otherwise, the interrupt
level is turned off, setting up the possibility that
another interrupt could occur on the same level
thus destroying the return address to the user
from the ILS.
3. A LIBF or CALL to another subroutine from the
user's error subroutine can cause a recurrent-
entry problem. If that subroutine is already in
use when the interrupt occurs, the user's new
LIBF or CALL destroys the original return
address and disrupts operation of the called
subroutine.
4. A LIBF or CALL to another ISS can cause an
endless loop if the new I/O device operates on
the same or lower priority interrupt level than
the device that caused the error.
NOTE: A call to WRTYO to type an error message
can be made only if the user does not wait for the
completion of typing or for operator intervention
before returning to the ISS. A test loop on level 4
(typewriter) or a WAIT loop will both block the clear-
ing of the level that caused the interrupt to the
user's error subroutine.
5. The user should have a separate error subroutine
for each device to prevent errors on several
devices (on different levels) from causing re-
current-entry problems in the user's error
subroutine.
NOTE: The error codes in the Accumulator may not
distinguish between ISSs, as the preoperative error
codes do.
Since the ILS saves Index Register 1 as part of its
interrupt processing, the user's error subroutine
can also use this index register without saving and
restoring it. However, the user cannot depend on
the contents of Index Register 1 unless he initializes
it as part of his error subroutine. The DM2 ILSs
also save Index Register 2.
Programming Techniques - User's Error Subroutine
Exits . Some programming techniques that can be
used in conjunction with the ISS error exit are as
follows:
2. To terminate the operation:
u.,
B m
;
I
OlKWdl a R«H.\.
us,e.e,
o.r. .
f!
....
s.p.e.
fi6 r.n, .r..i .F^iH.a. .r.u.r. .a,c,c,n,M.ii.L,a,T,n.e, ,
....
s.s.r.
T
<US.F.ff ,
. , , .
^
„
_
3. To indicate that a condition ("last card" or
"channel 9") was detected and that the normal
program flow should be altered:
L.^,
Opan^ion
F
'
Opvondi & Rwnriu
L.O. .
l.A/.n.i.r. ■
_L.^_i.J_J_i.l.l;lIll,J..
, , , .
&,£jC^
f
W.F.llf, ,z. ■
, . , ,
LlLlBlE
c.A.B.rxi. .
D,r., ,
/.i.^.^^ .
n.r, ,
r,N.p.t}.r. .
, ,B,F.A,n ,n,N.E. .CA.e.n.
o.r. .
f/,.<,^,j?, , ■
, , _ ,
, . , L
• , , .
._
'ij;.F.ff.
D,C, .
{tf
asxi-
T
!A<;,f,ff, iT'i
r .n .
e,x.i.T.
Ru^ir.
T
U.S.F.R, . .
. . . .
'. . ,
•,,,,,,
• ,
N.fT.IM ,
^,R,A.
<i.T.n
T.N.D.T.C, .
, . , .
, , , ,
,, ,
•..,"...
. . . .
_
-, , ,
_
_
_1
I
BASIC ISS CALLING SEQUENCE
Each ISS described in this manual is entered via a
calling sequence. These calling sequences follow a
basic pattern. In order not to burden the reader with
redundant descriptions, this section presents the
basic calling sequences and describes those param-
eters that are common to most of the subroutines.
Basic Calling Sequence
ilBF Name
DC Control parameter
DC I/O area
DC Enor subroutine
The above calling sequence , with the parameters
shown, is basic to most of the ISSs. Detailed descrip-
tions of the above four parameters are omitted when
the subroutines are described later in the manual.
Unless otherwise specified, the subroutine returns
control to the instruction immediately following the
last parameter.
1. To try t^he operation again:
Lobal
Op.ralion
I
T
Opaind. & R«ng.k.
US.P^.IF.
nr. .
a
fi.<i.c..
T
....
Name Parameter
Each subroutine has a s3mibolic name, that must be
written in the LIBF statement exactly as listed in
Tables 1 and 2.
# Table 1 . DM1 and C/PT System ISS Names
Device
Subroutine
1442 Card Read Punch
CARDOorCARDI
Disk
DISKO, DISK1, or DISKN
1132 Printer
PRNT1
Keyboard/Console Printer
TYPED
Console Printer
WRTYO
1134/1055 Paper Tape
PAPT1 or PAPTN
1627 Plotter
PLOT1
Synchr . Comm . Adapter
SCATl, SCAT2, or SCATS
For some devices more than one subroutine is
available, although only one can be selected for use
in any one program (including called subroutines).
NAMEO. The NAMEO subroutine is the shortest and
least complicated. The NAMEO version is the
standard subroutine for the 1442, 2501, and Console
Printer/Keyboard. The NAMEO version of the Disk
(routine (DISKO) can be used if transfer of data is
320 words or less (DM1 or C/PT system only).
NAMEl. The NAMEl version is the standard sub-
( routine for the disk, 1132, 1403, 2501, 1134/1055,
1231, and 1627. It may be used if a user error exit
is needed rather than the internal looping and retries
by the NAMEO subroutine.
# Table 2. DM1 and/ or DM2 System ISS Names
Device
Subroutine
1442 Cord Read Punch
CARDZ, CARDO, or CARDl
2501 Core) Reader (DM2 only)
READZ, READO, or READ 1
1442 Cord Punch
PNCHZ, PNCHO, or PNCHl
Disk
DISKZ, DISKl, or DISKN
1132 Printer
PRNTZ, PRNT1, orPRNT2
1403 Printer (DM2 only)
PRNTZ or PRNT3
Keyboard/Console Printer
TYPEZ or TYPED
Console Printer
WRTYZ or WRTYO
1134/1055 Paper Tape Reader
Punch
PAPTZ, PAPT1, PAPTN, or PAPTX
(DM2 only)
1627 Plotter
PLOTI or PLOTX
1231 Opticol Mark Page Reader
(DM2 only)
Synchr. Comm. Adapter
OMPR1
SCATl, SCAT2, or SCATS
NAMEN. The NAMEN version is available to operate
the 1134/1055 Paper Tape Reader and Punch sim-
ultaneously and to minimize extra disk revolutions
when transferring more than 320 words to or fromi
the disk. The NAMEN subroutine offers more
options than the NAMEl subroutine. In DM2, it
also provides the ability to operate all five disk
drives simultaneously.
NAMEZ . The NAMEZ version is designed for use in
an error free environment. It provides no pre-opera-
tive parameter checking. The EOETRAN formatting
subroutines use these ISSs but they do not use the
calling sequence listed below (see Subroutines Used
by FORTRAN) .
PRNT2. The PRNT2 version is used when the 1132
is used with the SCA.
PRNT3 . The PRNT3 version is used with the 1403.
Control Parameter
The control parameter, in the form of four hexa-
decimal digits, conveys necessary control data to
the ISSs by specifying the desired function (read,
write, etc.), the device identification, and similar
control information. Most subroutines do not use
all four digits.
A typical control paraxaeter is illustrated below.
I/O Function -
Hexadecimal Digits
1st 2nd 3rd
Not Used .
4th
Device Identification
Since the I/O function and device identification
digits are used in most subroutines, a description
of the purpose of each is given here.
I/O Fimction
The function digit in the calling sequence specifies
which I/O operation the user is requestii^. Three of
these functions, read, write, and test are used in
most subroutines.
Read. The read fimction causes a specified amount
of data to be read from an input device and placed in
a specified input area. Depending upon the device,
Interrupt Service Subroutines 7
an interrupt signals the subroutine either when the
next character is ready or when all requested data
has been read. When the specified number of char-
acters has been read, the subroutine becomes avail-
able for another call to that device.
Write. The write function causes a specified amount
of data from the user's output area to be written,
i. e. , printed or punched, by an output device. As
with the read function, kn interrupt signals the sub-
routine when the device can accept another character,
or when all characters -have been written. When
the specified number of characters has been written,
the subroutine becomes available for another call to
that device.
Test. The test function causes a check to be made
as to the status of a previous operation initiated on an
I/O device. If the previous operation has been com-
pleted, the subroutine branches to the LlBf +3 core
location; if the previous operation has not been com-
iSeted, the subroutine branches to the LIBF +2 core
location. The test function is illustrated below:
LIBF
Name
LIBF +1
DC
Control Parameter
(specifying Test function)
LIBF +2
OP Code
xxxx....
LIBF +3
OP Code
xxxx. ...
NOTE: Specifyii^ the test function requires two
statements (one LIBF and one DC) , except in Disk
subroutines, where three statements are required.
The test function is useful in situations in which
input data has been requested, but no processing can
be done vintil the data is available.
I/O Area Parameter
The I/O area for a particular operation consists of
one table of control information and data. This
table is composed of a data area preceded by a con-
trol word (two control words for disk operations)
that specifies how much data is to be transferred.
The area parameter in the callii^ sequence is the
address (symbolic or actual) of the first control
word that precedes the data area.
The control word contains a word coimt refer-
ring to the number of data words in the table. It is
important to remember that the number of words in
the table is not always the number of characters to
be read or written, because some codes pack two
characters per word. The disk subroutines require
a second control word, which is described along
with those subroutines.
Error Parameter
I
The error parameter is the means by which an ISS
can give temporary control to the user in the event
of conditions such as error, last card, etc. This
parameter is not required for the NAMEO subrou-
tines for the 2501, 1442, Console Printer, or Key-
board. The instruction sequence for setting up the
error subroutine is shown below.
LIBF
NAME
DC
ERROR (error parameter)
ERROR
DC
(return link)
(error routine)
BSCI
ERROR (branch to return link)
Device Identification
This digit should be zero except for the Test function
with the PAPTN (paper tape) subroutine .
NOTE : For all disk subroutines , this digit appears
in the I/O area rather than in the control parameter.
The return link is the address in the related ISS to
which control must be returned upon completion of
the error subroutine. The link is inserted in location
ERROR by a BSI from the ISS when the subroutine
branches to the error subroutine.
The types of errors that cause a branch to the
error address are listed in Appendix B.
NOTE: The user's error subroutine is executed as
part of the interrupt response handling. The interrupt
level is still on and remains on imtil control is re-
turned to the ISS (see General Error Handling
Procedures).
ASSIGNMENT OF CORE STORAGE LOCATIONS
I (DM1 AND C/PT SYSTEM)
The portion of core storage used by the ISS and ILS
subroutines is defined below. Care should be used
in altering any of these locations (see Figure 3).
The areas illustrated in Figure 3 are described
below.
Interrupt Branch Addresses
ILS Subroutines . When required, the address of ILSOO
is always stored in location 8, ILSOl in location
9 ILS05 in location 13.
Interrupt Trap . The address of the interrupt trap
is stored in any location for which no ILS is loaded.
Hex
Decimal
9
9
A
10
B
11
C
12
D
13
E
14
IF
31
20
32
27
28
29
2C
2D
45
2E
46
2F
47
32
39
40
41
44
A/
50
(ILSOO)
(ILSOl)
(ILS02)
(ILS03)
(ILS04)
(ILS05)
DC
WAIT
BSC I 40
DC
DC
45
DC
WAIT
MDX *-2
BOSC I 45
Jnterrupt Branch
Addresses
>vj Reserved
S-Reserved for 1132 Printer
>-Preoperative Error Trap
. ISS Exit (Keyboard
Interrupt Request)
>■ Interrupt Trap
>ISS Counter
Figure 3. ISS and ILS Core Locations for the DM1 and C/PT System
1132 Printer
This area is used by 1132 Printer.
Pre -operative Error Trap
This exit is used whenever a pre-operative error
(illegal LIBF or device not ready) is detected by an
ISS.
To retry the call, press START.
The user-written subroutine must return to the
TYPEO or WRTYO subroutine in order to allow
Interrupts of equal or lower priority to occur. Also
a call executed to any subroutine might cause a
recurrent-entry problem unless the user can guaran-
tee that the subroutine was not in use when the key-
board interrupt occurred.
Location 2C is initialized with the address of the
interrupt trap in case the user fails to store an
address in the interrupt trap to process Keyboard
operator requests.
ISS Exit
The ISS exit results from pressing the Keyboard
Interrupt Request key. The TYPEO and WRTYO sub-
routines execute a BSI I 2C whenever a keyboard
operator request is detected. Note that interrupt
level 4 is still on.
Interrupt Trap
This trap is entered when an interrupt occurs for
which there is no ILS and/or no ISS assigned to the
pertinent bit in the Interrupt Level Status Word (ILSW).
Interrupt Service Subroutines 9
Interrupts of higher priority will be processed
before the system finally halts with the lAR displaying
/002F.
ISS Counter
The ISS counter is incremented by +1 every time an
ISS initiates an interrupt-causing I/O operation and
is decremented by +1 when the operation is complete.
A positive value in this location indicates the number
of interrupt(s) pending. This counter should never be
negative,
ASSIGNMENT OF CORE STORAGE LOCATIONS
(DM2 SYSTEM)
The portion of core storage used by the ISS and ILS
subroutines is defined below. Care should be used in
altering any of these locations (see Figure 4) .
The areas illustrated in Figure 4 are described
below.
Interrupt Branch Addresses
ILS Subroutines. The address of ILSOO is always
stored in location 8, ILSOl in location 9, . . . ,ILS05
in location 13.
Interrupt Trap. The address of the Program Stop
Key trap ($STOP) is stored in any location for which
no ILS is loaded.
Reserved Areas
I These locations are reserved for the DM2 system.
1132 Printer
This area is used by 1132 Printer.
Pre-operative Error Trap
This exit is used whenever a pre-operative error
(illegal LIBF or device not ready) is detected by an
ISS.
To retry the call, press START.
Hex
Decfmal
8
8
9
9
A
10
B
II
C
12
D
13
IF
20
27
2C
31
32
39
28
40
29
41
2A
42
31
49
32
50
33
51
3E
62
3F
63
40
64
80
128
81
82
83
129
130
131
85
86
87
133
134
135
89
8A
8B
137
138
139
8D
8E
8F
141
142
143
91
92
93
145
146
147
(ILSOO)
(ILSOl)
(ILS02)
(ILS03)
(ILS04)
(ILS05)
► Interrupt Branch Addresses
M\
SPRET DC * - '
WAIT
B5C I SPRET
>Reserved for Monitor System
VReserved for 1132 Printer
Preoperative Error Trap
I
SIOCT DC
'^ )Reserved for Monitor Systei
^ISS Counter
SIREQ DC
SPSTl DC * - *
WAIT
BSC I SPSTl
$PST2 DC * - *
WAIT
BSC I $PST2
SPST3 DC * - *
WAIT
BSC I $PST3
SPST4 DC * - *
WAIT
BSC I SPST4
SSTOP DC
WAIT
B05C I SSTOP
'/Reserved for Monitor System
^ISS Exit (Keyboard Interrupt Request)
;1
/Reserved for Monitor System
\ Postoperative Error Trap For Level 1
Postoperative Error Trap for Level 2
'Postoperative Error Trap for Level 3
Postoperative Error Trap for Level 4
Program Stop Key Trap
Figure 4, ISS and ILS Core Locations for the DM2 System
ISS Counter
The ISS coxmter is incremented by +1 every time an
ISS initiates an interrupt-eausing I/O operation and is
decremented by +1 when the operation is complete.
10
A positive value in this location indicates the number
of interrupt(s) pending. This counter should never
be negative.
ISS Exit
CARPI Subroutine. The CARDl subroutine can be
used for the Card Eead Punch if a user error exit
is needed, rather than the error procedures of the
CARDO subroutine.
The ISS exit results from pressing the Keyboard
Interrupt Request key. The TYPED and WRTYO
subroutines execute a BSI I $IREQ whenever a Key-
board operator request is detected. Note that
interrupt level 4 is still on.
The user-written subroutine must return to the
TYPEO or WRTYO subroutine in order to allow in-
terrupts of equal or lower priority to occur. Also
a call executed to any subroutine might cause a re-
current-entry problem unless the user can guarantee
that the subroutine was not in use when the keyboard
interrupt occurred.
$IREQ is initialized with the address of the system
dump entry point during JOB processing. This
allows the user to terminate the job by pressing the
Interrupt Request key (INT REQ).
Post-operative Error Traps
These traps are entered when a device not ready con-
dition is detected prior to the initiation of an I/O
operation in the interrupt response portion of an ISS
subroutine. Each interrupt level (1-4) has its own
post-operative error trap. The system will WAIT
with the lAR displaying the address of $PST1, $PST2,
$PST3, or $PST4, depending on the interrupt level
of the device.
DESCRIPTIONS OF INTERRUPT SERVICE
SUBROUTINES
Calling Sequence
^be,
'
T
Oparondi S Rennrla
i,X,P
F
C.^.iP.Z>,a. .
. T.,/i,i ,t , .r.iA.K.a ,1,/n
, ,
,
D.C,
, ,
1
n.c.
r./7.J,i7.
,
.r./.n. A.e.f^.A, ,p,A,R,a,ULfi,T,^.a
, ,
^
l?,C,
£,li:i!.n.x
,
, ,
1
, ,
• , ,
. ,
,
1
F.R.fi
i^iff
P^c,
kt.-,., ,
,
^ ^ 1
, ,
^
SiSjC
.,
, ,
1
,, ,
. , <
,
J.C.A
a
p,r,
f, . . .
,
. M,n.B,n, .cn.ij.^.T
6h?,.5
-\
-\
h. , < ,
-_t.,.J
, ,r,/,n. .e.e.F.A
where
a is or 1,
b is the I/O fimction digit,
f is the number of columns to be read from or
punched into the card,
h is the length of the I/O area, h must be equal
to or greater than f.
The calling sequence parameters are described
in the following paragraphs.
Note that the subroutine READO, READl, PNCHO,
PNCHl, PRNT3, and OMPRl are available only with
the DM2 system.
1442 CARD READ PUNCH SUBROUTINE (CARDO
AND CARDl)
The card subroutines perform all I/O functions
relative to the IBM 1442 Card Read Punch: read,
punch, feed, and stacker select.
CARDO Subroutine. The CARDO subroutine is shorter
and less complicated than CARDl and is the standard
subroutine for the 1442.
CARDO can be used if the error parameter is not
needed. When an error occurs, the subroutine loons
(DM! and C/PT system) or WAITs at $PST4+1 (DM2
system) , until the operator takes corrective action.
Last card conditions cause pre-operative not-ready
exits.
Control Parameter
This parameter consists of four hexadecimal digits
as shown below:
I/O Function-
Not Used
I/O Fimction
The I/O function digit specifies the particular opera-
tion to be performed on the 1442 Card Read Punch.
The functions, associated digital values, and re-
quired parameters are listed and described below.
Interrupt Service Subroutines 1 1
Function Digital Value
Required Parameters*
Test
Control
Read
1
Control,
I/O Area, Error**
Punch
2
Control,
I/O Area, Erroi**
Feed
3
Control,
Eiroi**
Stacker Select
4
Control
* Any parameter not required for a particular function must
be omitted.
**Eiror parameter not required for CA RDO.
Test. Branches to LIBF+2 if the previous operation
has not been completed, to LIBF+S if the previous
operation has been completed.
Read. Reads one card and transfers a specified
number of columns of data to the user's input area.
The number of columns read (1-80) is specified by
the user in the first location of the l/O area. The
subroutine clears the remainder of the I/O area and
stores a 1 in bit position 15 of each word, initiates
the card operation, and returns control to the user's
program. When each column is ready to be read, a
column interrupt occurs . This permits the card
subroutine to read the data from that column into
the user's input area (clearii^ bit 15), after which
the user's program is again resumed. This sequence
of events is repeated until the requested number of
columns has been read, after which the remainii^
column interrupts are cleared (no data read) .
When an operation complete interrupt occurs, the
card subroutine checks for errors, informs the user if
an error occurred (CARD! only), and sets up to ter-
minate (CARDl only) or retry the operation.
The data in the user's input area is in a code
similar to IBM Card Code format; that is, each 12-
bit column image is left- justified in one 16 -bit word.
Punch. Punches into one card the number of columns
of data specified by the word count found at the begin-
ning of the user's output area. The punch operation
is similar to the read operation. As each column
comes under the punch dies, a column interrupt
occurs ; the card subroutine transfers a word from
the user's output area to the punch and then returns
control to the user's program.
This sequence is repeated until the requested
number of columns has been punched, after which an
Operation Complete interrupt occurs. At this time the
card subroutine checks for errors, informs the user
if an error occurred (CARDl only), and sets up to
terminate (CARDlonly) or retry the operation. The
character punched is the image of the leftmost 12 bits
in the word.
Feed . Initiates a card feed cycle. This advances all
cards in the machine to the next station, i. e. , a card
at the punch station advances to the stacker, a card at
the read station advances to the punch station, and a
card in the hopper advances to the read station. No
data is read or punched as a result of a feed operation
and no column interrupts occur.
When the card advance is complete, an Operation
Complete interrupt occurs. At this time the card
subroutine checks for errors, informs the user if an
error occurred (CARDl only), and sets up to termi-
nate (CARDl only) or retry the operation.
Stacker select. Selects stacker 2 for the card cur-
rently at the pvmch station. After the card passes
the punch station, it is directed to sta!cker 2.
I/O Area Parameter
The I/O area parameter is the label of the control
word that precedes the user's I/O area. The control
word consists of a word count that specifies the
number of columns of data to be read or punched,
always starting the count at column 1.
Error Parameter
I
CARDO. CARDO has no error parameter. If an error
is detected while an operation complete interrupt is
being processed, the subroutine loops (DM1 or C/PT
system) or WAITs at $PST4 (DM2) with interrupt
level 4 on, waiting for operator intervention. When
the condition has been corrected, the 1442 made
ready, and PROGRAM START pressed, the subroutine
retries the operation.
CARDl. CARDl has an error parameter. If an
error is detected, the user can request the subroutine
to terminate (clear subroutine-busy indicator and the
interrupt level) or to loop (DM1 or C/PT system) pr
WAIT at $PST4 (DM2) waiting for operator inter-
vention (interrupt level 4 on). (See Basic Calling
Sequence.)
Protection of Input Data
Since the CARD subroutines read data directly into
the user's I/O area, the user can manipulate the data
before the entire card has been processed. This pro-
cedure is inherently dangerous because, if an error
occurs, the data may be in error and error recovery
procedures will cause the operation to be tried again.
The exit via the error parameter is the only method
of informing the useflhat an error has occurred.
12
Therefore, do not manipulate data before the entire
card has been processed when using CARDO.
When using CARDl, the following precautions
should be taken:
• Do not store converted data back into the read-
in area.
• Do not take any irretrievable action based on the
data until the card has been read correctly; i. e. ,
be prepared to convert the data or perform the
calculations a second time.
• When data manipulation is complete, check the
user-assigned error indicator that is set when a
branch to the user-written error subroutine
occurs. The data conversion or calctdations
can then be reinitiated, if necessary.
Last C ard
Calling Sequence
A read or feed function requested after the last card
has been detected will eject that card and cause a
branch to the pre-operative error exit (location 29).
A punch function will pimch and then eject that card
with a normal exit. Therefore, to eject the last card
without causing a pre-operative error exit.request a
punch function with a word count of one and a blank in
the data field.
lob.1
■
f
T
Operandi & Rerwli
, . . .
L,l.fi,p
a^e.A.D.a, ,
ca.L.t , r.a.B.n .r,A/,P,/j.r
, . , .
/,h./^.{A^ .
T.aaff,
Tt/,n, .a^jtiF.A. ,f,a.iF^fi./i4.F,T.ip.e. .
. , , ,
F.e,if,n.K
, . , .
'. . .
1 , , .
1 . , .
f,e.R./i.ff\
o,r!, .
A-,*,
e'.e.T.o.ff^fiJ, .A,n.n.eif=:f:.s, . .
....
•i , ,
_ ,
, , . .
■, , ,
1 , . .
e,s,c,
T
E^fi.R.n,R
/?,P,T.tJ,ff:A/, T.n. ,r.,A,L,LiE,e,
, , , ,
. , , ,
,
TO.A.ff.
o.c. .
f. . , .
Win.ff.n. .cn.fj.n/.T
fi.s£,
, , , ,
_
_
_
_
L^
_^
, 1
where
a is or 1,
b iS) the I/O function digit,
f is the nimiber of colxmins to be read from the
card,
h is the length of the I/O area, h must be equal
to or greater than f.
The calling sequence parameters are described
in the following paragraphs.
Control Parameter
2501 CARD READER SUBROUTINES (READO AND
READl)
These card subroutines, available only with the
Monitor system, perform read and test functions
relative to the IBM 2501 card reader.
READO Subroutine. READO is shorter than READl,
provides no error parameter, and is the standard
subroutine for operation of the 2501 card reader.
On an error, READO branches to $PST4, and the
system WAITs for operator intervention. The last
card condition causes a branch to $PRET.
This parameter consists of four hexadecimal digits
as shown below:
I/O Function ■
Not Used
I/O Fimction
The I/O function digit specifies the particular opera-
tion to be performed on the 2501 Card Reader, The
functions, associated digital values, and required
parameters are listed and described below.
Fimction Digital Value Required Parameters*
Test
Read
Control
Control, I/O Area, Error**
READl Subroutine. READl is used for operation of
the 2501 card reader If a user error exit is required.
*Any parameter not required for a particular function must be
omitted.
**The error parameter is not required for READO .
Interrupt Service Subroutines 1 3
Test . Branches to LIBF+2 if the previous operation
has not been completed, to LIBF+3 if the previous
operation has been completed.
Read. Reads one card and transfers a specified
nimiber of columns of data to the user's input area.
The nimiber of columns read (1-80) is specified by
the user in the first location of the input area. The
subroutine initiates the read function and returns
control to the user's program.
When an operation complete interrupt occurs,
the card subroutine checks for errors. If an error
occurred, RE ADO exits to $PST4; READl informs
the user of the error and sets up to terminate or
retry the operation.
The data in the user's input area is In IBM Card
Code format; that is, each 12-bit coliomn image is
left-justified in one 16-bit word.
There is no separate feed function. However, a
feed can be obtained by a read function with a word
count of zero.
I/O Area Parameter
The I/O area parameter Is the label on the control
word that precedes the user's input area. The con-
trol word consists of a word count that specifies the
number of columns of data to be read, always start-
ing with column 1.
Last Card
A read function requested after the last card has been
fed from the hopper causes an exit to $PRET. When
the reader is made ready and the PROGRAM START
key pressed, the last card is read and fed into the
stacker.
1442 CARD PUNCH SUBROUTINES (PNCHO AND
PNCHl)
These card subroutines, available only with the
Monitor system, perform all I/O functions relative
to the IBM 1442-5 Card Pimch, that is, pxmch and
feed. These subroutines may also be used with the
1442-6 or 1442-7 Card Read Punch for punch and feed
functions.
PNCHO. The PNCHO subroutine is shorter than
PNCHl, provides no error parameter, and is the
standard subroutine for operation of the 1442 card
pimch. On an error, PNCHO branches to $PST4,
and the system WAITs for operator intervention.
The last card condition causes a branch to $PRET.
PNCHl. PNCHl can be used for operation of the
1442 card pimch if a user error exit is desired.
I
Calling Sequence
Error Parameter
READO. READO has no error parameter. If an error
is detected while an operation complete interrupt is
being processed, the subroutine branches to $PST4,
with interrupt level 4 on, waiting for operator in-
tervention. When the condition has been corrected,
the 2501 made ready, and PROGRAM START pressed,
the subroutine attempts the operation again.
READl. READl has an error parameter. If an
error is detected, the user can request the subroutine
to terminate (that is, to clear the subroutine's busy
indicator and turn off the interrupt level) or retry.
Prior to a retry, the subroutine checks to see if the
unit is ready. If the imit is not ready, the subroutine
branches to $PST4 with interrupt level 4 on, waiting
for operator intervention.
u.t».
'
'
Dp.n>ndt i. R«mort«
{ r^.ff
f
D.C..
T,0./t.ff.
T./,o. .Ji.p,F,a, .p,a,e.aM.P,T.ff,B. .
or.
f,if.ti.n,ti
/r,ff.p./),ff. ,pa./r.j9.M,r.r.i^.a. .
. , . ,
, ^
F.R.K.r>,e
n,r,
• i
,
. . , .
, 1, . ,
. . , ,
•. ,
, , ^ ,
Bl&j.Sj
J./,0, .Ji.e,F,A
. . , ,
_
. .
_
L_l
^
UJ
where
a is or 1,
b is the I/O function digit,
f is the nimiber of columns to be piinched into
the card,
14
h is the length of the I/O area, h must be equal
to or greater than f.
The calling sequence parameters are described in
the following paragraphs.
Control Parameter
This parameter consists of four hexadecimal digits
as shown below:
I/O Function -
Not Used
I/O Function
The I/O function digit specifies the particular opera-
tion to be performed on the 1442 Card Punch. The
functions, associated digital values, and required
parameters are listed and described below.
Fimction Digital Value Required Parameters*
Test
Punch
Feed
Control
Control I/O Area, Error**
Control, Error**
*Any parameter not required for a particular function must be
omitted.
**The error parameter is not required for PNCHO.
Test. Branches to LIBF+2 if the previous operation
has not been completed, to LIBF+3 if the previous
operation has been completed.
Punch. Punches into one card the number of columns
of data specified by the word count found at the begin-
ning of the user's output area. As each column comes
imder the punch dies, a column interrupt occurs, the
subroutine transfers a word from the user's output
area to the punch, and then returns control to the
user's program. The character punched is the image
of the leftmost 12 bits in the word.
This sequence is repeated until the requested
number of columns has been punched, after which an
Operation Complete interrupt occurs. At this time
the card subroutine checks for errors. If an error
occurred, PNCHO exits to $PST4; PNCHl informs
the user of the error and sets up to terminate or
retry the operation.
Feed. Initiates a card feed cycle. This function ad-
vances all cards in the machine to the next station;
that is, a card at the punch station advances to the
stacker, a card at the read station advances to the
pimch station, and a card in the hopper advances to
the read station. No data is pimched as a result of
a feed function and no column interrupts occur.
When the card advance is complete, an operation
complete interrupt occmrs. At this time the card sub-
routine checks for errors. If an error occurred,
PNCHO exits to $PST4; PNCHl informs the user of
the error and sets up to terminate or retry the
operation.
I/O Area Parameter
The I/O area parameter is the label of the control
word that precedes the user's output area. The con-
trol word consists of a word count that specifies the
number of colimins of data to be punched, always
starting with coliunn 1.
Error Parameter
PNCHO. PNCHO has no error parameter. If an
error is detected while an operation complete inter-
rupt is being processed, the subroutine branches
to $PST4 with Interrupt level 4 on, waiting for
operator intervention. When the condition has been
corrected, the 1442 made ready, and PROGRAM
START pressed, the subroutine retries the operation.
PNCHl . PNCHl has an error parameter. If an
error is detected, the user can request the sub-
routine to terminate (that is, to clear the subroutine
busy indicator and turn off the interrupt level) or
retry. Prior to a retry, the subroutine checks to
see if the unit is ready. If the unit is not ready, the
subroutine branches to $PST4, with interrupt level 4
on, waiting for operator intervention.
j DISK SUBROUTINES (DM1 AND C/PT SYSTEM)
The disk subroutines perform all reading and writing
of data relative to disk storage. This includes the
major functions: seek, read, and write, in con-
junction with readback check, file protection, and
I defective cylinder handling.
DISKO. The DISKO subroutine is the shortest version
of the disk subroutine and can be used if not more
than 320 words are to be read or written at one time.
DISKl. The DISKl version is the standard subroutine
I for the disk and allows more than 320 words to be
read or written; however, a full disk revolution
I might occur between sectors. DISKl requires more
core storage than DISKO.
Interrupt Service Subroutines 15
DISKN. The DISKN subroutine minimizes extra disk
revolutions in transferring more than 320 words.
I The DISKN subroutine requires more core storage
than DlSKl,
I The major difference between DISKl and DISKN
is the ability of DISKN to read or write consecutive
sectors on the disk without taking an extra revolution.
If a full sector is written, the time in which the I/O
command must be given varies. DISKN is program-
med so that it can "make" the sector gap the majority
of the time; DISKl approximately 50 percent of the
time.
All three disk subroutines have the same error
handling procedures. In DM1, the disk subroutines
are part of the Supervisor and as such are not stored
in the Subroutine Library. Consequently, these
subroutines have no LET entries.
Sector Nimibering and File Protection
In the interest of providing disk features permitting
versatile and orderly control of disk operations,
programming conventions have been adopted con-
cerning sector numbering, file protection, and
defective cylinder handling. Successful use of the
disk subroutines can be expected only if user program^
are built within the framework of these conventions.
The primary concern behind these conventions is
the safety of data recorded on the disk. To this end,
the file -protection scheme plays a major role, but
does so in a manner that is dependent upon the
sector-numbering technique. The latter contributes
to data safety by allowing the disk subroutine to
verify the correct positioning of the access arm
before it actually performs a write operation. This
verification requires that sector identification be
prerecorded on each sector and that subsequent
writing to the disk be done in a manner that preserves
the existing identification. The disk subroutines have
been organized to comply with these requirements.
Sector Numbering
The details of the numbering scheme are as foUows:
each disk sector is assigned an address from the
sequence 0, 1 1623, corresponding to the
sector position in the ascending sequence of cylinder
and sector numbers from cylinder (outermost)
sector 0, through cylinder 202 (innermost) sector 7.
The user can address cylinders throxigh 199. The
remaining three cylinders are reserved for defective-
cylinder handling.
Each cylinder contains eight sectors and each
sector contains 321 words. The sector address is
recorded in the first word of each sector and occupies
the rightmost eleven bit positions. Of these eleven
positions, the three low-order positions identify
the sector (0-7) within the cylinder. Utilization of
this first word for identification purposes reduces
the per sector availability of data words to 320;
therefore, transmission of full sectors of data is
performed in imits of this amount. The sector
addresses must be initially recorded on the disk by
the user and are thereafter rewritten by the disk
subroutines as each sector is written (see Disk
Initialization) .
File Protection
File protection is provided to guard against the inad-
vertent destruction of previously recorded data. By
having the write functions (except write immediate)
imiformly test for the file-protect status of sectors
that tliey are about to write, this control can be
achieved.
This convention is implemented by assigning a
file-protected area to each disk. The address of
the first unprotected sector (0000-1623) on each disk
is stored within the disk subroutine (C/PT) or in
COMMA (DM1). Every sector below this one is file-
protected, i. e. , no writing is permitted below this
address which in DM1 is the address of the first
sector of Working Storage.
Defective Cylinder Handling
A defective sector is one in which, after ten retries,
a successful writing operation cannot be completed.
A cylinder havii^ one or more defective sectors is
defined as a defective cylinder. The disk subrou-
tines can operate when as many as three cylinders
are defective.
Since there are 203 cylinders on each disk, the
subroutine can "overflow" the normally used 200
cylinders when defective cylinders are encountered
(see Effective Address Calculation) .
The address of each defective cylinder is stored
within the disk subroutines by the user (C/PT) or
both on sector and in COMMA (DM1). (See Disk
Initialization .)
In the C/PT system, if a cylinder becomes de-
fective during an operation, the user can move the
data in that cylinder and each higher -addressed
cylinder into the next higher-addressed cylinders.
Then the address of the new defective cylinder can
be stored in DISKx +16, +17, or +18 and normal
operation continued. Thus the user should not store
the new defective cylinder address in DISKx and then
continue normally because the effective sector address
computation then yields a sector address eight higher
than is desired (see Effective Address Calculation) .
If there are no defective cylinders, all three words
in the defective cylinder table contain /0658. If, for
example, only sector 0009 is defective, the table
would contain /0008 (cylinder 1), /0658, and /0658.
I
16
Calling Sequence
Idbel
Opcrarion
F
'
Opcrrxd. & RBwki
r?ir
1
....
1
0\C
Jih-.«, ,
,j?if,T,u,f iM ,Ain,Diffifi',s^<:, , 1 .
,
,
■ . . .
fliT
r
T
f.i?.ie.(-),jC
.R\£i7,Uifi,tJi iT,0. .r./l.t J ,e,ff. .
, , . .
J
, , ,
, , . 1
'
.
,
T,O.A.ft.
p.r
^. . . .
1
ifJxO.en. .rr.rt./;.A/,T.
p.r
9. , , ,
1
SkSkSj
h» . . >
,r./,n, ,A.f^,/:,A. , , . , <
. . , .
I I 1 1
,
where
a is 0, 1, or N.
b is the I/O function digit,
d is the Seek option digit,
e is the Displacement option digit,
f is the number of words to be transferred to or
from the disk,
g is the sector address at which the transfer is
to begin,
h is the length of the I/O area, h must be equal
to or greater than f.
The calling sequence parameters are described in the
following paragraphs .
Control Parameter
This parameter consists of four hexadecimal digits
as shown below:
I/O Function-
Not Used
Seek Option.
Displacement Option .
I/O Function
The I/O function digit specifies the operation to be
performed on Disk Storage . The functions , their
Function
Digital Value
Test
Read
1
Write witiiout RBC
2
Write with RBC
3
Mtite Immediate
4
Seek
5
associated digital value , and the required param-
eters are listed and described below.
Required Parameteis*
Control, I/O Area
Control, I/O Area, Error
Control, I/O Area, Error
Control, I/O Area, Error
Control, I/O Area
Control, I/O Area, Error
*Any parameter not required for a particular function must be
omitted.
Test. Branches to LIBF +3 if the previous operation
has not been completed, to LIBF +4 if the previous
operation has been completed.
NOTE: This function requires two parameters.
Read . Positions the access arm and reads data into
the user's I/O area until the specified number of
words has been transmitted. Although sector
identification words are read and checked for agree-
ment with expected values, they are neither trans-
mitted to the I/O data area nor counted in the nimiber
of words transferred.
If, during the reading of a sector, a read check
occurs, up to ten retries are attempted. If the error
persists, the function is temporarily discontinued,
an error code is placed in the Accumulator, the
address of the faulty sector is placed in the Extension,
and an exit is made to the error subroutine specified
by the error parameter.
Upon return from the error subroutine, that
sector operation is reinitiated or the function is
terminated, depending on whether the Accumulator
is non-zero or zero.
Write With Readback Check. This fimction first
checks whether or not the specified sector address
is in a file-protected area. If it is, the subroutine
places the appropriate error code in the Accumulator
and exits to location 28.
If the specified sector address is not in a file-
protected area, the subroutine positions the access
arm and writes the contents of the indicated l/O
data area into consecutive disk sectors . Writing
Interrupt Service Subroutines 1 7
begins at the designated sector and continues until the
specified number of words has been transmitted.
A readback check is performed on the data written.
If any errors are detected, the operation is
retried up to ten times. If the function still cannot be
accomplished, an appropriate error code is placed in
the Accimiulator, the address of the faulty sector
is placed in the extension, and an exit is made to the
error subroutine designated in the Error parameter.
Upon return from this error subroutine, the
same sector operation is reinitiated or the function is
terminated depending upon whether the contents of the
Accumulator is non-zero or zero.
As each sector is written, the subroutine supplies
the sector identification word. The identification word
for the first sector is obtained from the I/O area,
although it and subsequently generated identification
words are not included in the word count. Writing
less than 320 words clears the remainder of the
sector to zero.
Write Without Readback Check. This function is the
same as the function described above except that no
readback check is performed.
Write Immediate. Writes data with no attempt to
position the access arm, check for file-protect
status , or check for errors . Writing begins at the
sector number specified by the rightmost three bits
of the sector address. This fimction is provided to
fulfill the need for more rapid writing to the disk
than is provided in the previously described write
functions . Primary application will be found in the
"streaming" of data to the disk for temporary bulk
storage .
As each sector is written, the subroutine
supplies the sector identification word. The identi-
fication word for the first sector is obtained from the
I/O area , although it and subsequently generated
identification words are not included in the word
count. Writing less than 320 words clears the re-
mainder of the sector to zero.
Seek. Initiates a seek as specified by the seek option
digit. If any errors are detected, the operation is
retried up to ten times.
Seek Option
If zero, a seek is executed to the cylinder whose sec-
tor address is in the disk I/O area control word; if
non-zero, a seek is executed to the next cylinder
toward the center of the disk, regardless of the sector
address in the disk I/O area control word. This option
is valid only when the seek function is specified.
The seek function requires that the user set up
the normal I/O area parameter (see I/O Area Pa-
rameter ) even thou^ only the sector address in the
I/O area is used. The I/O area control (first) word
is ignored.
Displacement Option
If zero, the sector address word contains the abso-
lute sector identification; if non-zero, the file pro-
tect address for the specified disk is added to bits
4-15 of the sector address word to generate the
effective sector identification. The file-protect
address is the sector identification of the first unpro-
tected sector.
I/O Area Parameter
The I/O area parameter is the label of the first of
two control words which precede the user's I/O area.
The first word contains a coimt of the number of
data words that are to be transmitted during the disk
operation. If the DISKl or DISKN subroutine is used,
this coimt need not be limited by sector or cylinder
size, since these subroutines cross sector and
cylinder boundaries, if necessary, in order to process
the specified number of words. However, if the
DISKO subroutine is used, the count is limited to 320.
The second word contains the sector address
where reading or writing is to begin. Bits 0-3 are
used for device identification and must be zero.
Bits 4-15 specify the sector address. Following the
two control words is the user's data area.
Error Parameter
Refer to the section, Basic Calling Sequence.
Important Locations
I
The relative locations within the DISKO, DISKl, and
DISKN subroutines are defined as follows :
DISKx +0 -
entry point from calling transfer vector when
UBF DISKx is executed.
+2 -
loader stores address of first location (in the
calling transfer vector) assigned to DISKx
+4 -
entry point from ILS handling Disk Storage
interrupts.
+7 -
area code for disk storage.
+8 -
zero
+9 -
zero
+10 -
cylinder identification (bits 4-12) of the cylinder
currently under the disk read/write heads (loaded
as 4202)
+11 -
unused
18
+12 - reserved
+13 - sectx>T address (bits 4-15) of the first non-file-
protected sector for disk storage (loaded as 0)
+14 - reserved
+15 - reserved
+16 - sector address of the first defective cylinder for
disk storage (loaded as +1624)
+1 7 - sector address of the second defective cylinder
for disk storage (loaded as +1624)
+18 - sector address of the liiird defective cylinder
for disk storage (loaded as +1624)
In the DM1 system, woids DISKx +10 through DISKx +18
are stored in COMMA.not in DISKx.
Effective Address Calculation
An effective disk address is calculated as follows:
1. Start with the user- requested sector address
(found in the sector address word of the l/O area).
2. If the displacement option (found in the control
parameter ) is non-zero, add the sector address
of the first non-file-protected sector (found in
DISKx +13 in C/PT System).
NOTE : This starting address will cause a pre-
operative error exit to location 41 if over 1599.
3. If the resulting address is equal to or greater
than the sector address of the first defective
cylinder (found in DISKx +16 in the C/PT
System), add 8.
4. If the resulting address is equal to or greater
than that of the second defective cylinder (found
in DISKx +17 in the C/PT System), add 8 more.
5. If the resulting address is equal to or greater
than that of the third defective cylinder (found
in DlSKx +18 in the C/PT System), add 8 more.
The address obtained from steps 1-5 is the
effective sector address.
Disk Initialization
I In the C/PT System, it is the user's responsibility
to correctly load DISKx +13, +16, +17, and +18 at
execution time and irfienever a new disk is initialized.
The following programs can be used to perform these
fimctions.
Disk Pack Initialization Routine (DPIR). The functions
of this program are to write sector addresses
on a disk, to detect any defective cylinders, and to
I store defective cylinder information, file protect
addresses, and a disk label in sector of the disk.
The operating procedures for DPIR are located in
the publication IBM 1130 Card/Paper Tape Pro-
gramming System Operator's Guide (Form C26-3629)
I
and the IBM 1130 Disk Monitor System Reference
Manual (Form C26-3750).
Set Pack Initialization Routine for C/PT System
(SPIRO, SPIRl, andSPIRN). The function of these
subroutines is to store defective cylinder information
and the file protect address from sector of the disk
into the appropriate DISKx subroutine.
If the above subroutines are not used, the
starting address of the DISKx routine can be loaded
into an index register for easy use in reaching the
specified locations:
Ufaal
□ pcnxion
f
'
Opvondi t. RanaHu
.£,x,p,A.N.n. ,*t.rt.n,T,P.T,F,i?. .T./j.r/j, ,i,a, , , .
.fl.T.r.^. .wT.T.w. .<i.T.G.a
.a,n,n. ,t,«, ,t,w, ,>q,n.n.ff.f.s..«r
Dtg^tAz .
.a.nn. .r.n,NS.T.J3<N,TS, ,tu^. .p.FA.r^u. , , , ■
'
^.T.O,
1 J7.a
a.+.i>
tlfi
.)f,(?,?.-,/5,T.<:.«',*-.
,
,
,
, _
.^,n.u.e.r.r,'=. t .t,h.f. .n.r.t.Kn
.
,
, , . , ,
,
,
, ,
c+.ni ,
n.r. .
rf^
1 .^Qitfig. ^AS^ .rJidiLl^Nifi, iT.Vi ,(r.i',X,R,3,->t
The SPIR is a special-purpose utility subroutine.
It is not called by LIBF as are the other disk sub-
routines described in this section. SPIRO must be
used if DISKO is called, SPIRl if DISKl is called,
or SPIRN if DISKN is called.
NOTE: In no case should SPIR be vised with the
DM1 or DM2 S3rstem.
The SPIR reads sectqr 0000 from the disk and
stores the first four words into the disk ISS that is
in core. Therefore, the SPIR subroutine should be
called before any calls are made to the disk ISS.
The calling sequence for SPIR is as follows:
CALL
DC
SPIRx
/OOOO
The four words read from sector 0000 are de-
scribed under Disk Pack Initialization Routine in
the publication IBM 1130 Card/Paper Tape Program-
ming System Operator's Guide (Form C26-3629)
and in the IBM 1130 Disk Monitor System Reference
Manual (Form C26-3750).
DISK SUBROUTINES (DM2 SYSTEM)
All disk subroutines used by the Monitor system (in-
cluding DISKZ) reside in the IBM System area on the
monitor disk. The disk subroutines are stored in a
special core image format in this area rather than in
the System Library, since the Monitor system always
requires a disk l/O subroutine. The required version
lutenupt Service Subroutines 19
is fetched by the Core Image Loader just prior to
execution.
The disk subroutines used with the Monitor
system are DISKZ, DISKl, and DISKN.
DISKZ. DISKZ is intended for use in a FOBTRAN
environment in which FORTRAN I/O Is used. DISKZ
makes no pre-operative parameter checks and offers
no file protection. It is the shortest of the three disk
I/O subroutines and requires a special calling
sequence. (See DISKZ -Disk I/O Subroutine. )
DISKl. DISKl is intended for use by Assembler
language programs in which the core storage re-
quirement is of more importance than the execution
time. DISKl is longer than DISKZ but is the shorter
of the two subroutines intended for use in Assembler
language programs (DISKl and DISKN). However,
DISKl does not minimize extra disk revolutions when
transferring more than 320 words.
DISKN. DISKN minimizes extra disk revolutions in
transferring more than 320 words. It provides all
the functions provided by DISKl as well as the ability
to operate all five drives simultaneously.
NOTE: Both DISKl and DISKN can be specified on
the Monitor XEQ record for use with FORTRAN
programs. However, they offer no real advantage
over DISKZ if they are called by the disk FORTRAN
I/O subroutine.
One of the major differences among the disk sub-
routines is the ability to read or write consecutive
sectors on the disk without taking extra revolutions.
If full sectors are written, the time in which the I/O
command must be given varies. DISKN is program-
med so that transfers of more than 320 words are
made with a minimum number of extra revolutions
occurring between sectors.
DISKl and DISKN have the same error handling
procedxires.
NOTE: Id the DM2 system, the disk I/O subroutines
are not stored in the System Library; consequently,
they do not have LET entries.
Sector Numbering and File Protection
In the Interest of providing disk features permitting
versatile and orderly control of disk operations.
programming conventions have been adopted concern-
ing sector numbering, file protection, and defective
sector handling. Successful use of disk I/O sub-
routines can be expected only if user programs are
built within the framework of these conventions.
The primary concern behind the conventions is the
safety of data recorded on the disk. To this end,
the file protection scheme plays a major role, but
does so in a manner that is dependent upon the
sector-numbering technique. The latter contributes
to data safety by allowing the disk I/O subroutine to
verify the correct positioning of the access arm
before it actually performs a write operation. This
verification requires that sector identification be
prerecorded on each sector and that subsequent
writing on the disk be done in a manner that pre-
serves the existing identification. The disk I/O
subroutines support these requirements.
Sector Numbering
Each disk sector is assigned an address from the
sequence 0, 1, . . . , 1623, corresponding to the
sector position in the ascending sequence of cylinder
and sector mmibers from cylinder 0, sector
(outermost), through cylinder 202, sector 7
(innermost). The user can address cylinders
through 199. The remaining three cylinders are
reserved for defective cylinder handling.
Each cylinder contains eight sectors and each
sector contains 321 words, counting the sector
address. The sector address is recorded tu the first
word of each sector and occupies the rightmost
eleven bit positions. Of these eleven positions, the
three low-order positions identify the sector (0-7)
within the cylinder. Utilization of this first word
for identification purposes reduces the per sector
availability of data words to 320; therefore, trans-
mission of full sectors of data is performed in
increments of 320 words.
Sector addresses must be initially recorded on
the disk by the user (via DISC or DCIP: see
1130 Monitor Programming and Operator's Guide
(Form 026-3717)) and are thereafter rewritten by
the disk I/O subroutines as each sector is written.
NOTE: Although not actually written on the disk,
the logical drive code must be part of the sector
address parameter (bits 1-3) which is stored in the
second word of the I/O area. Bit must always
be zero.
I
20
File Protection
where
File protection is provided to prohibit the inadvertent
destruction of previously recorded data. This con-
trol is achieved by having all write functions (except
write immediate) test for the file-protection status
of sectors they are about to write.
Each cartridge has a file-protect address in
COMMA. This address is the address of the first
unprotected sector, i. e. , the address of the begin-
ning of Working Storage. Every sector, from sector
up to the sector address maintained in COMMA, is
file-protected. The initial assignment of the file-
protect address is performed by the disk initial-
ization program DCIP or DISC (see 1130 Monitor
Programming and Operator's Guide (Form C26-
3717)). Subsequent updating of the file-protect
address is performed by the Monitor programs.
a is 1 or N. Note that LIBF DISKO is equivalent
to LIBF DISKl,
b is the I/O function digit,
d is the Seek option digit,
e is the Displacement option digit,
f is the number of words to be transferred to or
from the disk,
g is the sector address, including the logical
drive code, at which the transfer is to begin,
h is the length of the I/O area, h must be
equal to or greater than f.
Control Parameter
Defective Sector Handling
A defective sector is a sector on which a read or
write function cannot be successfully completed during
initialization of the cartridge. A cylinder having one
or more defective sectors is defined as a defective
cylinder. The disk I/O subroutines can accommodate
as many as three defective cylinders per cartridge.
Since there are 203 cylinders on each disk, the disk
I/O subroutines can "overflow" the 200 cylinders
normally used when defective cylinders are en-
countered (see Effective Address Calculation) .
Calling Sequence
Ulbsl
OpentloT. F
T Op.tand.4ft«nork.
o.r.«:,A-./i r.Al.l. .mr.T.*'. .T./.n. , , . .
1
1 1 1
1
'' '—'—^
n.r. ,
r.n.a.e
T./.n. .a,ff.^.a, .p.A./f,aMe.T,£,ff
_L
F.a.fi.n,p, ,f>.a.a.aM,P.T,E.R, , .
,
1 1 1
1 1 (
1
, . . .
^
1
jA.
1
' ' ' '
L_
' '
^ ,
^
1_X
r fT^f^.ff.n.B, f . . .
ff.^.T.ll,ffM, ,T.a .C,A,L,L,£,/?t ,
1
.
1
1 t 1
""
,
1
_J_1— 1_
1_
,
, ,
_ „
f
M.n.ff.n, .r.n.i/.fJ.T. .......
1
.s,F,r.Tn<p. ,/j,yrxn/?.S",=r..i. , i ,
J
' ' '"'•
T./.n. ,fi,ff,t^.a ,
,
, . ,
This parameter consists of four hexadecimal digits,
shown below:
12 3 4
f
I/O Function
Logical Drive Code
(DISKN Test Function Only)
Seek Option
1 f ■■
Displacement Option ^
I/O Function
The I/O function digit specifies the operation to be
performed on disk storage. The functions, their
associated digital value, and the required parame-
ters are listed and described below.
Function Digital Value
Required Parameters*
Test
Control, I/O Area
Read
1
Control, I/O Area, Error
Write without RBC
2
Control, I/O Area, Error
Write with RBC
3
Control, I/O Area, Error
Write Immediate
4
Control, I/O Area
Seek
5
Control, I/O Area, Error
*Any parameter not required for a particular function must be
omitted.
Interrupt Service Subroutines 21
Test . Branches to LIBF+3 if the previous operation
on the drive has not been completed, to LIBF+4 if
the previous operation has been completed.
NOTE : This function requires the I/O area parameter
even though it is not used.
As each sector is written, the subroutine
supplies the sector identification word. The identi-
fication word for the first sector is obtained from
the I/O area, although it and subsequently generated
identification words are not included in the word
coxmt.
Read. Positions the access arm and reads data into
the user's I/O area until the specified number of
words has been transmitted. Although sector
identification words are read and checked for agree-
ment with expected values, they are neither trans-
mitted to the I/O area nor counted in the number of
words transferred.
If, during the reading of a sector, a read check
occurs, up to 16 retries are attempted. If the error
persists, the function is temporarily discontinued,
an error code is placed in the Accimaulator, the ad-
dress of the faulty sector is placed in the Extension,
and an exit is made to the error subroutine specified
by the error parameter.
Upon return from the error subroutine, the opera-
tion is either reinitiated or terminated, depending on
whether the Accumulator is non-zero or zero,
respectively.
Write With Readback Check. Checks whether or not
the specified sector address is in a file -protected
area. If it is, the subroutine places the appropriate
error code in the Accumulator and exits to $PRET.
If the specified sector address is not in a file-
protected area, the subroutine positions the access
arm and writes the contents of the indicated I/O area
onto the disk. Writing begins at the designated
sector and continues imtil the specified number of
words have been transmitted. A readback check is
performed on the data written.
If a partial sector (less than 320 words) is
written, the remaining words of the sector are auto-
matically set to zero.
If any errors are detected, the operation is re-
tried up to 16 times. If the function cannot be
accomplished, an appropriate error code is placed
in the Accumulator, the address of the faulty sector
is placed in the Extension, and an exit is made to the
error subroutine designated by the error parameter.
Upon return from this error subroutine, the
operation is either reinitiated or terminated, depend-
ing upon whether the Accumulator is non-zero, or
zero, respectively.
Write Without Readback Check. Functions the same
as Write With Readback Check except that no read-
back check is performed.
Write Immediate. Writes data with no attempt to
position the access arm, check for file-protect
status, or check for errors. Writing begins at the
sector number specified in the user's I/O area.
This function provides more rapid writing to the disk
than is provided in the previously described Write
functions; it provides, for example, the ability to
"stream" data to the disk for temporary bulk storage
or to write addresses in Working Storage (see
ADRWS) .
If a partial sector (less than 320 words) is
written, the remaining words of the sector are auto-
matically set to zero.
As each sector is written, the subroutine
supplies the sector identification word. The identi-
fication word for the first sector is obtained from
the I/O area, although it and subsequently generated
identification words are not included in the word
count.
Seek. Initiates a seek as specified by the seek
option digit. If any errors are detected, the opera-
tion is retried up to 16 times.
The seek function requires that the user set up
the normal I/O area parameters (see l/O Area
Parameter) even though only the sector address in
the I/O area is used.
Logical Drive Code
Digit 2 defines the logical drive code (0, 1, 2, 3, or
4). This digit is used only with the DISKN test
function.
Seek Option
If digit 3 of the control parameter is zero, a seek is
executed to the cylinder whose sector address is in
the I/O area; if non-zero, a seek is executed to the
I
22
next non-defective cylinder toward the center,
regardless of the sector address in the I/O area.
This seek to the next non-defective cylinder must be
taken into consideration when planning for the
"streaming" of data.
This option is valid only when the seek function
is specified.
Displacement Option
If digit 4 of the control parameter is zero, the sector
address word contains the absolute sector identifica-
tion; if non-zero, the file-protect address for the
specified cartridge is added to bits 4-15 of the sector
address word to generate the effective sector identi-
fication. The file-protect address is the sector
identification of the first unprotected sector, i. e. ,
the address of the first sector of Working Storage.
I/O Area Parameter
The I/O area parameter is the label of the first of two
control words which precede the user's I/O area.
The first word contains the nvunber of data words
that are to be transferred during the disk operation.
This number need not be limited by sector or cylinder
size, since the subroutines cross sector and cylinder
boimdaries, if necessary, in order to transmit the
specified nmnber of words.
The second word contains the sector address at
which reading or writing is to begin. Bit must be
zero. Bits 1-3 are the device identification (drive
code) and must be 0, 1, 2, 3, or 4. Bits 4-15
specify the sector address. The user's I/O area
follows the two control words.
1. Obtain the sector address found in the sector
address word of the I/O area.
2. If the displacement option digit in the control
parameter Is non-zero, add the sector address
of the first sector that is not file-protected.
NOTE: This address causes an exit to $PRET
if it exceeds 1599.
3. If the resultant address is equal to or greater
than the sector address of the first defective
cylinder, add 8.
4. If the resultant address is equal to or greater
than that of the second defective cylinder, add
8 more.
5. If the resultant address is equal to or greater
than that of the third defective cylinder, add
8 more.
The address obtained from steps 1-5 is the
effective sector address. Defective cylinders are
handled in this manner for all operations, including
seek and write immediate.
Disk Initialization
Before the Monitor system is stored on a cartridge,
the Disk Cartridge Initialization Program (DCIP)
must be executed. This program writes sector
addresses on the disk cartridge, detects any
defective cylinders, stores defective cylinder in-
formation and a cartric^e ID in sector of cylinder
0, and initializes DOOM. The operating procedure
for DCIP is listed in the publication IBM 1130 Disk
Monitor System, Vers ton 2, Programming and
Operator's Guide (Form C26-3717).
Error Parameter
If an error is detected, the user can request the sub-
routine to terminate (that is, to clear the subroutine's
busy indicator and turn off interrupt level 2) or to
branch to $PST2, with interrupt level 2 on, waiting
for operator intervention.
Effective Address Calculation
An effective disk address is calculated as follows:
DBKZ - DISK INPUT/OUTPUT SUBROUTINE
The DISKZ subroutine offers no file protection, no
pre-operative parameter checks, no write immediate
function, and no write without readback check function.
It is intended for use by the Monitor programs and
by FORTRAN programs in which disk FORTRAN I/O
is used. Although DISKZ has many of the characteris-
tics of an ISS, it is assembled as though it was a
mainline and is stored in a special Core Image format
in the System Device Subroutine area.
Interrupt Service Subroutines 23
Calling Sequence
Ijiml
Opvolton
'
'
Op««d. A lt«ak>
i.rjs.r. .11.. .ita.A.n. .x'.a.p.njiAf^.T.f:./!^';. .t.u. .A.r.r: .e.x.r.
1
'
'. , ,
. . , .
• . . .
, , , , , ,
,
SjSjSJ-
f
^
,,.,.,
o.r. .
Tinji.e. . . ,
I . . ,
•.
1
F
^
, _ _ ^
Ifc
, ,)M,n,a,n, .i£Z\n,fi./j.T.
or.. .
e
, ^tte.c.T.n.K', .a.n,n.a,F,*:f:
aiS*Sj„
i
. , . ,
• . , ,
^
•
D.gJM
e.o.u
/Mf.i ; ;
__
_i
.
where
a is the I/O function digit: indicates a read,
1 a write.
b is the number of words to be transferred to
or from the disk
c is the sector address at which the transfer is
to begin,
d is the length of the I/O area, d must be equal
to or greater than b.
The word count (first word of the buffer) must
be non-negative and must be on an even core boundary.
The sector address must be the second word of the
buffer. The drive code (0, 1, 2, 3, or 4) is in bits
1-3 of the sector address. Bit zero is always zero.
A word coimt of zero indicates a seek to the
cylinder denoted in the sector address. File pro-
tection is not provided. If the access arm is not
positioned at the cylinder addressed, DISKZ seeks
to that cylinder before performing the requested
function. A read follows each seek to verify that
the seek was successful. No buffer is required
for this read.
Buffer Size. Maximum of 320 words.
Operation. DISKZ performs read, seek, and write
with readback check functions. Each function returns
control to the user after it has been initiated. To
determine the completion of a disk operation, the
user may test $DBSY (in COMMA) until it is cleared
to zero. DISKZ itself tests this word before initiating
an operation. Following a write, this subroutine
performs a readback check on the data just written.
If it detects an error, it reexecutes the write.
Similarly, if a sector is not located or if an error
is detected during a read, DISKZ repeats the opera-
tion. All operations are attempted 16 times before
DISKZ indicates an unrecoverable error.
If a partial sector (less than 320 words) is
written, the remaining words of the sector are set
to zero.
I
Subroutines Required.
required by DISKZ.
No other subroutines are
NOTE: It is important to realize that the DISKZ
subroutine is designed to operate in an error-free
environment; it is not recommended for general
usage. The user should therefore use DISKl or
DISKN whenever possible.
1132 PRINTER SUBROUTINE (PRNTl)
The printer subroutine PRNTl handles all print and
carriage control functions relative to the IBM 1132
Printer (see also PRNT2). Only one line of data can
be printed, or one carri^e operation executed, with
each call to the pruiter subroutine. The data in the
output area must be in EBCDIC form, packed two
characters per computer word. (See Data Codes.)
Calling Sequence
U.b.1
Dp.„rfr=„
^
^
Op^and. & Knori..
n.r.
,__,COiytf.r.ff,OiZ-, ,PiA,ff^,liA£,T,£,/?. , , ,
o,r,
r./.rt, .a.P.£,A. ,P.AiRMM,F.,T.P,R, , ,
n.c..
f=,e.fr.o,e
....
....
1
,
• .
1 . , .
/^.«',>?,/J,*
n,c.,
Xi-.«, .
e,F,T.lll?,rJ,. ,A,D,l>JPt£S,Si
^ , ^
ffiT.r
T
,_
• . , .
.lit
• .
,,,,,,,,,,
nr..
f . . , ,
Mn.tf.n, .r./T/A>v.r.
aSj&j
h. . , .
^
24
where
b is the I/O function digit,
c is the "immediate" carriage operation digit,
d is the "after-print" carriage operation digit,
f is the number of words to be printed on the
1132 Printer,
h is the length of the I/O area, h must be equal
to or greater than f.
The calling sequence parameters are described in
the following paragraphs.
Control Parameter
This parameter consists of four hexadecimal digits
which are used as shown below.
I/O Function -
Carriage Control -
Not Used
I/O Function
The I/O function digit specifies the operation to be
performed on an 1132 Printer. The functions, their
associated digital values, and the required parameters
are listed and described below.
Function
Digital Value
Required
Parameters*
Test
Control
Print
2
Control,
I/O Area, Error
Control Carriage
3
Control
Print Numeric
4
Control,
I/O Area, Error
*Any parameter not required for a particular function must be
omitted.
Test . Branches to LIBF+2 if the previous operation
has not been completed, to LIBF+3 if the previous
operation has been completed.
Print. Prints characters from the user's I/O area,
checking for channel 9 and 12 indications. If either
of these conditions is detected, the subroutine
branches to the user's error subroutine after the
line of data has been printed (see Appendix B for
error codes). Upon return from this error sub-
routine, a skip to channel 1 is initiated or the
function is terminated, depending upon whether the
Accumulator is non-zero or zero.
Control Carriage. Controls the carriage as speci-
fied by the carriage control digits listed in Table 3.
Table 3 . Carriage Control Operations
Digif
*2: Immediate Carriage Operations
Prinf Functtons
Not Used
Control Function
1 -
• Immediate Skip To Channel 1
2-
• Immediate Skip To Channel 2
3-
■ Immediate Skip To Channel 3
4-
Immediate Skip To Channel 4
5-
■ Immediate Skip To Channel 5
6-
Immediate Skip To Channel 6
9-
Immediate Skip To Channel 9
C-
Immediate Skip To Channel 12
D-
Immediate Space Of 1
E-
Immediate Space Of 2
F-
Immediate Space Of 3
Digit
*3: After-Print Carriage Operations
Print Functions
0-
Space One Line After Printing
1 -
Suppress Space After Printing
Control Function
1 -
Skip After Print To Channel 1
2-
Skip After Print To Channel 2
3-
Skip After Print To Channel 3
4-
Skip After Print To Channel 4
5-
Skip After Print To Channel 5
6-
Skip After Print To Channel 6
9-
Skip After Print To Channel 9
C-
Skip After Print To Channel 12
D-
Space 1 After Print
E-
Space 2 After Print
F-
Space 3 After Print
Interrupt Service Subroutines 25
Print Numeric , Prints only numerals and special
characters from the user's I/O area and checks for
channel 9 and channel 12 indications . See Print
ahovM
Carriage Control
Digits 2 and 3 specify the carriage control functions
listed in Table 3. An Immediate request is executed
before the next print operation; an after-print
request is executed after the next print operation
and replaces the normal space operation.
If the I/O function is print, only digit 3 is exam-
ined; if the I/O function is control , and digits 2 and ?
both specify carriage operations, only digit 2 is used.
Carriage control functions do not check for
channel 9 or channel 12 indications.
NOTE: An after-print request will be lost if it is
followed by an immediate request or by a print with
spacing suppressed. If a series of after-print re-
quests is given, only the last one will be executed.
I/O Area Parameter
The l/O area parameter is the label of the control
word that precedes the user's I/O area. The control
word consists of a word count that specifies the num-
ber of computer words of data to be printed. The
data must be in EBCDIC format, packed two charac-
ters per computer word.
Error Parameter
See Basic Calling Sequence.
1132 PRINTER/SYNCHRONOUS COMMUNICATIONS
ADAPTOR SUBROUTINE (PRNT2)
The printer subroutine PRNT2 is an additional print-
er subroutine for the IBM 1132 Printer, specifically
provided to permit concurrent operation of the 1132
and the Synchronous Communications Adapter.
PRNT2 handles all print and carriage control fimctions
related to the 1132,
Only one line of data can be printed, or one car-
riage operation executed, with each call to the printer
subroutine. The data in the output area must be in
EBCDIC form, packed two characters per word.
Restriction. The PRNTl and PRNT2 subroutines
are mutually exclusive; i.e. , both subroutines may
not be in core at the same time. Thus, if the Syn-
chronous Commimications Adapter is in operation,
the PRNT2 subroutine must be used for concurrent
operation of the 1132 Printer. If the PRNT2 sub-
routine is required in a core load for the concurrent
operation of the 1132 Printer and the Adapter, all
IBM- and user-written programs in that core load
using the PRNTl subroutine must be modified to
use the PRNT2 subroutine.
Calling Sequence
I
L.A>I
OperatlBT
'
^
Op«<«diS»t.™k.
f.K.U.T.y.
, .rAA.L.i. .P,a.r.n,T,F.e!. .n.n,T.p,iJ
r
1
, .r.n.Ai.T./p.n,i . .p.a.e.a.mf^.T.f^,/?:
1
D,r,
r,n.a.e.
. , , <
.
, , 1 1 , , , . , , i J ■ ,
F,e,fi.n,(i
n,r.
«■-.«. ,
, .R.F.T.affM, ,A,D.n.PieJi,S, , . ,
,
. , , ,
, . . . , .
._
. . , ,
, , 1 , , < . J . , , I . , , , < . .
,
r.oAJi.
n.r.,
e. . . .
, ,r./.n, .A.R.F.,a. , ,
, , , ,
L_
I— 1
1— 1
;_
1 , ,
where
b is the I/O function digit,
c is the "immediate" carriage operation digit,
d is the "after-print" carriage operation digit,
f is the nvimber of words to be printed on the
1132 Printer,
h is the length of the I/O area, h must be equal
to or greater than f.
The calling sequence parameters are described in
the following paragraphs.
Control Parameter
The control parameter consists of four hexadecimal
digits which are used as shown below:
26
I/O Function
Carriage Control
Not Used
I/O Function
The I/O function digit specifies the operation to be
performed on the 1132 Printer. The functions, their
associated digital values, and the required param-
eters are listed and described below.
Function
Test
Print
Control Carriage
Print Numeric
Digital Value
2
3
4
Required Parameters*
Control
Control, I/O Area, Error
Control
Control, I/O Area, Error
before the next print operation; an after-print
request is executed after the next print operation
and replaces the normal space operation.
If the I/O function is Print, only digit 3 is
examined; if the I/O function is Control Carriage,
and digits 2 and 3 both specify carriage operations,
only digit 2 is used.
Carriage control functions do not check for channel
9 and channel 12 indications.
I/O Area Parameter
The I/O area parameter is the label of the control
word that precedes the user's I/O area. The control
word consists of a word count that specifies the
number of words of data to be printed. The data
must be in EBCDIC format, packed two characters
per word.
*Any parameter not required for a particular fimctiou must be
omitted.
Test. Branches to LIBF+2 if the previous operation
has not been completed, to LIBF+3 if the previous
operation has been completed.
Print . Prints characters from the user's I/O area;
checks for channel 9 and 12 indications. If either
of these conditions is detected, the subroutine
branches to the user's error routine after the line
of data has been printed (see Appendix B for error
codes). Upon return from this error routine, a skip
to channel 1 is initiated or the operation is terminated,
depending upon whether the Accumulator is non-zero
or zero.
Control Carriage. Controls the carriage as specified
by the carriage control digits listed in Table 3.
Print Numeric. Prints only numerals and special
characters from the user's l/O area and checks for
channel 9 and 12 indications. See Print above.
Carriage Control
Digits 2 and 3 specify the carriage control operations
listed in Table 3. An immediate request is executed
Error Parameter
See Basic Calling Sequence.
1403 PRINTER SUBROUTINE (PRNT3)
The printer subroutine PRNT3 , available only with
the Monitor system, handles all print and carriage
control functions relative to the 1403 Printer. Only
one line of data can be printed and/or one carri^e
operation executed with each call to the printer
subroutine.
Calling Sequence
label
'
Op.rood. 4 Reniorki
LX.S.F
p.f?.N,T,3, , , ■ ■ .r.a.i .1 . .f./^.j.u.T.r.K. .n,isrr,p.ii,r, ,
.r.n.Aj.T.e.n.L. .p,A.R,a,MP,T.e.R
1
T.n.a.p.
1
,T,AO. ,A.e.eji. ,p,a,jp.a,M.F,T,f-
i?i
■,
,
1
,
. . . ,
1
1
,
1
,
1
F.e.n.n.e
D,C,
*i-.« ,
.p.F.T.u.s'.M. ,a,n,n.^iP;'=:.'i> . .
1
1
, . , ,
1
1
.e,^.r.iJ,/?.M, >T,n. .Cifi.ii.p.p.
1
1
.
,
,
i.
D.r.
f. , , ,
1
iV.o.e.ry /~..n./j.ur:
aSiS.
h. . . .
T,/.n. .s,R,FJi
1
.III
,_L_
1_
,_
^
^
L_L
Interrupt Service Subroutines 27
where
b is the I/O function digit,
c is the "immediate" carriage operation digit,
d is the "after-print" carriage operation digit,
f is the number of words to be printed on the
1403 Printer,
h is the length of the I/O area, h must be equal
to or greater than f.
Control Parameter
This parameter consists of four hexadecimal digits
which are used as shown below.
I/O Function
! t t r
Carriage Control
Not Used
I/O Function
The I/O function digit specifies the operation to be
performed on the 1403 Printer. The functions, their
associated digital values, and the required param-
eters are listed and described below.
Function
Test
Print
Control Carriage
Digital Value
2
3
Required Parameters*
Control
Control, I/O Area, Error
Control
*Any parameter not required for a particular function must be
omitted.
Test. Branches to LIBF+2 if the previous operation
has not been completed, to LIBF+3 if the previous
operation has been completed.
Print. Prints characters from the user's I/O area,
checking for channel 9 and 12 and error indications.
If any of these conditions are detected, the subroutine
branches to the user's error subroutine after the line
of data has been printed with an error code in the
Accumulator (see Appendix B). Upon return from
this error subroutine, a skip to channel 1 is
initiated and the function is reinitiated or terminated,
depending upon the error code and whether the
Accumulator is non-zero or zero.
Control Carriage . Controls the carriage as specified
by the carriage control digits listed in Table 4.
Carriage Control
Digits 2 and 3 specify the carriage control functions
listed in Table 4. An "immediate" request is exe-
cuted before the next print operation; an "after-
print" request is executed after the next print
operation and replaces the normal space operation.
If the function is print, only digit 3 is examined,
if the function is control, and digits 2 and 3 both
specify carriage operations, only digit 2 is used.
Carriage control functions do not check for channel
9 or channel 12 indications.
NOTE: An "after-print" request is lost if it is fol-
lowed by an "immediate" request. If a series of
"after-print" requests is given, only the last one is
executed.
I
Table 4
Carriage Control Operations
Digit
'2
: Immediate Carriage Operations
Print Functions
Not Used
Control Function
1
_
Immediate Skip To Channel 1
2
-
Immediate Skip To Channel 2
3
_
Immediate Skip To Channel 3
4
_
Immediate Skip To Channel 4
5
-
Immediate Skip To Channel 5
6
-
Immediate Skip To Channel 6
7
_
Immediate Skip To Channel 7
8
_
Immediate Skip To Chonnel 8
9
_
Immediate Skip To Channel 9
A
-
Immediate Skip To Channel 10
B
-
Immediate Skip To Channel 11
C
_
Immediate Skip To Channel 12
D
-
Immediate Space Of 1
E
-
Immediate Space Of 2
F
-
Immediate Space Of 3
Digit
*3
; After-Print Carriage Operations
Print Functions
_
Space One Line After Printing
1
-
Suppress Space After Printing
Control Function
1
_
Skip After Print To Channel 1
2
_
Skip After Print To Channel 2
3
-
Skip After Print To Channel 3
4
_
Skip After Print To Channel 4
5
-
Skip After Print To Channel 5
6
_
Skip After Print To Channel 6
7
_
Skip After Print To Channel 7
8
-
Skip After Print To Channel 8
9
-
Skip After Print To Channel 9
A
_
Skip After Print To Channel 10
B
_
Skip After Print To Channel 1 1
C
-
Skip After Print To Channel 12
D
-
Space 1 After Print
E
-
Space 2 After Print
F
-
Space 3 After Print
28
I/O Area Parameter
Control Parameter
The I/O area parameter is the label of the control
word that precedes the user's I/O area. The control
word consists of a word count that specifies the
number of words of data to be printed. The data must
be in 1403 Printer code, packed two characters per
word.
Error Parameter
See Basic ISS Calling Sequence.
KEYBOARD/CONSOLE PRINTER
There are two ISSs for the transfer of data to and
from the Console Printer and the Keyboard.
TYPEO. The TYPED subroutine handles input and
output.
WRTYO. The WRTYO subroutine handles output
only. If a program does not require keyboard input,
it is advantageous to use the WRTYO subroutine
because it occupies less core storage than the TYPEO
subroutine.
Only the TYPED subroutine is described below;
the WRTYO subroutine is identical , except that it
does not allow the read-print function.
Calling Sequence
Uibcl
:
'
o_...^.
Lj^Bf
r.v.p.F..^
/,h.^.^.^
.
0\C
n.r
c. . , .
8iSiS^
h. , . .
,r././), ,j,A/^.<o
. , . ,
, ,
L_J
1 , ,
where
b is the I/O function digit,
f is the number of characters to be printed on
the console printer,
h is the length of the I/O area, h must be equal
to or greater than f.
This parameter consists of four hexadecimal digits,
as shown below:
I/O Function
Not Used
12 3 4
t t t t
I/O Fimction
The I/O Function digit specifies the operation to be
performed on the Keyboard and/or Console Printer.
The function, their associated digital values, and
the required parameters are listed and described
below.
Function Digital Value Required Parameters*
Test
Read-Print
Print
Control
Control, I/O Area
Control, I/O Area
*Any parameter not required for a particular function must
be omitted.
Test. Branches to IjrBF+2 if the previous operation
has not been completed, to LIBF+3 if the previous
operation has been completed.
Read-Print. Reads from the Keyboard and prints
the requested nimiber of characters on the Console
Printer. The operation sequence is as follows:
1. The calling sequence is analyzed by the call
portion of the subroutine, which then unlocks
the Keyboard.
2. When a key is pressed, a character interrupt
signals the interrupt response portion that a
character is ready to be read into core storage.
3. The interri5)t response portion converts the
keyboard data to Console Printer Code (see
Data Codes) . Each character is printed as
it Is read; the Keyboard is then unlocked for
entry of the next character.
4. Printer interrupts occur whenever the Console
Printer has completed a print operation. When
the interrupt is received, the subroutine checks
to determine if the final character has been
read and printed. If so, the operation is con-
sidered complete. In the DM1 and C/PT sys-
tem, if the Console Printer becomes not-
luterrupt Service Subroutines 29
ready during printing, the subroutines loop,
waiting for the Console Printer to become
ready. In the DM2 system they trap to
$PRET or $PST4.
5. Steps 2 through 4 are repeated until the specified
number of characters have been read and printed.
The characters read into the I/O area are in
a code similar to IBM Card Code; that is,
each 12-bit image is left-justified in one 16-
bit word.
Print. Prints the specified number of characters on
the Console Printer. A printer interrupt occurs
when the Console Printer has completed a print
operation. When an Interrupt is received, the
character count is checked. If the specified nimi-
ber of characters has not been written, printing is
initiated for the next character. This sequence
continues until the specified number of characters
has been printed. Data to be printed must be in Con-
sole Printer code (see Data Codes ) , packed two char-
acters per 16-bit word. Control characters can be
embedded in the message where desired.
In read-print and print operations, printing
begins where the printing element is positioned; that
is, carrier return to a new line is not automatic when
the subroutine is called.
last graphic character is slashed. For example, if
ABCDE was entered and the backspace key pressed
three times, the next graphic character to be entered
replaces the C but only the E is slashed. If XYZ is
the new entry, the print-out shows ABCDEXYZ , but
the buffer contains ABXYZ.
Erase Field. When the interrupt response portion
recognizes the erase field control character, it
assumes that the entire message is in error and is
to be entered again. The subroutine prints two
slashes on the Console Printer, restores the car-
rier to a new line, and prepares to replace the old
message in the I/O area with a new message.
The old message in the I/O area is not cleared.
Instead, the new message overlays the old,
character by character. If the old message is
longer than the new, the remainder of the old mes-
sage follows the NL (new line) character terminating
the new message.
End-of-Message. When the interrupt response
portion recognizes the end-of-message control
character, it assumes the message has been com-
pleted, stores an NL character in the I/O area,
and terminates the operation.
Operator Request Function
I
Keyboard Functions
Keyboard functions provide for control by the TYPED
subroutine and by the operator.
TYPED Subroutine Control
Three keyboard functions are recognized by the
TYPED subroutine.
Backspace. The operator presses the backspace key
whenever the previous character is in error. The
interrupt response portion senses the control char-
acter, backspaces the Console Printer, and prints a
slash (/) through the character in error. In addition,
the subroutine prepares to replace the incorrect
character in the I/O area with the next character.
If the backspace key is pressed twice, the
character address is decremented by +2, but only the
By pressing the interrupt request key (INT REQ) on
the Keyboard, the operator can inform the program
that he wishes to enter data from the Keyboard or
the Console Entry switches. The interrupt that
results causes the TYPED or WRTYO subroutine to
execute an indirect BSI instruction to core location
2C ($IREQ in DM2), where the user must have
previously stored the address of an interrupt re-
quest subroutine. Bit 1 of the Accumulator contains
the Keyboard/Console Printer identification bit, that
is, the device status word, shifted left two bits.
The user's interrupt request subroutine must
return to the ISS subroutine via the return link. The
user's subroutine is executed as a part of the
interrupt handling. The interrupt level remains ON
until control is returned to the ISS subroutine (see
General Error Handling Procedures, Post-operative
Checks).
I/O Area Parameter
The I/O area parameter is the label of the control
word that precedes the user's I/O area. The control
30
word consists of a word count that specifies the
number of words to be read or printed. This word
count is equal to the number of characters if the
read-print function is requested and is equal to one-
half the number of characters if the print function is
requested.
I PAPER TAPE SUBROUTINES (DM1 AND C/PT
SYSTEM)
The p£^er tape subroutines, PAPTl and PAPTN,
handle the transfer of data from the IBM 1134 Paper
Tape Reader to core storage and from core storage
to the IBM 1055 Paper Tape Punch. Any even number
of characters can be transferred via one calling
sequence.
The PAPTN subroutine must be used if simul-
taneous reading and pimching are desired.
The PAPTl subroutine can operate both devices,
but only one at a time.
When called, the paper tape subroutine starts
the reader or punch and then, as interrupts occur,
transfers data to or from the user's I/O area. Input
data is packed two characters per computer word by
the subroutine; output data must already be in the
packed format when the subroutine is called for a
punch function.
Calling Sequence
L<ihel
Op«olipn
f
:
Opxwdi & ItMariu
. . , ,
L,I,BiE
ff.A.P,T.a. .
. . , ,
D.C. ,
dlh^S^0i£.
. . , ,
nr.
1
....
D.C. 1
F,p.p.n.p
,
. . , .
,
. . , ,
-. . .
1
I . . .
1
£x&&OiS,
D,r.. .
«.-.Xfa .
1
....
".
....
....
,, , ,
, ,
....
r
£££.(2i£
* . . .
....
., . ,
. . , ,
.1.1
• , 1
. . , ,
LQjA&-
f>.r. .
*. . . .
fl.S.«t.
h. . . .
,
r,/.n. .A^,e,a
1. 1 1...I-,,
, . .
1 I
..J
where
a is a 1 or N,
b is the I/O function digit,
c is a check digit,
e is a device identification digit,
f is the number of words to be read from or
punched into p£^er tape,
h is the length of the I/O area, h must be equal
to or greater than f.
The parameters used in the above calling sequence
are described in the following paragraphs.
Control Parameter
This parameter consists of four hexadecimal digits,
as shown below:
12 3 4
I/O Function i
Check -
Not Used -
Device Identification -
I/O Function
The I/O function digit specifies the operation to be
performed on a paper tape attachment. The
functions, their associated digital value, and the
required parameters are listed and described below.
Function Digital Value
Required Parametei^
Control
Control, I/O area, Error
Control, I/O area, Error
*Any parameter not required for a particular function must be
omitted.
Test
Read
1
Punch
2
Interrupt Service Subroutines 31
Test. Branches to LIBF+2 if the previous operation
has not been completed, to LIBF+3 If the previous
operation has been completed.
Read. Reads paper tape characters into the specified
number of words in the l/O area. Initiating reader
motion causes an interrupt to occur when a character
can be read into core. If the specified number of
words has not been read, or the stop character has
not been read (see Check ) , reader motion is again
initiated.
Punch. Punches paper tape characters into the tape
from the words in the I/O area. Each character
pxmched causes an interrupt which indicates that the
next character can be accepted. The operation is
terminated by transferring either a stop character or
the specified number of words.
Check Digit
The check digit specifies whether or not word-count
checking is desired while completing a read or punch
operation as shown below:
Check
1 No check
Check. This function should be used with the Perfo-
rated Tape and Transmission Code (PTTC/8) only
(see Data Codes ). The PTTC/8 code for DEL is used
as the delete character when reading. The delete
character is not placed in the l/O area and therefore
does not enter Into the count of the total number of
words to be read.
The PTTC/8 code for NL is used as the stop
character when doii^ a read or punch. . On a read
operation, the NL character is transferred into the
l/O area. On a punch operation, the NL character is
punched into the paper tape.
When the NL character is encountered before the
specified number of words has been read or punched,
the operation is terminated. AVhen the specified num-
ber of words has been read or punched, the opera-
tion is terminated, even though a NL character has
not been encountered.
No Check. The read or punch function is terminated
when the specified number of words has been read
or punched. No checking is done for a delete or
stop character.
Device Identification
When the test function Is specified, the PAPTN sub-
routine must be told which device (reader or punch) is
to be tested for an operation complete indication.
(Remember that both the reader and the punch can
operate simultaneously. ) Therefore, the device
identification is used only for the test function in the
PAPTN subroutine. If the device identification digit
is a 0, the subroutine tests for a reader complete
indication; if it is a 1, the subroutine tests for a
punch complete indication.
l/O Area Parameter
The I/O area parameter is the label of the control
word that precedes the user's l/O area. It consists
of a word count that specifies the number of words
to be read into or punched from core. Since charac-
ters are packed two per word in the l/O area, this
count is one-half the maximum number of characters
transferred. Because an entire eight-bit channel
image is transferred by the subroutine , any combina-
tion of channel punches is acceptable. The data can
be a binary value or a character code. The code
most often used is the PTTC/S code. (See Data
Codes.)
Error Parameter
I
See Basic ISS Calling Sequence.
32
j PAPER TAPE SUBROUTINES (DM2 SYSTEM)
The paper tape subroutines, PAPTl, PAPTN, and
PAPTX, handle the transfer of data from the IBM
1134 Paper Tape Reader to core storage and from
core storage to the IBM 1055 Paper Tape Punch.
Any even number of characters may be transferred
via one calling sequence (PAPTX also allows an odd
character coimt).
I The PAPTN or PAPTX subroutine must be used
if simultaneous reading and punching are desired.
The PAPTl subroutine will operate both devices but
only one at a time. The PAPTl and PAPTN sub-
routines use only a word count, reading and punching
an even niunber of characters; PAPTX can use a word
count or character count, permitting an odd number
of characters to be read or punched. PAPTX allows
the user to start pimching from or reading into the
left or right half of a word. One -frame records can
be written on tape.
When called, the paper tape subroutine starts the
reader or punch and then, as interrupts occur,
transfers data to or from the user's I/O area. The
data is packed two characters per computer word
by the subroutine when reading, and must be in that
form when the subroutine is called for a punch
function.
d is the character mode digit,
e is a device identification di^t,
f is the number of words to be read from or
punched into paper tape,
h is the length of the I/O area, h must be
equal to or greater than f.
The parameters used in the above calling sequence
are described in the following paragraphs.
Control Parameter
This parameter consists of four hexadecimal digits
which are used as shown below:
I/O Fimcticm
Check
1
Character Mode
Device Identification
I/O Function
Calling Sequence
l^OcI
°-"'-
'
'
Opanxidi & RsmarVi
/ ,r,fl
e
, ,r.ji,i_,L. .p,a.p,£.p, .T.jQ,p,E .i./,n. .
D.C.
p,r
T,n.a.p. . .
■ ,Ti/.0. .A,e,£A. ,P,A,P.a,Mt^,T.f=.e. . .
r>,r
F.P.p.n.JP. .
. . , .
n,r
ifc-.*. , 1
. . , ,
,
. . , ,
....
fl^f
r
....
,,,,,,
, , , ,
*
P
h
. .-n/.n. ,A.e.e.A
. . , 1
1 1
where
a is 1, N, or X.
b is the I/O function digit,
c is a check digit.
The I/O function digit specifies a particular opera-
tion performed on the 1134/1055 Paper Tape attach-
ment. The functions, associated digital values and
required parameters are listed and described below.
Fimction
Test
Read
Punch
Digital Value
1
2
Required Parameters*
Control
Control, I/O area, Ercor
Control, I/O area. Error
*Any parameter not required for a particular function must be
omitted.
Test. Branches to LIBF+2 if the previous operation
has not been completed, to LIBF+3 if the previous
operation has been completed.
Read. Reads paper tape characters into the specified
number of words in the I/O area. Initiating reader
motion causes an interrupt to occur when a character
can be read into core. If the specified number of
Interrupt Service Subroutines 33
words has not been read or the stop character has
not been read (see Check ) , reader raotion is again
initiated.
Punch . Punches paper tape characters into the tape
from the words in the I/O area. Each character
punched causes an interrupt which indicates that the
next character can be accepted. The operation is
terminated either by encoimtering a stop character
(see Check ) or by transferring the requested nimiber
of words.
Check Digit
The check digit specifies whether or not checking is
desired while doing a read or punch operation.
- Check
1 - No check
No Check. The read or punch function is terminated
when the specified nimiber of words or characters
has been read or punched. No check is made for a
delete or stop character.
Check. This function should be used with the per-
forated tape and transmission (PTTC/8) code only
(see Data Codes ). The PTTC/8 code for DEL will
be used as the delete character when doing a read.
The delete character is not placed in the I/O area
and therefore is not included in the word or character
count.
The PTTC/8 code for NL will be used as the stop
character when doing a read or punch. On a read
operation, the NL character is transferred into the
I/O area and causes the operation to be terminated.
On a punch operation, the NL character is punched
in the paper tape and causes the operation to be
terminated.
When the NL character is encountered before the
specified number of words has been read or pimched,
the operation is terminated. When the specified
number of words has been read or pimched, the
operation is terminated even though an NL character
has not been encotmtered.
Character Mode
This digit is examined by the PAPTX subroutine
• If it Is zero, the first word of this I/O area is
interpreted as a word count.
• If it is non-zero, the first word of the I/O area is
interpreted as a character count:
If the character mode digit is non-zero and even,
the first character will be read into or punched
from bits 0-7 of the first data word. Bits 8-15
of the last data word will not be altered if the
character count is odd.
If the character mode digit is non-zero and odd,
the first character will be read into or pimched
from bits 8-15 of the first data word. Bits 0-7
of the first data word will not be altered. If
the character coimt is even, bits 8-15 of the
last data word will not be altered.
Device Identification
When the test function is specified, the PAPTN and
PAPTX subroutines must be told which device
(reader or pxmch) is to be tested for an "operation
complete" indication. (Remember that both the
reader and the pimch can operate simultaneously.)
Therefore, the device identification digit Is used for
the test function in the PAPTN and PAPTX sub-
routines only; if it is a 0, the subroutine tests for
a "reader complete" indication; if it is a 1, the
subroutine tests for a "pxmch complete" indication.
I/O Area Parameter
The I/O area parameter is the label of the control
word that precedes the user's I/O area. Chaining
is not permitted with the paper tape subroutine;
therefore, the control word consists of a word count
or character count only. The word count specifies
the number of words to be read into or punched from
the user's I/O area. Since characters are packed
two per word in the I/O area, this count is one-half
the maximum number of characters transferred.
The character coimt, used only by the PAPTX sub-
routine if the character mode is non-zero, is the
naaximum number of characters to be read or
punched.
Because an entire 8-blt chajmel image is trans-
ferred by the subroutine, any combination of channel
pimches is acceptable. The data may be a binary
value or a character code. The code most often
used is the PTTC/8 code (see Data Codes) .
I
34
Error Parameter
(See Basic Calling Sequence . )
PLOTTER SUBROUTINE (PLOTl)
The plotter subroutine converts hexadecimal digits
in the user's output area into actuating signals that
control the movement of the plotter recording pen.
Each hexadecimal digit in the oulput area is trans-
lated into a plotter operation that draws a line seg-
ment or raises or lowers the recording pen. The
amount of data that can be recorded with one calling
sequence is limited only by the size of the corres-
ponding oulput area.
Calling Sequence
^,
Optrofion
'
T
Opsnmdl & Remarks
. r.,A.L.t, ,ftL,rt,r.T.£.i?, ,o,a,T,p,OT, ,
. .r.nM,T.P.^I. ./^Ae.AMfr.T.eiR, , ,
■""
Ttn.AR . .
, ,r./.o. .a.e.£,A, .p',A,PMM,r<T.i^.jp. . .
— '
n.r.
F.p.e.n.R
. .r.e.p.n.p. >P.A.e.AfA,f,T.n,p,
.
^ ,,,,,,,,
I
^
^
~
~
f-i . , ,
, .vl.n.p.n. ,r,n.u.fj.T.
h. . . .
,
, ,r,/,0^ ,/l,ei£,A 1 , . . . 1.
^
,_
_
L_l_
l_
where
b is the I/O function digit,
f is the mmiber of words of plotter data,
h is the length of the I/O area, h must be equal
to or greater than f.
The calling sequence parameters are described in
the following paragraphs.
l/O Function
The I/O function digit specifies the operation to be
performed on the 1627 Plotter. The functions, their
associated digital value, and the required parameters
are listed and described below.
Function
Test
Write
Digital Value
1
Required Parameter*
Control
Control, I/O Area, Error
*Any parameter not required for a particular function must
be omitted.
Test. Branches to LIBF+2 if the previous operation
has not been completed, to LIBF+3 if the previous
operation has been completed.
Write. Changes hexadecimal digits in the output
area into signals that actuate the plotter. Table 5
lists the hexadecimal digits and the plotting actions
they represent. Figure 5 shows the binary and hex-
adecimal configurations for drawing the letter E.
I/O Area Parameter
The I/O area parameter is the label of the control
word that precedes the user's I/O area.
The contirol word consists of a word coimt that
specifies the nxmaber of computer words of data to
be used.
Error Parameter
This parameter is not used but must be included
because the subroutine will return to LIBF+4. (See
Basic C filling Sequence.)
Control Parameter
This parameter consists of four hexadecimal digits,
as shown below:
I/O Function ■
Not Used
PLOTTER SUBROUTINE (PLOTX)
The PLOTX subroutine converts the hexadecimal
digit in the parameter into a control word. The
control word is stored in a buffer inside the PLOTX
subroutine. One digit is transferred with each calling
sequence. When the plotter is ready to accept con-
trol, the movement of the plotter recording pen is
controlled by the words in the PLOTX buSer.
Interrupt Service Subioutiues 35
Table S . Plotter Control Digits
Calling Sequence
Hexadecimal Digit
Plotter Action (See Diagram Below)
Pen Down
1
Line Segment = + Y
2
Line Segment = +X, + Y
3
Line Segment = + X
4
Line Segment = +X,- Y
5
Line Segment = - Y
6
Line Segment = - X,- Y
7
Line Segment = - X
8
Line Segment = -X, + Y
9
Pen Up
A
Repeat the previous pen motion the
number of times specified b/ the
next digit (Maximum-15 times)
B
Repeat the previous pen motion the
number of times specified by the
next two digits (Maximum-255 times)
C
Repeat the previous pen motion the
number of times specified by the nexi
three digits (Maximum -4095 times)
D
Not Used
E
Not Used
F
Not Used
+ X
+ X, + Y
+ X,-Y
\2
1 \
3 /
A
C 5
y
\
/ 7
\
-X, + >.
f
-X,-Y
1
Binary
H
exadecimal
Figure
OOOOOI 1100010001
0711
~~'-*--
5~Finish
0011101000100101
3A25
1001000100000011
9103
1010001001010101
A255
l--'*l
— Start
0111100111111111
79FF
labtl
Op™.ro„
f
'
OpaiwiA S Dimirici
I.X.B.P
n.r. .
. . 1 .
where
e is the plotter control digit.
Control Parameter
This parameter consists of four hexadecimal digits
which are used as shown below.
I
Not Used
1 2
4
Plotter Control
Plotter Control
The plotter control digit specifies the recording pen
action to be taken. This digit is expressed in hexa-
decimal.
Hexadecimal
Digit
Plotter Action
Pen down
1
Line segment = +Y
2
Line segment = +X,
+Y
3
Line segment = +X
4
Line segment = +X,
-Y
5
Line segment = -Y
6
Line segment - -X,
-Y
7
Line segment - -X
8
Line segment = -X,
+Y
9
Pen up
A-F
Not used
Figure 5 . Plotter Example
If there is no room in the buffer for the control digit,
the subroutine will loop imtil there is room.
If the plotter is in a not-ready, not-busy con-
dition, the subroutine traps to $PRET.
The PLOTX subroutine has no error handling
capabilities.
36
1231 OPTICAL MARK PAGE READER SUBROUTINE
(OMPRl)"^
The Optical Mark Page Reader subroutine OMPRl
handles the reading of paper documents eight and one-
half inches wide by eleven inches deep by the 1231
Optical Mark Page Reader. A maximum of 100
words from one page can be read with one call to
the subroutine.
When called to perform a read function, OMPRl
performs a feed function and reads a page into core
storage according to the Master Control Sheet (see
the publication IBM 1231, 1232 Optical Mark Page
Readers . Form A21-9012), and the setting of the
switches on the reader. Other functions performed
by OMPRl are feed, stacker select, and disconnect.
I/O Function
The I/O function digit specifies the operation to be
performed on the 1231 reader. The functions, their
associated digital values, and the required paramet-
ers are:
Function Digital Value Required Parameters*
Test
Control
Read
1
Control,
I/O Area, Error
Feed
3
Control
Disconnect
4
Control
Stacker Select
5
Control
*Any parameter not required for a particular function must be
omitted.
Calling Sequence
UUi
Oprat™
:
:
Operomfc & Kemorlo
n.u.P./i.i. ,
i_i . ,CiA,L,Li .OiP.Tt MJl,ff,K, ^P.a.S.F, .Z.Jil.R./i.T. .
rnjJTPni i>ap Ji uirr f e
n.r.. ,
l^JiJi. , .
F,B.R,n,tf. ,
.
^ ^ ,
,
,,!,,,,.
€.(?<>!, O
IP
or., .
Ki-,-*, , , 1
^./r.TJ/.RM, .A.n.n.R,Fs:,<i> . .
,
. , ,
..,,.>
,
&SJZ^
'. . .
1 ^
,, , ,
Z.OJIJ?.
as.sj_
h
where
b is the I/O function digit,
c is the stacker select digit,
e is the timing-mark-check test digit,
h is the length of the I/O area, h must be equal
to or greater than the number of words designated
to be read on the Master Control Sheet.
Control Parameter
This parameter consists of foxir hexadecimal digits
as shown below.
I/O Fimction
1
Stacker Select
Not Used
Timing-Mark -Check-Test
Test. Branches to LIBF+2 if the previous opera-
tion has not been completed, to LIBF+3 if the
previous operation has been completed.
The operation to be tested is specified by the
fourth digit of the control parameter. A zero value
in digit 4 specifies a normal device-busy test; that
is, a test to determine if there is an operation in
progress for which no operation complete interrupt
has occmrred. The subroutine is "not busy" once
the operation complete interrupt takes place. A
value of one for digit 4 specifies a Timing-Mark-
Check-Busy test. This test indicates a "busy"
condition as long as the Test-Timing-Mark-Check
indicator in the Device Status Word is on. If the
user wishes to nm with the Timing Mark Switch
set on, it is recommended that digit 4 be set to
one when performing a test function.
A test function must not directly follow a feed
function.
Read . Reads words or segments (response positions
1-5 or 6-10 of any word) from a docxmient page
into core storage starting at the I/O area address.
It is not necessary for the user to perform a feed
function prior to a read. In the absence of a feed,
the read feeds the docimient before reading. When
a read function follows a feed, the read begins with
the document started by the feed. The number of
bits per word read and the number of words per
document read depends upon the way in which the
Master Control Sheet is programmed (see the
publication IBM 1231 Optical Mark Page Readers,
Form A21-9012). OMPRl reads a maximum of 100
words. Any word not programmed to be read (mark
positions 8 or 18 not penciled on the Master Control
Sheet) is skipped. Digit 2 of the control parameter
specifies whether or not the document being read is
to be stacker- selected. If digit 2 is set to one, the
Intemipt Service Subroutines 37
document is stacker-selected; if digit 2 is set to
zero, it is not.
NOTE: On a feed, or feed as the result of a read,
the document is fed from the hopper, the selected
data is read into a delay line (and read out on a read) ,
ajid the document continues through the machine to
the stacker.
Feed. Initiates a feed cycle. This function advances
a document from the hopper through the read station
and into the stacker. Selected information from the
document is stored in a delay line. A read function
following a feed causes this data to be read. If a
feed function is followed by another feed function
without an intervening read function, the data read
from the document corresponding to the first feed is
overlaid in the delay line by the data read from the
second document.
A feed fvmction must not be followed directly by a
test function.
Disconnect. Terminates the read function on the
data currently being read from the delay line. The
subroutine busy indicator is cleared.
Stacker Select. Performs a stacker select on the
sheet ciurently being read (and fed) , providing the
stacker select function is requested while the "OK to
select" bit is on in the Device Status Word (DSW).
This bit remains on until 50 milliseconds after the
read operation is completed. If the request to select
arrives too late, the sheet falls in the normal
stacker.
I/O Area Parameter
The I/O area parameter is the label of the user's
l/O area.
Error Parameter
There is an error parameter for the read function
only. Exits are made to the user's error subroutine
when the following conditions are detected:
Master Control Sheet Error
Timing Mark Error
Read Error
Hopper Empty
Document Selected.
(See Basic Calling Sequence and Appendices B
and C).
I
38
SUBROUTINES USED BY FORTRAN (DM1 AND C/PT SYSTEM)
Many of the functions and capabilities available with-
in the general I/O and conversion subroutines de-
scribed in this manual are beyond specification by
the FORTRAN language. For example, the feed
function of the 1442 cannot be specified in FORTRAN.
Therefore, a set of limited-function I/O and con-
version subroutines is included in the subroutine
library for use by FORTRAN-compiled programs.
Any subroutines written in Assembler language that
execute I/O operations, and that are intended to be
used in conjvmction with FORTRAN-compiled pro-
grams must employ these special I/O subroutines for
any I/O device specified in a mainline *IOCS record
or for any device on the same interrupt level.
These subroutines are intended to operate in an
error-free environment and thus provide no pre-
operative parajneter checking.
The subroutine librars' contains the following
special routines;
DISKZ - Disk Input/Output Subroutine (DM1
only)
CARDZ - 1442 Input/Output Subroutine
TYPEZ - Keyboard/Console Printer
Input/Output Subroutine
WRTYZ - Console Printer Subroutine
PRNTZ - 1132 Printer Subroutine
PAPTZ - Paper Tape Input/Output Subroutine
PLOTX - 1627 Plotter Subroutine (see PLOTX)
HOLEZ - IBM Card Code/EBCDIC Conversion
Subroutine
EBCTB - EBCDIC/Console Printer Code Table
HOLTB - IBM Card Code Table
GETAD - Subroutine Used to Locate Start
Address of EBCTB/HOLTB
GENERAL SPECIFICATIONS
The EBCDIC character set recognized by the sub-
routine comprises digits 0-9, alphabetic characters
A-Z, blank, and special characters $-+.&=(), '/*<%#@.
Any other character is recognized as a blank.
The Accumulator, Extension, and Index Registers
1 and 2 are used by the FORTRAN device sub-
routines and must be saved, if required, before
entry into any given FORTRAN subroutine.
The Accxunulator must be set to zero for input
operations. For output operations, the Accumulator
must be set to /0002, except for PRNTZ and WRTYZ,
in which output is the only valid operation. Index
Registers 1 and 2 are set to the number of characters
transmitted, except for PRNTZ (1132 Printer) in
which Index Register 2 contains the number of char-
acters printed plus an additional character for forms
control.
ERROR HANDLING
Device errors, e.g. , not-ready and read check,
cause a WAIT in the subroutine itself. After the
appropriate corrective action is taken by the operator,
PROGRAM START is pressed to execute or reinitiate
the operation.
DESCRIPTIONS OF I/O SUBROUTINES
The subroutines described in the sections that follow
do not provide a check to determine validity of param-
eters (contents of Accumulator and Index Register 2).
Invalid parameters cause indeterminate operation of
the subroutines.
Except for PLOTX, the FORTRAN I/O device sub-
routines operate in a non-overlapped mode. Thus,
the device subroutines do not return control to the
calling program until the operation is completed.
The input/output buffer for the subroutines is a
121-word buffer starting at location /003C. The
maximum amount of data transferable is listed in the
description of each subroutine. Output data must be
stored in impaeked (one character per word) EBCDIC
format, /OOXX. Data entered from an input device
is converted to xmpacked (one character per word)
EBCDIC format,/OOXX.
TYPEZ -KEYBOARD/CONSOLE PRINTER l/O
SUBROUTINE
Buffer Size. Maximum of 80 words input, 120 words
output.
Keyboard Input. The subroutine returns the carrier,
reads up to 80 characters from the Keyboard, and
stores them in the l/O buffer in EBCDIC format.
Upon recognition of the end-of -field character or
reception of the 80th character, the subroutine
returns control to the user (the remainder of the
Subroutmes Used by FORTRAN (DMl and C/PT System ) 39
buffer is unchanged). Upon recognition of the erase
field character or the backspace character, the
carrier is returned and the subroutine is reinitialized
for the re-entry of the entire message. Characters
are printed by the Console Printer during Keyboard
input.
Console Printer Output. The subroutine returns the
carrier and prints the number of characters indicated
by Index Register 2 from the I/O buffer.
Subroutines Required ,
required with TYPEZ
The following subroutines are
HOLEZ, GETAD, EBCTB, HOLTB
character, is read from tape. (Delete and case
shift characters cause nothing to be stored. ) If the
first character read is not a case shift character,
it is assumed to be a lower case character. The
input is converted to EBCDIC format.
1055 Paper Tape Output. The contents of the I/O
buffer is converted from EBCDIC to PTTC/8, and
the number of characters indicated by Index Register
2 is punched, in addition to the required case shift
characters.
PRNTZ - 1132 PRINTER OUTPUT SUBROUTINE
Buffer Size. Maximum of 121 characters.
I
WRTYZ - CONSOLE PRINTER OUTPUT
SUBROUTINE
Buffer Size. Maximum of 120 words.
Operation. This subroutine returns the carrier and
prints the niunber of characters indicated by Index
Register 2 from the I/O buffer.
Subroutines Required. The following subroutines are
required with WRTYZ:
GETAD, EBCTB
CARDZ - 1442 CARD READ PUNCH INPUT/OUTPUT
SUBROUTINE
Buffer Size. Maximum of 80 words.
Card Input. This subroutine reads 80 columns from
a card and stores the information in the I/O buffer
in EBCDIC format.
Card Output. This subroutine pxuiches the number of
characters indicated by Index Register 2 from the I/O
buffer. Punching is done in IBM card code format.
Subroutines Required. The following subroutines are
required with CARDZ :
HOLEZ, GETAD, EBCTB, HOLTB
PAPTZ - 1134/1055 PAPER TAPE READER PUNCH
I/O SUBROUTINE
Buffer Size. Maximum of 80 characters.
1134 Paper Tape Input. This subroutine reads paper
t^e punched in PTTC/8 format. Paper tape is read
xmtil 80 characters have been stored or until a new-
line character is read. If 80 characters have been
stored and a new-line character has not been read,
one more character, assumed to be a new line
Index Register 2. The value stored in Index Register
2 must be the number of characters to be printed
plus an additional character for carriage control.
Up to 120 characters can be printed in any one
operation. The first character to be printed is
stored in location /003D.
The carriage of the 1132 Printer is controlled
prior to the printing of a line. The following is a
list of the carriage control characters and their
related functions:
/OOFl Skip to channel 1 prior to printing
/OOFO Double space prior to printing
/004E No skip or space prior to printing
Any other character - Single space prior to print-
ing.
Channel 12 Control. If a punch in channel 12 is en-
coimtered while a line is being printed, a skip-to-
channel-1 is taken prior to the printing of the next line.
DISKZ - DISK INPUT/OUTPUT SUBROUTINE
(DM1 ONLY)
Operation . This subroutine reads or writes disk
storage. Data is transferred to or from the disk,
one sector (320 words) at a time.
Following a write operation, the subroutine per-
forms a read back check on the data just written.
If an error is detected, a rewrite occurs. Similarly,
if a sector is not located or an error is detected
during a read, the subroutine repeats the operation.
A read is attempted ten times before the computer
halts with an error display.
Subroutines Loaded. The following subroutine is
required with DISKZ .
ILS02
40
SUBROUTINES USED BY FORTRAN (DM2 SYSTEM)
Many of the I/O and conversion subroutines cannot be
specified in FORTRAN- Therefore, the System
Library includes a set of limited-function I/O and
conversion subroutines for FORTRAN programs.
Any Assembler language I/O subroutines used by
FORTRAN programs must employ these special sub-
routines for any I/O device specified ui a mainline
IOCS control record.
Of all the FORTRAN device subroutines, only
DISKZ, PRNZ, and PLOTX return control to the
caller after initiating an operation (PLOTX is
described with the basic ISSs).
These subroutines are intended for use in an error-
free environment and thus provide no pre-operative
parameter checking.
The System Library contains the following ISS
subroutines for FORTRAN programs:
CARDZ - 1442 Input/Output Subroutine
PNCHZ - 1442 Output Subroutine
READZ - 2501 Input Subroutine
TYPEZ - Keyboard/Console Printer I/O
Subroutine
WRTYZ - Console Printer Subroutine
PRNTZ - 1132 Printer Subroutine
PRNZ - 1403 Printer Subroutine
PAPTZ - P^er Tape Input/Output Subroutine
PLOTX - 1627 Plotter Subroutine
DISKZ - Disk Input/Output Subroutine
HOLEZ - IBM Card Code/EBCDIC Conversion
Subroutine
EBCTB - EBCDIC/Console Printer Code Table
HOLTB - IBM Card Code Table
GETAD - Subroutine to Locate Start Address
of EBCTB/HOLTB
GENERAL SPECIFICATIONS (EXCEPT DISKZ)
The "Z" device subroutines are ISS subroutines.
They use a 121 -word input/output buffer, contained
in the non-disk FORTRAN I/O subroutine SFIO. The
maximiim amount of data transferable is listed in
the description of each subroutine. Output data must
be stored in unpacked (one character per word)
EBCDIC format. Input data is converted to unpacked
EBCDIC format.
The EBCDIC character set recognized by the sub-
routines comprises digits 0-9, alphabetic characters
A-Z, blank, and special characters $-+.&=(), '/*<%#©•
Any other character is recognized as a blank.
The Accumulator, Extension, and Index Registers
1 and 2 are used by the FORTRAN device subroutines
and must be saved, if required, before entry into
the subroutines. The Accumulator must be set to
zero for input operations.
For output operations, the Accumulator must be
set to /O0O2, except for PRNZ, PRNTZ, PNCHZ,
and WRTYZ , in which output is the only valid opera-
tion. Index Register 2 must be set to the number of
characters to be transferred, except for PRNZ and
PRNTZ. For these two subroutines, Index Register
2 must contain the niunber of characters to be
printed plus an additional character for carriage
control. Index Register 1 must contain the starting
address of the input buffer.
ERROR HANDLING
Device errors, e.g. , not ready and read check,
result in a branch to $PST1, $PST2, $PST3, and
$PST4 depending on the level to which the device
is assigned. After the appropriate corrective action
is taken by the operator, PROGRAM START is
pressed to execute or reinitiate the operation.
If a monitor control record is encountered by
CARDZ, READZ, or PAPTZ, the subroutine initiates
a CALL EXIT. The control record itself will not be
processed.
DESCRIPTIONS OF I/O SUBROUTINES
The subroutines described in the sections that follow
do not provide a check to determine validity of param-
eters (contents of Accumulator and Index Register 2).
Invalid parameters cause indeterminate operation of
the subroutines.
TYPEZ -KEYBOARD/CONSOLE PRINTER l/O
SUBROUTINE
Buffer Size. Maximum of 80 words input, 120 words
output.
Subroutines Used by FORTRAN (DM2 System) 41
Keyboard Input. The subroutine returns the carrier
and reads up to 80 characters from the Keyboard and
stores them in the I/O buffer in EBCDIC format.
Upon recognition of the end-of-field character or
reception of the 80th character, the subroutine returns
control to the user (the remainder of the buffer is
unchanged). Upon recognition of the erase field
character or the backspace character, the carrier is
returned and the subroutine is reinitialized for the
re-entry of the entire message. Characters are
printed by the Console Printer during Keyboard input.
Console Printer Output. The subroutine returns the
carrier and prints the number of characters indicated
by Index Register 2 from the I/O buffer.
Subroutines Required.
required with TYPEZ:
The following subroutines are
HOLEZ, GETAD, EBCTB, HOLTB
WRTYZ - CONSOLE PRINTER OUTPUT
SUBROUTINE
Buffer Size. Maximum of 120 words.
Operation. This subroutine returns the carrier and
prints the number of characters indicated by Index
Register 2 from the I/O buffer.
Subroutines Required. The following subroutines are
required with WRTYZ:
GETAD, EBCTB
CARDZ - 1442 CARD READ PUNCH INPUT/OUTPUT
SUBROUTINE
Buffer Size. Maximum of 80 words.
Card Input. This subroutine reads 80 colvimns from
a card and stores the information in the I/O buffer
in EBCDIC format.
Card Output. This subroutine punches the number of
characters indicated by Index Register 2 from the I/O
bxiffer. Punching is done in IBM Card Code.
Subroutines Required . The following subroutines are
required with CARDZ:
HOLEZ, GETAD, EBCTB, HOLTB
PAPTZ - 1134/1055 PAPER TAPE READER PUNCH
I/O SUBROUTINE
Buffer Size. Maximum of 120 characters.
1134 Paper Tape Input. This subroutine reads paper
tape punched in PTTC/8 format. The subroutine
reads paper tape until 120 characters have been
stored or until a new-line character is read. If
120 characters have been stored and a new-line
character has not been read, one more character,
assumed to be a new line character, is read from
tape. (Delete and case shift characters cause nothing
to be stored. ) If the first character read is not a
case shift character, it is assumed to be a lower
case character. The input is converted to EBCDIC
format.
1055 Paper Tape Output . The contents of the I/O
buffer is converted from EBCDIC to PTTC/8, and
the niunber of characters indicated by Index Register
2 is punched, in addition to the required case shift
characters.
PRNTZ - 1132 PRINTER OUTPUT SUBROUTINE
Buffer Size. Maximran of 121 characters.
Index Roister 2. The value stored in Index Register
2 must be the nimiber of characters to be printed,
plus an additional character for carriage control.
Up to 120 characters can be printed in any one
operation.
The carriage of the 1132 Printer is controlled
prior to the printing of a line. T^e following is a
list of the carriage control characters and their
related functions:
/OOFl Skip to channel 1 prior to printing
/ 00 FO Double space prior to printing
/ 004E No skip or space prior to printii^
Any other character - Single space prior to printing.
I
42
Channel 12 Control. If a pimch in channel 12 is
encountered while a line is being printed, a skip-
to-channel-l is taken prior to the printing of the
next line provided the next function is not /004E (no
skip or space prior to printing) .
PNCHZ - 1442 OUTPUT SUBROUTINE
Biiffer Size. Maximum of 80 words.
Card Output. This subroutine punches from the I/O
buffer the ntimber of characters indicated in the
location preceding the buffer. Punching is done in
IBM Card Code.
Subroutines Required . The following subroutines are
reqixired with PNCHZ :
HOLEZ, GETAD, EBCTB, HOLTB
READZ - 2501 INPUT SUBROUTINE
Buffer Size. Maximum of 80 words.
PRNZ - 1403 PRINTER SUBROUTINE
Buffer Size. Maximiun of 121 characters.
Index Register 2. The first character in the I/O
buffer is the carriage control character, followed
by up to 120 characters to be printed. Therefore,
Index Register 2 must contain the number of char-
acters to be printed plus one.
The carriage is controlled prior to the printing of
a line; no "after-print" carriage control is perform-
ed. The following is a list of the carriage control
characters and their related functions:
/OOFl Skip to channel 1 prior to printing
/OOFO Double space prior to printing
/004E No skip or space prior to printing
Any other character - Single space prior to
printing.
Card Input. This subroutine reads 80 colimms from
a card and stores the information in the I/O buffer in
EBCDIC format.
Subroutines Required. The following subroutines are
required with READZ:
HOLEZ, GETAD, EBCTB, HOLTB
Channel 12 Control. If a punch in channel 12 is
encountered while a line is being printed, a skip
to channel 1 is executed prior to printing the next
line provided the next function is not /004E (no
skip or i^ace prior to printing).
Subroutines Used by FORTRAN (Monitor System) 43
DATA CODE CONVERSION SUBROUTINES
The basic unit of information within the 1130 Comput-
ing System is the 16-bit binary word. This informa-
tion can be interpreted in a variety of ways, depending
on the circumstances. For example, in internal com-
puter operations, words may be interpreted as in-
structions, as addresses, as binary integers, or as
real (floating point) numbers (see Arithmetic and
Functional Subroutines) .
A variety of data codes exists for the following
reasons.
1. The programmer needs a compact notation to
represent externally the bit configuration of each
computer word. This representation is provided
in the hexadecimal notation.
2. A code is required for representing alphameric
(mixed alphabetic and numeric) data within the
computer. This code is provided by the Ex-
tended Binary Coded Decimal Interchange Code
(EBCDIC).
3. The design and operation of the input/output
devices is such that many of them impose a
unique correspondence between character rep-
resentations in the external medium and the
associated bit configurations within the computer.
Subroutines are needed to convert input data
from these devices to a form on which the com-
puter can operate and to prepare computed re-
sults for output on the devices.
This and following sections of the manual de-
scribe the data codes used and the subroutines pro-
vided for converting data representations among
these codes.
A detailed description of the binary, octal, hexa-
decimal, and decimal number systems is contained
in the publication , IBM 1130 Functional Character-
istics (Form A26-5881).
Hexadecimal Notation
IBM Card Code
Perforated Tape and Transmission Code
(PTTC/8)
Console Printer (1053) Code
1403 Printer Code (Monitor System only)
Extended Binary Coded Decimal Interchange
Code (EBCDIC)
A list of these codes is contained in Appendix D.
HEXADECIMAL NOTATION
Although binary numbers facilitate the operations
of computers, they are awkward for the program-
mer to handle. A long string of I's and O's
cannot be effectively transmitted from one individual
to another. For this reason, the hexadecimal num-
ber system is often used as a shorthand method of
communicating binary numbers. Because of the
simple relationship of hexadecimal to binary, num-
bers can easily be converted from one system to
another.
In hexadecimal notation a single digit is used to
represent a 4-bit binary value as shown in Figure 6.
Thus, a 16-bit word in the 1130 System can be ex-
pressed as four hexadecimal digits. For example,
the binary value
llOlOOlllOlllOll
can be separated into four sections as follows:
I
DESCRIPTIONS OF DATA CODES
In addition to the internal 16-bit binary representa-
tion, the conversion subroutines handle the following
codes:
Binary 1101 0011 1011 1011
Hexadecimal D 3 B B
Another advantage of hexadecimal notation is
that fewer positions are required for output data
printed, punched in cards, or punched in paper tape.
In the example above, only four card columns are
required to represent a 16-blt binary word.
44
BINARY
DECIMAL
HEXADECIMAL
0000
0001
1
1
0010
2
2
0011
3
3
0100
4
4
0101
5
5
Olio
6
6
0111
7
7
1000
8
8
1001
9
9
1010
10
A
1011
11
B
1100
12
C
1101
13
D
1110
14
E
nil
15
F
Figure 6 , Hexadecimal Notation
IBM CARD CODE
IBM Card Code can be used as an input/output code
with the 1442 Card Eead Punch, 1442 Card Punch,
and 2501 Card Reader, and as an input code on the
Keyboard.
This code defines a character by a combination
of punches in a card column. Card-code data is
taken from or placed into the leftmost twelve bits of
a computer word as shown below:
PERFORATED TAPE AND TRANSMISSION CODE
(PTTC/8)
The PTTC/8 code is an 8-bit code used with IBM
1134/1055 Paper Tape units. This code represents
a character by a stop position, a check position, and
six positions representing the 6-bit code, BA8421.
PTTC/8 characters can be packed two per computer
word as shown below.
1st
2nd
PTTC/8 Characters ^S B A C 8 4 2 T ^S B A C 8 4 2 l"'
Computer Word | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
The graphic character is defined by a combination
of binary code and case; a control character is de-
fined by a binary code and has the same meaning in
upper or lower case. This implies that upper and
lower case characters must appear in a PTTC/8 mes-
sage wherever necessary to establish or change the
case.
The binary and PTTC/8 codes for l/(lower
case) and =? (upper case) are shown in Figure 7.
The delete and stop characters have a special
meaning (in check mode only) when encountered by
the paper tape subroutinesi.
Card Row
Computer Word
12 11 01234567 8 9 - - - -
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
For example, a plus sign, which has a card
code of 12, 6, 8, is placed into core storage in the
binary configuration Illustrated in the following dia-
gram.
Binary Word
Card Code
]
OOOODOOO
I J : » s * ■ »
1 11 n I n
222222I2
33333333
44444444
iSiSSSSS
CBe66ES|-
77J)77)7
lilKSlf-
999S99Si
1 t 3 4 S • I I
Binary Word
1 0000000 10 100000
A 4 <i
00000001001 10001
1
1 .
s
B
A
C
8
4
2
X
S
B
A
X
C
X
-J
8
4
2
X
Figure 7. PTTC/8 Code for l/(Lower Case) or = ? (Upper Case)
Data Code Conversion Subroutines 45
CONSOLE PRINTER CODE
The Console Printer uses an 8-bit code that can be
packed two characters per 16-bit word.
The following control characters have special
meanings when used with the Console Printer.
Character
Control Operation
HT
Tabulate
RES
Shift to black ribbon
NL
Carrier return to new line
BS
Backspace
LF
Line feed without carrier
return
RS
Shift to red ribbon
Parity bits are not assigned by the hardware.
The conversion subroutine must assign the parity
bits and arrange the characters in the form in which
they are to be printed.
CONVERSION SUBROUTINES
These subroutines convert data to and from 16-bit
binary words and I/O device codes,
BINDC Binary value to IBM Card Code decimal
value.
DCBIN IBM Card Code decimal value to binary
value.
I
EXTENDED BINARY CODED DECIMAL INTER-
CHANGE CODE (EBCDIC)
EBCDIC is the standard code for internal representa-
tion of alphameric and special characters and for the
1132 Printer. This code uses eight binary bits for
each character, thus making it possible to store
either one or two characters in a 16-bit word. Com-
binations of the eight bits allow 256 possible codes.
(At present, not all of these combinations represent
characters.) The complete EBCDIC code is listed in
Appendix D.
For reasons of efficiency, most of the conversion
subroutines do not recognize all 256 codes. The
asterisked codes in Appendix D constitute the subset
recognized by most of the conversion subroutines.
BINHX Binary value to IBM Card Code hexa-
decimal value.
HXBESf IBM Card Code hexadecimal value to
binary value
HOLEB IBM Card Code subset to EBCDIC subset;
EBCDIC subset to IBM Card Code subset.
SPEED IBM Card Code characters to EBCDIC;
EBCDIC to IBM Card Code characters.
PAPEB PTTC/8 subset to EBCDIC subset;
EBCDIC subset to PTTC/8 subset,
PAPHL PTTC/8 subset to IBM Card Code subset;
IBM Card Code subset to PTTC/8 subset,
PAPPR PTTC/8 subset to Console Printer or
1403 Printer code.
1403 PRINTER CODE
The 1403 Printer uses a 6-bit binary code with one
parity bit. Data format is two 7-bit characters per
word, as follows:
Bit
12 3 4 5 6 7
8 9 10 11 12 13 14 15
Value
* P 32 16 8 4 2 1
* P 32 16 8 4 2 1
1st data character
2nd data character
* = Not Used
P = Parity Bit
HOLPR IBM Card Code subset to Console Printer
or 1403 Printer code.
EBPRT EBCDIC subset to Console Printer or
1403 Printer code.
The following conversion tables are used by some of
the conversion subroutines.
PRTY Console Printer and 1403 Printer code.
EBPA EBCDIC and PTTC/8 subsets.
ROLL IBM Card Code subset.
46
The following conversion subroutines are used by the
I DM2 system only.
BIDEC 32-bit binary value to IBM Card Code
decimal value,
DECBI IBM Card Code decimal value to 32-bit
binary value.
ZIPCO Supplement to all standard conversions
except those involving PTTC/8.
The first four listed subroutines and the DM2
-subroutines BIDEC and DECBI change nimieric data
from its input form to a binary form, or from a
binary form to an appropriate output data code. The
last eight (including ZIPCO) convert entire messages,
one character at a time, from one input/output code
to another. The types of conversions accomplished
by these subroutines are illustrated in Figure 8.
Except where specified, these subroutines do not
alter the Accumulator, Extension, Carry and Overflow
indicators, or any index register.
NOTES: 1, All mention of 1403 Printer Code applies
I to the DM2 system only.
2, The conversion subroutines and conversion
tables for the Communications Adapter are described
in the publication IBM 1130 Synchronous Communica-
tions Adapter Subroutines (Form C26-3706). The
subroutines are EBC48, HOL48, and HXCV, The
adapter subroutine conversion table is STRTB.
Error Checking
All code conversion subroutines (except SPEED and
ZIPCO) accept only the codes marked with an asterisk
in Appendix D. An input character that does not con-
form to a specified code is an error.
BINHX and BINDC subroutines do not detect errors.
HXBIN and DCBIN terminate conversion at the point
of error detection; they do not replace the character
in error. The contents of the Accumulator are mean-
ingless when conversion is terminated because of an
error.
The remainder of the conversion subroutines
replace the character in error with a space character,
stored in the output area in output code. Conversion
is not terminated when an error is detected.
When a conversion subroutine detects an error
it turns the Carry indicator o^ and turns the Over-
flow indicator on before returning control to the
CONVERTED
FROM
CONVERTED TO
Binary
IBM Cord
Code (256)
IBM Card
Code
(Subset)
PTTC/8
(Subset)
EBCDIC
(256)
EBCDIC
(Subset)
1132 Printer
Console
Printer
Hex
Equivalent
(Card Code)
Decimal
Equivalent
(Cord Code)
1403
Printer Code
Binary
BINHX
BINDC
BIDEC
IBM Cord
Code (256)
SPEED
ZIPCO*
ZIPCO*
ZIPCO*
IBM Cord
Code (Subset)
PAPHL
HOLEB
HOLPR
HOLPR
PTTC/8
(Subset)
PAPHL
PAPEB
PAPPR
PAPPR
EBCDIC
(256)
SPEED
ZIPCO*
ZIPCO*
EBCDIC
(Subset)
1132 Printer
HOLEB
PAPEB
EBPRT
EBPRT
Hex
Equivolent
(Card Code)
HXBIN
PAPHL
HOLEB
HOLPR
HOLPR
Decimol
Equivolent
(Card Code)
DCBIN
DECBI
PAPHL
HOLEB
HOLPR
HOLPR
1403
Printer Code
ZIPCO*
ZIPCO*
ZIPCO'
Console
Printer Code
ZIPCO*
ZIPCO*
ZIPCO*
* In conjunctio
n with app
roprlote conve
sion table.
Figure 8. Types of Conversion
Data Code Conversion Subroutines 47
user. Otherwise, the settings of the Carry and
Overflow indicators are not changed by the conversion
subroutines.
BINDC
This subroutine converts a 16 -bit binary value to its
decimal equivalent tn five IBM Card Code numeric
characters and one sign character. The five char-
acters and the sign are placed in six computer words
as illustrated below.
Calling Sequence
I/O Locations
Conversion
Data
^
Bits in Co
re Storage
__ .^ 1 «:
Accumulafor
+01538
+
110
10
OUTPT
10
10 10
© 00
OUTPT + 1
10
OUTPT + 2
1
1
6
OUTPT + 3
5
1
i}
OUTPT + 4
3
10
9 5
OUTPT + 5
8
10
S <i <f
Calling Sequence
Label
Op.,ot«n
'
I
Op- .ondi J Brmorti
LX.fiF
fi.x.Al:D.<r
na. ,
o.u.r.P.T, , 1 1 , 1 .,,,,,,, ,
Ojy.r.f.T
3^..^.
s .,,,..
Input
Input is a 16-bit binary value in the Accumulator.
Output
Output is an IBM Card Code sign character (plus or
minus) in location OUTPT, and five IBM Card Code
numeric characters in OUTPT +1 through OUTPT +5.
Errors Detected
The BINDC subroutine does not detect errors.
DCBIN
This subroutine converts a decimal value in five IBM
Card Code numeric characters and a sign character
to a 16-bit binary word. The conversion is the
opposite of the BINDC subroutine conversion.
Ljibel
:
'
op.™*,..™^.
Lifif
o^.f!.r.u.
o.r. .
r,ti.p.ti.r
....
r.W.RD.T
£SiSj_
&
_
Input
Input is an IBM Card Code sign character in location
INPUT and five IBM Card Code decimal characters
in INPUT +1 through INPUT +5.
Output
Output is a 16-bit binary value displayed in the
Accumulator.
Errors Detected
Any sign other than an IBM Card Code plus, amper-
sand, space, or minus, or any decimal digits other
than a space or through 9 is an error. Any con-
verted value greater than +32767 or less than -32768
is an error.
BINHX
This subroutine converts a 16 -bit binary word into
hexadecimal notation in four IBM Card Code char-
acters as illustrated below.
I
I/O Locations
Accumulotor
OUTPT
OUTPT + 1
OUTPT + 2
OUTPT + 3
Conversion Data
A59E
A
5
9
E
Bits in Core Storage
0-« ►-IS
1010 0101 1001 1110
100) 0000 0000 leeg
0000 0001 0000 iSi
0000 0000 oooiiSs
1000 0001 ooooHiii
Calling Sequence
Label
Operation
f
T
Op.rorKbafl™.n..
, , . .
L.L3.P
AT.A/.tf,X
. , , .
Of. .
. , , ,
a,UT,P.T
R.-^..-^,
^.
input
Input is a 16-bit binary word in the Accumulator.
48
Oulput
Calling Sequence
Output is four IBM Card Code hexadecimal digits in
location OUTPT through OUTPT +3.
Errors Detected
The BINHX subroutine does not detect errors.
HXBIN
This subroutine converts four IBM Card Code hexa-
decimal characters into one 16-bit binary word. The
conversion is the opposite of the BINHX subroutine
conversion illustrated above.
L*.,
OfWon
F
:
Op«n»d. & lt«nQ.k>
....
or,
/^aif.. .
Oi".,
LitPiUiT, J
....
r?,n
Oiff
T.f>./J.r.
. > , ,
nr,
fi
....
. , , ,
..
,
1 , 1 1 1 ,
. . , .
-, ,
,
1 , , ,
T.tit.f>.u.r
B.^,<i
<ft
ItU.P.U.T. ,/l,R/r,A
,_
-.
hi
where
e indicates the direction of conversion,
f is the number of characters to be converted,
Calling Sequence
Ubct
^
^
Op.™j.ai:««k.
L.r.B.p-
w.x.rt.r.AT
n.c. .
r.w.P./i.T.
I.AJ.P.U.T
&
Input
Input is four IBM Card Code hexadecimal digits in
INPUT through INPUT +3.
Output
g is the length of the input area, g must be equal
to or greater than f if e is 0. If e is 1, g must
be equal to f/2, or (f+l)/2 if f is odd.
h is the length of the output area, h must be
equal to or greater than f/2 ((f+l)/2 if f is odd)
if e is 0. If e is 1, h must be equal to or greater
than f.
Control Parameter
The control parameter consists of four hexadecimal
digits. Digits 1-3 are not used. The fourth digit
specifies the direction of conversion:
Output is a 16-bit binary word in the Accumulator.
- IBM Card Code to EBCDIC
1 - EBCDIC to IBM Card Code
Errors Detected
Any input character other than an IBM Card Code
through 9 or A through F is an error.
HOLEB
This subroutine converts IBM Card Code subset to
the EBCDIC subset or converts the EBCDIC subset
to IBM Card Code subset. Code conversion is
illustrated below.
I/O Locatii
INPUT
OUTPT
OUTPT + 1
Conversion Data
JL
J
S
Bits in Core Storage
0-" »-15
1101 0001 1110 0010
0101 0000 0000 :^P
0010 1000 0000 mm
Input
Input is either IBM Card Code or EBCDIC characters,
(as specified by the control parameter) starting in
location INPUT. EBCDIC characters must be packed
two characters per binary word. IBM Card Code
characters are stored one character to each binary
word.
Output
Output is either IBM Card Code or EBCDIC characters
starting in location OUTPT. Characters are packed
as described above.
If the direction of the conversion is IBM Card
Code input to EBCDIC output, the input area can
overlap the output area if the address INPUT is equal
Data Code Conversion Subroutines 49
to or greater than the address OUTPT. If the direc-
tion of the conversion is EBCDIC input to IBM Card
Code output, the input area can overlap the output area
if the address INPUT + n/2 is equal to or greater
than the address OUTPT + n, where n is the char-
acter count specified. The subroutine starts proc-
essing at location INPUT.
Character Count
This number specifies the number of characters to be
converted; it is not equal to the number of binary
words used for the EBCDIC characters because those
characters are packed two per binary word. If an odd
count is specified for EBCDIC output, bits 8 through
15 of the last word in the output area are not altered.
Errors Detected
Any input character not asterisked in Appendix D is
an error.
SPEED
This subroutine converts IBM Card Code to EBCDIC
or EBCDIC to IBM Card Code. SPEED accepts all
256 characters defined in Appendix D.
If the input is IBM Card Code, the conversion
time is much faster than that of HOLEB because a
different conversion method is used when all 256
EBCDIC characters are accepted. If the SPEED
subroutine is called before a card reading operation
is completed, the SPEED subroutine synchronizes
with a CARD subroutine read operation by checking
bit 15 of the word to be processed before converting
the word. If bit 15 is a one, the SPEED subroutine
waits in a loop until the CARDO or CARDl subroutine
sets the bit to a zero.
NOTE: SPEED should not be used with READO or
READl since the 2501 subroutines do not pre-store
1 bits in each word of the I/O area. Use HOLEB or
ZIPCO for 2501 operations.
Calling Sequence
Ub.1
a.. '"
Op««ior.
:
:
Op...«b&R.ma.k.
/ .T.BJ^
•s.P.e.E.D. .
, r.,a,L.L, .fi^R.r.n.i.r. .c.r»,iJ,v.f-.p.<:.T.n.u. .
. . . .
n.n. .
. . . .
T.fJ.P.IlT. ,
_L , . ,
O.Ci 1
n.tl.T.P.U.T.
. 1 . ,
n^. .
'
....
•, . .
....
• . , ,
, , , , ^
....
^
IiN,P,UiT
flSi5i_
J
. ,I,fJ.P.U.T. A,e.f.A,
. . , ,
•, . .
, , . .
. ,
....
•, . .
D.U.T.P.T
&&&_
fc
....
_
_^., ,
_
— i... t, L 1 1 1 I
I
where
d indicates whether the EBCDIC characters are
packed or impacked,
e indicates the direction of conversion,
f indicates the character count,
g is the length of the input area,
h is the length of the output area,
g and h are defined as follows:
IBM Card Code to packed EBCDIC
g>f
h >f/2, (f+l)/2
IBM Card Code to unpacked EBCDIC
g > f
h > f
Packed EBCDIC to IBM Card Code
g > f/2, (f+l)/2
h > f
Unpacked EBCDIC to IBM Card Code
g > f
h > f
50
Control Parameter
This parameter consists of four hexadecimal digits.
Digits 1 and 2 are not used. The third digit indicates
whether the EBCDIC code is packed or unpacked.
- Packed, two EBCDIC characters per binary
word
1 - Unpacked, one EBCDIC character per binary
word (left-justified)
The fourth digit indicates the direction of con-
version:
- IBM Card Code to EBCDIC
1 - EBCDIC to IBM Card Code
Input
Input is either IBM Card Code or EBCDIC characters
(as specified by the control parameter) starting in
location INPUT. EBCDIC characters can be packed
or unpacked. IBM Card Code characters are stored
one character to each binary word.
Output
Output is EBCDIC or IBM Card Code characters
starting in location OUTPT. EBCDIC characters can
be packed or unpacked; IBM Card Code characters
are not packed.
The input area should not overlap the output area
because of restart problems that can result from
card feed errors.
I/O Locations
Conversion Data
Bits in Core Storage
0-« p.15
INPUT
-K)
+1
JS
UC J
S DEL
1101 0001 1110 0010
OUTPT
0000 1110 Old 0001
0011 0010 0111 nil
Calling Sequence
LeiHil
OpemtKin
f
H
Operandi A ft>mal»
....
/,r,ft^
, , . .
n.r.
<^,^^d.^..
....
nr,
r.N.P.U.T.
, . , .
0,C,
....
7.C
e
....
....
. , . 1
,, ,
J
r.A/./>.(j.T
/?i,^.5
3. , . . .
....
., .
....
.,
f?,y,r,p,T
BuSlSj
i.
_
. .
__
__
where
d is the case initialization digit,
e indicates the direction of conversion,
f indicates the character coimt,
g is the length of the input area, g must be equal
to or greater than f/2 or (f+l)/2.
h is the length of the output area, h must be
equal to or greater than f/2 or (f+l)/2.
Character Coimt
This parameter specifies the number of EBCDIC or
IBM Card Code characters to be converted. If the
character count is odd and the output code is EBCDIC,
bits 8 through 15 of the last word are unaltered.
Errors Detected
Any input character code not listed in Appendix D is
an error. All IBM Card Code punch combinations,
except multiple pimches in rows 1-7, are legal.
Control Parameter
This parameter consists of four hexadecimal digits.
Digits 1 and 2 are not used. The third digit indicates
whether or not the case is to be initialized before
conversion begins:
— Initialize case
1 ~ Do not alter case
The fourth digit indicates the direction of conversion:
- PTTC/8 to EBCDIC
1 - EBCDIC to PTTC/8
PAPEB"
This subroutine converts PTTC/8 subset to EBCDIC
subset or EBCDIC subset to PTTC/8 subset. PAPEB
conversion of EBCDIC to PTTC/8 with the initialize
case option selected is illustrated below.
inpuf
Input (either PTTC/8 or EBCDIC characters, as
specified by the control parameter) starts in location
INPUT. Characters are packed two per 16-bit com-
puter word in both codes.
Data Code Conversion Subroutines 51
Output
Output is either EBCDIC or PTTC/8 characters
starting in OUTPT. Characters in either ccxie
are in packed format. The subroutine starts proc-
essing at location INPUT.
If the output is in EBCDIC, overlap of the input
and output areas is possible if the address INPUT is
equal to or greater than the address OUTPT.
If the output is in PTTC/8, overlap of the input
and output areas is not recommended because the
number of output characters might be greater than
the number of input characters.
Character Count
This parameter specifies the number of PTTC/8 or
EBCDIC characters in the input area. The count
must include case shift characters even thoi^h they
will not appear in the output. Because the input is
packed, the character count will not be equal to the
number of binary words in the input area. If an odd
number of output characters is produced, bits 8-15 of
the last word used in the output area are set to a
space character if the output is EBCDIC, or to a de-
lete character if the output is PTTC/8.
There is no danger of overflowing the output
area if the number of words in a PTTC/8 output area
is equal to the number of characters in the input area.
If the input is in EBCDIC, all data and control
characters are converted to output. The user should
not^ specify case shifting in his input message; this is
handled automatically by the PAPEB subroutine.
Case shift characters are inserted in a PTTC/8
output message where needed to define certain
graphic characters that have the same binary value
and are differentiated only by a case mode character.
For example, the binary value 0101 1011 (5B), is in-
terpreted as a $ in lower case and an .' in upper
case (see Appendix D).
If the initialize option is selected, the case shift
character needed to interpret the first graphic char-
acter is inserted in the output message and the case
mode is initialized for that mode. If the do-not-
alter option is selected, the case mode remains set
according to the last case shift character required
in the previous LIBF message, i. e. , no case shift
is forced.
If a case shift character appears in the input
message, it is output but does not affect the case
mode. If it is an upper case shift (UC) and the next
input character requires an upper case shift, the
subroutine still inserts an upper case shift into the
message, i. e. , two UC characters will appear in the
output message.
The conversion is halted when the character
count is decremented to zero or when a new line
(NL) control character is read.
I
Errors Detected
Any input character that is not marked with an aster-
isk in Appendix D is an error.
Subroutine Operation
IE the input is in PTTC/8 code, all control characters
(except case shift (LC or UC) characters) are con-
verted to output. Case shift characters only define
the case mode of the graphic characters that follow.
If the initialize option is selected, the case is
set to lower. All characters are interpreted as
lower case characters until an upper case shift (UC)
character is encountered. K the do-not-alter option
is selected, the case remains set according to the
last case s|iift character encountered in the previous
LIBF message.
PAPHL
This subroutine converts PTTC/8 subset to IBM
Card Code subset or IBM Card Code subset to
PTTC/8 subset. The relationship of the two codes
for converting PTTC/8 to IBM Card Code is
illustrated below.
I/O Locations
Conversion Data
Bits in Core Storage 1
INPUT
UC J
0000
1110 0101 0001
S T
0011
0010 OOIO 0011
OUTPT
J
0101
0000 0000 0000
OUTPT +1
S
0010
1000 0000 0000
OUTPT +2
T
0010
0100 0000 0000
52
Calling Sequence
Output
""
Operation
'
T
Op««lt R Renwru
t,V,ff
F
p.a.p,u.L. .
n,r,
.r,n,fJ,T,e,n,i , ,p,&,e,a,hAFiT,F,e. .
n,r,
r.A/.p.i/.T. ,
,r,UP.llT. .A.f?.FJl, ,A.D.O.J?.£.S.S,
, . , .
pi^i
fTi(/
T,P.U.T.
. . , ,
or,
fl
1
.
1
. . , .
•,
1
,,,,,,,
SSjSj
^,
,, ,
_
. . . ,
•,
,
....
.,
1
n.ar.P.T
«.•?,«?.
hi
.n.ar.P,iJ.T, .A,e.i:,A,
1
L
, , 1
,
_- 1, '
where
d is the case initialization digit,
e indicates the direction of conversion,
f indicates the character count,
Output is either IBM Card Code or PTTC/8 code
characters starting in location OUTPT. PTTC/8
codes are packed two per binary word; IBM Card
Code characters are not packed.
If the conversion is IBM Card Code input to
PTTC/8 output, the input area may overlap the output
area if the address INPUT is equal to or greater than
the address OUTPT. Case shift characters are in-
serted in the output message where needed to define
certain graphic characters (see PAPEB).
If the conversion is PTTC/8 input to IBM Card
Code output, the input area may overlap the output
area if the address INPUT + n/2 is equal to or
greater than the address OUTPT + n, where n is
the character count. The subroutine starts proces-
sing at location INPUT.
g is the length of the input area, g must be equal
to or greater than f if e is 0. If e is 1 , g must be
equal to f/2, or (f+l)/2 if f is odd.
h is the length of the output area, h must be equal
to or greater than f/2 ((f+l)/2 if f is odd) if e is 0.
If e is 1 , h must be equal to or greater than f .
Control Parameter
This parameter consists of four hexadecimal digits.
Digits 1 and 2 are not used. The third digit indicates
whether or not the case is to be initialized before
conversion begins:
- Initialize case
1 - Do not alter case
The fourth digit indicates the type of conversion :
Character Coimt
This parameter specifies the number of PTTC/8 or
EBCDIC characters in the input area. The coimt
must include case shift characters, even though they
will not appear in the output. Because the input
may be packed, the character count may not be equal
to the number of binary words in the input area.
There is no danger of overflowing the output
area if the number of words in the output area is
equal to the number of characters in the input area.
Errors Detected
Any input character not marked by an asterisk in
Appendix D is an error.
- PTTC/8 to IBM Card Code
1 - IBM Card Code to PTTC/8
Subroutine Operation
Input
Input is either PTTC/8 or IBM Card Code characters
(as specified by the control parameter starting in
location INPUT. PTTC/8 characters are packed two
per binary word; IBM Card Code characters are not
packed.
Case and shift character handling is described imder
PAPEB.
If an odd nimiber of PTTC/8 output characters is
produced, bits 8-15 of the last used word in the out-
put area are set to a delete character.
The conversion is halted when the character count
is decremented to zero or when a new line (NL)
control character is read.
Data Code Conversion Subioutines 53
PAPPE
The fourth digit determines the output printer code.
This subroutine converts PTTC/8 subset to either
Console Printer or 1403 Printer code. The conver-
sion to 1403 Printer code is illustrated below.
I/O
Locations
Conversion
Dafa
Bits in Core Storage
0- ^15
INPUT
INPUT+1
UC J
LC i
0000 1110 0101 0001
0110 1110 0101 1011
OUTPT
J $
0101 1000 0110 0010
Calling Sequence
Ldbtl
OpeKDlon
:
:
Op.rand. S (t*™l«
, , , ,
L.IAC
FtA,F,F,/?
,
, . , ,
nr. .
/,fi.^H.tf
1
. r:,n,u,T.er>iL , <p,A,e,aM,p,T.F,p.
r),r,
TMJ>.U.T
. ,T.kl,P.ti.-r. .axt.FJl, ii9.r>.i7j?.^.<;.<;, . . , .
. , , ,
ar,
OiU
1
, , , ,
n,r,
fl
,
, . . .
,
....
., .
,
,,,,,,
....
., ,
,
, , ^ ,
TM.P.U.T
Si£^
9t
,
',
1
. . , 1
1 i , , , ,
n.ti.T.Pn-
fliS.S
hi
. .n.f/,T,P.//,T. \A,e,p.a ,
,
where
d is the case initialization digit,
e is the output printer code digit,
f is the number of characters in the input area to
be converted,
g is the length of the input area, g must be equal
to or greater than f/2 if the character count is
even, (f + l)/2 if the character count is odd.
h is the length of the output area, h must be
equal to or greater than f/2, minus the number of
paper tape control characters in the input area,
plus 1 if the result is odd.
Control Parameter
This parameter consists of four hexadecimal digits.
Digits 1 and 2 are not used. The third digit indicates
whether or not the case is to be initialized before
conversion begins:
- Initialize case
1 - Do not alter case
- Console Printer code
1 - 1403 Printer code
Input
Input consists of PTTC/8 characters starting in lo-
cation INPUT. PTTC/8 characters are packed two
per binary word- All control characters except case
shift (LC or UC) characters are converted to output.
Case shift characters are used only to define the case
mode of the graphic characters that follow.
Output
Output consists of either Console Printer or 1403
Printer characters starting in location OUTPT. This
code is packed two characters per binary word. If
overlap of the input and output areas is desired, the
address INPUT must be equal to or greater than the
address OUTPT. This is necessary because the
subroutine starts processing at location INPUT.
Character Count
This parameter specifies the number of PTTC/8
characters in the input area. The coimt must include
case shift characters, even though they do not appear
in the output. Because the input is packed, the char-
acter count is not equal to the number of binary words
in the input area.
If an odd number of output characters is produced,
bits 8-15 of the last used word in the output area are
set to a space character.
The conversion is halted when the character count
is decremented to zero or when a new line (NL)
control character is read.
Errors Detected
Any input character not marked by an asterisk in
Appendix D is an error.
HOLPB
This subroutine converts IBM Card Code subset to
either Console Printer or 1403 Printer code. The
conversion to 1403 Printer code is illustrated below.
54
I/O
Locations
Conversion
Data
Bits in Core Storage
INPUT
INPUT+1
J
0101 0000 0000 OOOO
0010 0100 0010 0000
OUTPT
J,
0101 1000 0001 0110
Calling Se
guence
Output
Output consists of either Console Printer or 1403
Printer characters, starting in location OUTPT. The
code is packed two characters per binary word.
The input area may overlap the output area if the
address INPUT is equal to or greater than the address
OUTPT. The subroutine starts processing at lo-
cation INPUT.
Lite)
<*"-'•"
'
'
Operomb S Rsmorfa
LJL&f^
f^,n.i,P.e. .
, , .Cxa.L.i, .r.,A.e.n, ,r.rt,n.^, .r..nM.v.^je^*i,i.rt.kt, ,
fy.r.
/^AeLfi, .
OUJ.TP.T. .
.
, , 1 1 , ■ I .
-.
, , ,
3
, , , t , ,. i 1 , , , I
,
,
h
. . .n.UT,p.iiT, .a.p.f^.a
,_
where
e is the output printer code digit,
f is the number of characters in the input area
to be converted,
g is the length of the input area, g must be equal
to or greater than f.
h is the length of the output area, h must be
equal to or greater than f/2.
Control Parameter
This parameter consists of four hexadecimal digits.
Digits 1-3 are not used. The fourth digit determines
the output printer code.
Input
Console Printer code
1403 Printer code
Input consists of IBM Card Code characters, starting
In location INPUT. The characters are not packed.
Character Coimt
This number specifies the number of IBM Card Code
characters to be converted and is equal to the number
of words in the input area. If an odd count is speci-
fied, bits 8-15 of the last word used in the output
area are not altered.
Errors Detected
Any input character not marked with an asterisk in
Appendix D is an error.
EBPRT
This subroutine converts EBCDIC subset to either
Console Printer or 1403 Printer Code. The con-
version to 1403 Printer code is shown below.
I/O
Locations
INPUT
INPUT+1
OUTPUT
OUTPT + 1
Conversion
Data
LE
ES
LE
ES
Core Storage Bits
0— ' — ^15
1101 0011 1100 0101
1100 0101 1110 0010
0001 1010 0110 lOOO
0110 1000 0000 1101
Calling Sequence
tobel
Op.™.i=-.
^
'
Operandi & Koinarkl
f\r..
Tt/J.f>.iA-r, .
T.AJ.P./I.T. ,i,tz,F.A, ,a.aDjr,^^s.,
f, . .
1
J
,
,
<4. . .
1
,
O.tl.T.f.T
h> . ,
nu.r.p.u.Ti .ja.jp|£A
,
Data Code Conversion Subroutines 55
where
e is the output printer code digit,
f is the number of characters in the input area to
be converted,
g is the length of the input area, g must be equal
to or greater than f/2.
h is the length of the output area, h must be equal
to or greater than f/2.
Control Parameter
bits may cause print checks if they comprise an
illegal character.
Errors Detected
Any input character not marked with an asterisk in
Appendix D is an error.
BIDEC .
This subroutine converts a 32 -bit binary value to its
decimal equivalent in ten IBM Card Code numeric
characters and one sign character. The conversion
is illustrated below.
This parameter consists of four hexadecimal digits.
Digits 1-S are not used. The fourth digit determines
the output printer code.
— Console Printer code
1 —1403 Printer code
I/O
Locations
Accumulator
Extension
Conversion
Data
+0016777218
Core Storage Bits
0- ►IS
0000 0001 0000 0000
0000 OOOO 0000 0010
Input
Input consists of EBCDIC characters starting in
location INPUT. EBCDIC characters are packed
two per word.
Output
Oulput consists of either Console Printer or 1403
Printer code starting in location OiItPT. The code
is packed two characters per binary word.
The address INPUT must be equal to or greater
than the address OUTPT if overlap of the input and
output areas is desired. The subroutine starts
processing at location INPUT.
I/O
Locations
Conversion
Data
Core Storage Bits
OUTPT
+
1000 0000 1010 oooq
OUTPT + 1
0010 0000 0000 0000
OUTPT +2
0010 0000 OOOO 0000
OUTPT +3
1
0001 OOOO OOOO OOOO
OUTPT +4
6
OOOO OOOO 1000 OOOO
OUTPT +5
7
OOOO OOOO 0100 OOOO
OUTPT +6
7
OOOO OOOO 0100 OOOO
OUTPT +7
7
OOOO OOOO 0100 OOOO
OUTPT +8
2
OOOO 1000 OOOO OOOO
OUTPT +9
1
0001 OOOO OOOO OOOO
OUTPT + 10
B
OOOO OOOO 0010 OOOO
Character Coimt
This parameter specifies the number of EBCDIC
characters to be converted. This coimt is not equal
to the number of words in the input area. If an odd
count is specified, bits 8-15 of the last word used
in the output area are not altered; however, these
C ailing Sequence
Lobar
Operation
'
I
Op.™rd. A (t,™,,*,
o.c, ,
rkikTJ>,it.T.
-. . ■
>,.,,,,■
J . . ,
• , . .
0,u.r.Prr
ftJdA.
.1.-^
. •aU.T.P.U.T,
a,R,e>A
56
Input
Output
Input is a 32-bit binary value in the Accumulator and
Extension.
Output is a 32-bit binary word, containing the con-
verted value, in the Accumulator and Extension.
Output
Output is an IBM Card Code sign character (+ or -)
in location OUTPT, and ten IBM Card Code numeric
characters in OUTPT +1 through OUTPT+10."
Error s Detected
The BIDEC subroutine does not detect errors.
DECBI
This subroutine converts a decimal value consisting
of ten IBM Card Code numeric characters and a sign
character to a 32 -binary word. This subroutine is
the opposite of the BIDEC subroutine (see above)
except that fewer than ten characters may be
specified.
Calling Sequence
Ubol
F
^
Op««<l. & lt««l.>
LJu&P
M
1
^
1
1
1
.
1 . 1 1
, ,
1
.
....
, , , ,
,
M/Enr.Af.T
n.r.
a.
1
yJTi.e.n,
r.tn,t i.kiT.
1
. , , .
, , , , , ,
,
,
1
1
AS,.«5
h» .
,TM,P.HT
1
L_J_
u-
^
where
a is the nimiber of characters to be converted not
including the sign character,
b is the length of the input area, b must be equal
to at least a plus 1.
Input
Input is an IBM Card Code sign character in location
INPUT, the address (WDCNT) of the number of
characters (1 to 10) to be converted, and specified
number of characters in IBM Card Code in locations
nSTPUT+l through INPUT+N (where N = 1, 2, ... 10).
Errors Detected
Any of the following conditions causes the Overflow
indicator to be turned on, the Carry indicator to be
turned off, and an immediate exit to be made back
to the caller:
1. Any sign other than a plus, minus, blank, or
ampersand.
2. Any character other than a space or through 9.
3. Any converted value greater than +2, 147, 483, 647
or less than -2,147,483,648.
ZEPCO
This subroutine supplements all standard conversions
except those involving PTTC/8 code. It offers the
user the option of supplying his own conversion
tables and codes. ZIPCO uses direct table access
and is considerably faster than the other conversion
subroutines.
Calling Sequence
Lobsl
Opera) ron
r
T
OperoiKk & Renxirki
\L.I.ff.P
/■iA.<-,rf,i?, .
O.C.
, ,r.u.p.if.T. ,A,ie.^ia, .A.n.n.p.fr^'i^'z,
n.r.
f, . . .
, , ,
'.
. , , ,
._
SiSiS.
<1. . 1 ,
.
.,,,,,
,
■ . . .
, , ,
;__|
where
b is the input code digit,
c is the packed input digit,
d is the output code digit,
e is the packed output digit,
f is the number of characters to be converted,
g is the length of the input area,
Data Code Conversion Subroutiiies 57
h is the length of the output area,
j is the name of the conversion table to be used.
This CALL is not executed; however, it is
required following the character count parameter
to cause the loading of the desired conversion
table, provide the address of that table to ZIPCO,
and provide ^formation required by ZIPCO for
the return to the calling program.
Control Parameter
This parameter consists of four hexadecimal digits
as follows.
Digit 1
Digit 2
Digit 3
Digit 4
1 for 12 -bit IBM Card Code input
for all other types of input
1 for unpacked input
for packed input
1 for 12 -bit IBM Card Code output
for 8-bit IBM Card Code and all
other types of output
1 for unpacked output
for packed output
Input
Input consists of packed or unpacked characters in
the code specified by the conversion table and
starting at location INPUT.
Output
Output consists of packed or impacked characters in
the code specified by the conversion table and
starting at location OUTPT,
Character Count
This parameter specifies the nimiber of input
characters to be converted. If an odd count is
specified with packed input, bits 8-15 of the last word
used in the output area are not altered.
Table
The type of conversion is determined by the table
called with ZIPCO. The user may call one of the
IBM-supplied conversion tables or he may supply
his own.
The following IBM-supplied System Library
tables may be called with ZIPCO.
EBCCP - EBCDIC to Console Printer Code.
EBHOL - EBCDIC to IBM Card Code.
EBPT3 - EBCDIC to 1403 Printer code.
CPEBC - Console Printer code to EBCDIC.
CPHOL - Console Printer code to IBM Card
Code.
CPPT3 - Console Printer code to 1403
Printer code.
HLEBC - IBM Card Code to EBCDIC.
HOLCP - IBM Card Code to Console Printer
code.
HLPT3 - IBM Card Code to 1403 Printer code.
PT3EB - 1403 Printer code to EBCDIC.
PT3CP - 1403 Printer code to Console Printer
Code.
PTHOL - 1403 Printer code to IBM Card Code.
Each conversion table consists of 256 characters —
128 words with two 8-bit characters per word. The
seven low-order bits of the character to be converted
(input character) are used as an address. The
address designates the position in the table of the
corresponding conversion character. The high-
order bit (bit 0) of the input character designates
which half of the table word is to be used. When
bit is 1 , the left half of the word is used. When
bit is 0, the right half of the word is used. All
dmnmy entries of the IBM-supplied tables contain
the code for a blank.
The following is an example of the conversion
performed by ZIPCO. The tables show (1) the
input EBCDIC values, (2) the table EBPT3 used for
the conversion, and (3) the output characters in
1403 Printer code.
58
Input Location
Value
INPUT
INPUT+1
INPUT +2
nil 0010 0111 0010
0000 0000 1000 0000
0111 nil nil 1111
Table Location
Value
EBPT3
0111 nil 0111 nil
EBPT3 + 1
0111 nil 0111 nil
EBPT3 + 113
0000 0001 0111 1 1 1 1
EBPT3 + 127
0111 nn 0111 nil
1403 Print
Output Location
Value
Character
OUTPT
OOOO 0001 0111 nil
2, b
OUTPT+1
0111 nil oni nil
b, b
OUTPT +2
oin nil 0111 nil
b, b
When 12-bit IBM Card Code is specified as input
(or output), ZEPCO performs a packing (or unpacking)
of the character to 8-bits.(or 12 bits). The 1-7 row
punches on the card are expressed as a 3-bit hexa-
decimal number (there can never be more than one
pimch between the 1 and 7 row) . In this format a 1
pvinch would be expressed as 001, a 7 punch as 111.
The punches in the other card rows: 12, 11, 0, 8,
and 9, are transferred directly.
For example, take the IBM Card Code character
"+" which is a 12, 6, S punch.
IBM Coid-Code
12 II 01 2345 6789
1 000 0000 1010
iir
10 110
■^ii
1
Compressed ZIPCO Fomnot
10 1 10 10
Errors Detected
No errors are detected by ZIPCO.
Data Code Conversion Subroutines 59
ARITHMETIC AND FUNCTIONAL SUBROUTINES
The IBM 1130 Subroutine/System Library includes
the arithmetic and functional subroutines that are the
most frequently required because of their general
applicability. There are 44 subroutines, some of
which have several entry points.
Table 6 lists the arithmetic and functional sub-
routines that are included in the Subroutine/System
Library.
of 100 + 128, or 228. Since 128io = SOig the char-
acteristic of a nonnegative exponent always has a
1-bit in position 1, while the characteristic of a
negative exponent always produces a 0-bit In position
1. A normal zero consists of all zero bits in both the
characteristic and the mantissa.
Extended Precision Format
REAL DATA FORMATS
Many of the IBM 1130 arithmetic and fvmctional sub-
routines offer two ranges of precision: standard
and extended. The standard precision provides 23
significant bits , and the extended precision provides
up to 31 significant bits.
To achieve correct results from a particular
subroutine, the input arguments must be in the
proper format.
Standard Precision Format
Standard precision real numbers are stored in core
storage as shown below:
15 Most Significant Bits of Mantissa
1 15
8 Least Significant
Bits of Mantissa
Characteristic
1st Word
2nd Woix)
7 8 15
Numbers can consist of up to 23 significant bits
(mantissa) with a binary exponent ranging from -128
to +127. Two adjacent storage locations are re-
quired for each number. The first (lowest) location
must be even-numbered. The sign of the mantissa is
in bit zero of the first word. The next 23 bits repre-
sent the mantissa (2's complement if the number is
negative) and the remaining 8 bits represent the char-
acteristic. The mantissa is normalized to fractional
form, i. e. , the implied binary point is between bits
zero and one.
The characteristic is formed by adding +128 to
the exponent. For example, an exponent of -32 Is
represented by a characteristic of 128-32, or 96. An
exponent of +100 Is represented by a characteristic
Extended precision real numbers are stored in
three adjacent core locations as shown below:
1st Word
2nd Word
3rd Word
Unused
Characteristic i
7 8
15
S
Mantissa 1
15
Mantissa
15
Nimibers can consists of up to 31 significant bits with
a binary exponent ranging from -128 to +127; however,
normalization can, in some cases, cause the loss of
1 bit of significance.
Bits zero through seven of the first word are
unused; bits eight through 15 of the first word repre-
sent the characteristic of the exponent (formed in the
same manner as in the standard range format) ; bit
zero of the second word contains the sign of the man-
tissa; and the remaining 31 bits represent the man-
tissa (2's complement if the number is negative).
Real Negative Number Representation
Real negative numbers differ from real positive
numbers in only one respect; the mantissa is always
the 2s complement of the equivalent positive value.
Example:
+. 53125 is represented In core as 44000080
-. 53125 is represented in core as BC000080
+4, is represented in core as 40000083
-4. Is represented in core as C0000083
60
Note that a real negative number is never represent-
ed by a value of SOOOOOxx, where xx is any character-
istic between 00 and FF. The mantissa value of
800000 is its own 2s complement and therefore lies
outside the definition of a real negative nvunber, i. e. ,
the 2s complement of its absolute value.
Fixed Point Format
Fractional niunbers, as applied to the fixed-point sub-
routines, XSQR, XMDS, XMD, and XDD, are defined
as binary fractions with implied binary points of
zero. That is, the binary point is positioned between
the sign (bit 0) and the most significant bit (bit I).
The user can consider the binary point to be in
any position in his fixed-point numbers. To correctly
Table 6. Arithmetic and Functional Subroutines
interpret the results the following rules must be
observed.
1. Only numbers with binary points in equivalent
positions can be correctly added or subtracted.
2. The binary point location in the product of two
numbers is the sum of the binary point locations
of the multiplier and the multiplicand.
3. The binary point location in the quotient of two
numbers is the difference between the binary
point locations of the dividend and the divisor.
The binary point location in a number that is
input to the fixed-point square root subroutine
(XSQR) must be an even number from 0-14.
The binary point location in the output root
is half the binary point location of the input
number.
4.
SUBROUTINE
NAME
ReoKFIoating Point)
Standard Precision
Extended Precision
Add/Subtract
*FADD/*FSUB
*EADD/*ESUB
Multiply
♦FMPY
*EMPY
Divide
*FDIV
*EDIV
Load/Store FAC
•FLD/*FSTO
*ELD/*ESTO
Trigonometric Sine/Cosine
FSINEACOSN, FSIN/FCOS
ESINE/ECOSN, ESIN/ECOS
Trigonometric Arctongent
FATN, FATAN
EATN, EATAN
Square Root
FSQR, FSQRT
ESQR, ESQRT
Natural Logarithm
FLN, FALOG
ELN, EALOG
Exponential (e")
FXPN, FEXP
EXPN, EEXP
Hyperbolic Tangent
FTNH/FTANH
ETNH/ETANH
Real Base to an Integer Exponent
*FAXI
*EAXI
Reol Base to a Real Exponent
*FAXB
*EAXB
Real to Integer
IFIX
IFIX
Integer to Real
FLOAT
FLOAT
Normalize
NORM
NORM
Real Binary to Decimal/Real Decimal
FBTD/FDTB
FBTD/FDTB
to Binary
Real Arithmetic Range Check
FARC
FARC
Fixed -Point
Integer Base to an Integer Exponent
*FIXI
*FIXI
Fixed-Point Square Root
XSQR
XSQR
Fixed-Point Fractional Multiply (short)
XMDS
Fixed-Point Double Word Multiply
XMD
XMD
Fixed-Point Double Word Divide
XDD
XDD
Special Function
Real Reverse Subtract
*FSBR
*ESBR
Real Reverse Divide
•FDVR
*EDVR
Real Reverse Sign
SNR
SNR
Real Absolute Value
FAVL, FABS
EAVL, EABS
Integer Absolute Value
lABS
lABS
Miscellaneous
Get Parometers
FGEP
EGETP
NOTE: By adding an X fo those names prefixed wit
to the address of the argument specified in the subro
FADDX would be the modified form of FADD.
h an asterisk, the user can cause the contents of Index Register 1 to be added
utine calling sequence to form the effective argument address. For example.
Arithmetic and Functional Subroutines 61
REAL NUMBER PSEUDO-ACCUMULATOR
IBM 1130 real ntunber subroutines sometimes
require an accumulator that can accommodate
numbers in real number format. Since all of the
1130 registers are only 16 bits in length, a pseudo-
accumulator must be set up to contain two- or three -
word real numbers. The pseudo accumulator (desig-
nated FAC for floating accumulator) is a three-word
register occupying the three highest locations of the
Transfer Vector(see IBM 1130 Assembler Language,
C26-5927). The user can refer to these words by
using Index Register 3 plus a fixed displacement
(XR3 + 125, 126, or 127). The format of the FAC
is shown below
than one type of arithmetic or ftinction. For example,
FSIN and FCOS are different entry points to the same
subroutine. Each subroutine is listed in Table 6
with the corresponding entry points.
1
1 Characteristic
Mantissa
Mantissa
i
FAC
(XR3 + 126)
The effective address of the mantissa is always
even.
NOTE: Arithmetic and functional subroutines do not
save and restore the contents of the 1130 Accumulator
or the Extension. The calling program should pro-
vide for this if the contents are significant. When
execution begins, all three words of FAC contain
zeros.
CALLING SEQUENCES
The arithmetic and functional subroutines are called
via a CALL or LIBF statement (whichever is re-
quired) followed, in some cases, by a DC statement
contsiining the actual or symbolic address of an
argument. In the descriptions that follow, the nota-
tions (ARG) and (FAC) refer to the contents of the
operand rather than its address. The name FAC
refers to the real nimiber pseudo-accimiulator. The
extended precision subroutine names are prefixed
with the letter E (subroutines that handle both
precisions have the same name and do not have a
prefix).
Note also that some of the functional subroutines
can be called via two different calling sequences.
One calling sequence assumes the argument is in
FAC ; the other specifies the location of the argument
with a DC statement.
In addition, some subroutines can have indexed
linkage to the argument. The calling sequence is the
same except for the subroutine name which .contains
an X suffix. Also, some subroutines perform more
Real Add
LIBF
DC
Input
Result
Real Subtract
LIBF
DC
Input
Result
Real Multiply
LIBF
DC
Input
Result
Real Divide
LIBF
DC
Input
Result
FADD, FADDX, EADD or EADDX
ARG
Real augend in FAC
Real addend in location ARG
(FAC) + (ARG) replaces (FAC)
FSUB, FSUBX, ESUB or ESUBX
ARG
Real minuend in FAC
Real subtrahend in location ARG
(FAC) - (ARG) replaces (FAC)
FMPY, FMPYX, EMPY or EMPYX
ARG
Real multiplicand in FAC
Real multiplier in location ARG
(FAC) times (ARG) replaces (FAC)
FDIV, FDIVX, EDIV or EDIVX
ARG
Real dividend in FAC
Real divisor in location ARG
(FAC) / (ARG) replaces (FAC)
NOTE: On a divide by zero, the divide check indica-
tor is turned on, the dividend is not changed, and the
dividend remains in FAC.
Load FAC
LIBF
FLD, FLDX, ELD or ELDX
DC
ARG
Input
Real number in location ARG
Result
(ARG) replaces (FAC)
Store FAC
LIBF
FSTO, FSTOX, ESTO or ESTOX
DC
ARG
Input
Real number in FAC
Result
(FAC) replaces (ARG)
62
Real Trigonometric Sine
CALL FSINE or ESINE
Input Real argument (in radians)
in FAC
Result Sine of (FAC) replaces (FAC)
or
CALL FSIN or ESIN
DC ARG
Input Real argument (in radians)
in location ARG
Result Sine of (ARG) replaces (FAC)
Real Trigonometric Cosine
CALL FCOSN or ECOSN
Input Real argument (in radians)
in FAC
Result Cosine of (FAC) replaces (FAQ
CALL FSQRT or ESQRT
DC ARG
Input Real argument in location
ARG
Result Square root of (ARG) replaces (FAC)
Real Natural Logarithm
CALL FLN or ELN
Input Real argument in FAC
Result Log (FAC) replaces (FAC)
CALL FALOG or EALOG
DC ARG
Input Real argument in location
ARG
Result Log (ARG) replaces (FAC)
Real Exponential
or
CALL FCOS or ECOS
DC ARG
Input Real argument (in radians)
in location ARG
Result Cosine of (ARG) replaces (FAC)
Real Trigonometric Arctangent
CALL FATN or EATN
Input Real argument in location ARG
Result Arctangent of (FAC) replaces (FAC) ;
the result lies within the range
±-^ radians (±90 degrees)
or
CALL FATAN or EATAN
DC ARG
Input Real argument in location
ARG
Result Arctangent of (ARG) replaces (FAC) ;
the result lies within the range
±-^ radians (±90 degrees)
Real Square Root
CALL FSQR or ESQR
Input Real argument in FAC
Result Square root of (FAC) replaces (FAC)
CALL FXPN or EXPN
Input Real argument in FAC = n
Result e"^ replaces (FAC)
or
CALL FEXP or EEXP
DC ARG
Input Real argument in location
ARG = n
Result e'^ replaces (FAC)
Real Hyperbolic Tangent
CALL FTNH or ETNH
Input Real argument in FAC
Result TANH (FAC) replaces (FAC)
or
CALL FTANH or ETANH
DC ARG
Input Real argument in location
ARG
Result TANH (ARG) replaces (FAC)
Real Base to an Integer Exponent
LIBF FAXI, FAXIX, EAXI, or EAXK
DC ARG
Input Real base in FAC
Integer exponent in location ARG
Result (FAC), raised to the exponent
(ARG), replaces (FAC)
Arithmetic and Functional Subroutines 63
Real Base to a Real Exponent
CALL
FAXB, FAXBX, EAXB or EAXBX
DC
ARC
Input
Real base in FAC
Real exponent in location
ARG
Result
(FAC) raised to the exponent
(ARG) replaces (FAC)
Real to Integer
LIBF
IFK
Input
Real nximber in FAC
Result
Diteger in the Accumulator
Integer to Real
LIBF
FLOAT
Input
Integer in the Accumulator
Result
Real number in FAC
Normalize
TTRF
NORM
Input
Real unnormalized
number in FAC
Result The mantissa portion of FAC is
shifted until the most significant bit
resides in bit position 1. The char-
acteristic is changed to reflect the
number of bit positions shifted.
Real Binary to Decimal
CALL FBTD
DC LDEC
Input Real number in FAC
Result A string of EBCDIC-coded data starting
at location LDEC. Each EBCDIC
character occupies the rightmost 8 bits
of a word. The last character of the
string is a blank.
The output format is exactly as follows:
sd.ddddddddEsddb
where:
s represents a sign (plus or minus)
d represents one of the decimal digits
0-9
b represents a blank
Real Decimal to Binary
CALL FDTB
DC LDEC
Input A string of EBCDIC coded data at
location LDEC. Each EBCDIC charac-
ter occupies the rightmost 8 bits of a
word. The first character of the input
must be the sign (plus or minus). Fol-
lowing the sign, one to nine decimal
digits (0-9) may be specified. The
decimal point may appear before, with-
in, or after the decimal digits.
Immediately after the last decimal digit
(or decimal point) , the exponent is
specified as follows.
Esddb
where:
s represents the sign of the exponent
(plus or minus)
d represents one of the decimal digits
(0-9)
b represents a blank (the blank is
required to indicate the end of the
string)
No embedded blanks may appear in the
input string as the first blank is
interpreted as the end of the data.
Result Real number in FAC
Real Arithmetic Range Check
LIBF FARC
Result This subroutine checks for real
number overflow or imderflow, and
sets programmed indicators for
interrogation by a FORTRAN program.
Integer Base to an Integer Exponent
LIBF FDa or FKIX
DC ARG
Input Integer base in the Accumulator
Integer exponent in location ARG
Result (Accumulator) raised to the exponent
contained in ARG replaces
(Acctmiulator)
64
Fixed-Point Square Root
CALL XSQR
Input Fixed-point fractional argument (16
bits only) in the Accumulator.
Result Square root of (Accumulator) replaces
(Accumulator). If the argument is
negative the absolute value is used
and the Overflow indicator is turned
ON.
Fixed-Point Double-Word Multiply
Real Reverse Subtract
LIBF
FSBR, FSBRX, ESBR or ESBRX
DC
ARG
Input
Real minuend in location ARG
Real subtrahend in FAC
LIBF
Input
Result
XMD
Double -word fractional multiplier in
FAC (addressed by XR3 + 126)
Double-word fractional multiplicand
in the Accumulator and Extension
Double-word fractional product in the
Accimiulator and Extension
Fixed-Point Fractional Multiply
LIBF
Input
Result
XMDS
Double-word fractional multiplier in
the Accimiulator and Extension
Double-word fractional multiplicand
in FAC (addressed by XR3 + 126)
Product in the Accimiulator and
Extension (XMDS is shorter and
faster than XMD; however, the
resulting precision is 24 bits).
Result (ARG) - (FAC) replaces (FAC)
Real Reverse Divide
LIBF FDVR, FDVRX, EDVR or EDVftX
DC ARG
Input Real dividend in location ARG
Real divisor in FAC
Result (ARG) / (FAC) replaces (FAC)
NOTE: On a divide by zero, the divide check indica-
tor is turned on, the dividend is not changed, and the
dividend remains in FAC.
Real Reverse Sign
LIBF SNR
Input Real number in FAC
Result -(FAC) replaces (FAC)
Real Absolute Value
Fixed-Point Double-Word Divide
LIBF
Input
Result
XDD
Double -word fractional dividend in
FAC (addressed by XR3 + 126)
Double-word fractional divisor in
Accumulator and Extension
Double-word fractional quotient in
the Accumulator and Extension. The
double dividend in FAC is destroyed
by the execution of the subroutine.
CALL
FAVL or EAVL
Input
Real number in FAC
Result
Absolute value of (FAC) replaces
(FAC)
or
CALL
FABS or EABS
DC
ARG
Input
Real number in location
ARG
Result
Absolute value of (ARG) replaces
(FAC)
Integer Absolute Value
CALL lABS
DC ARG
Input An integer in ARG
Result Absolute value of (ARG)
replaces (Accimiulator)
Arithmetic and Functional Subroutines 65
Get Parameters (FGETP or EGETP)
Example:
MAIN
CALL
SUBR
DC
AEG
NEXT
etc.
When an overflow occurs, FAC is set to the
largest valid number of the same algebraic sign as
the contents of FAC when the overflow was detected.
The last error condition replaces any previous indica-
tion.
Also, when an underflow occurs, FAC is set to
zero.
SUBR
SUBEX
DC
LIBF
FGETP or EGETP
DC
etc.
Word Two
The real number divide subroutines check for divi-
sion by zero. If this occurs, word two is set to 1.
The dividend is not changed and remains in FAC.
Word Three
BSC I
SUBEX
The FGETP subroutine performs two functions for
a subroutine accessed by a CALL statement. It
loads FAC with the contents of ARG; it sets SUBEX
to return to NEXT in the calling program.
ARITHMETIC AND FUNCTIONAL SUBROUTINE
ERROR INDICATORS
The highest three-word entry in the Transfer Vector
is reserved for the real number pseudo-accumulator
(FAC). The next to highest three-word entry is
reserved for the arithmetic and functional sub-
routine error indicators.
The first word (addressed XR3 + 122) of the
second entry is used for real nimiber arithmetic
overflow and underflow indicators. The second
word (XR3 + 123) is used for a divide check indi-
cator, and the third word (XR3 + 124) is used for
functional subroutine indicators. When execution
begins, all three words contain zeros.
The functional subroutines check for the following
error conditions and set word three as described.
All error conditions detected by the functional sub-
routines are indicated in word three.
Real Natural Logarithm. When the argument is
zero, FAC is set to the largest negative value and
a bit is ORed into position 15 of word three. When
the argument is negative, the absolute value of the
argument is used and a bit is ORed into position 15
of word three.
Real Trigonometric Sine and Cosine. When the
absoMe value of the argument is equal to or greater
than 2 , FAC is set to zero and a bit is ORed into
position 14 of word three.
Real Square Root. When the argument is negative,
the square root of the argument's absolute value is
returned, and a bit is ORed into position 13 of word
three.
Word One
Each real number subroutine checks for exponent
underflow and overflow. If either occurs, word one
and FAC are set as follows.
When the absolute value of the
Real to Integer.
argument is greater than 2^^-l, the largest possible
signed result is placed in the accumulator and a bit
is ORed into position 12 of word three.
1. if overflow has occurred (FAC = + maximum).
2. if underflow has occurred (FAC = zero).
Integer Base to an Integer Exponent . When the base
is zero and the exponent is zero or negative, a
66
zero result is returned and a bit is ORed into position
11 of word three.
Real Base to an Integer Exponent. When the base is
zero and the exponent is zero or negative, a zero
result is returned and a bit is ORed Into position 10
of word three.
EGOS
e s
cos{x) - cos*(x)
1 I IT
< 3.0 X 10
for the range
-1.0 X 10 < X < 1. Ox 10
Real Base Raised to a Real Exponent . When the base
is zero and the exponent is zero or negative, a zero
result is returned and a bit is ORed Into position 9 of
word three. When the base is negative and the ex-
ponent is not zero, the absolute value of the base is
used and a bit is ORed into position 15 of word three.
EATAN
e =
atn(x) - atn*(x)
atn (x)
< 2.0 x 10
End of File (DM2 System Only). When the end-of-
file record In the unformatted l/O area is read, a
bit is ORed into nosition 2 of word three.
for the rai^e
•37 Q7
-3.88336148 x 10 < x < 3.88336148 x 10
FUNCTIONAL SUBROUTINE ACCURACY
Given:
e
f (X)
f*(x)
(<+<»)
(>-«)
= Maximum error
= True value of the function
= Value generated by subroutine
= < Largest valid real number
= >Most negative real number
EXTENDED PRECISION SUBROUTINES
The following statements of accuracy apply to ex-
tended precision subroutines.
EEXP
e =
for the rs
X , X,.
e - (e )*
<•
r
-9
2.0 X 10 X
or
2.0 X 10~^
whichever
X
e
ii^e
is
greater
-ln{«>) < X < ln(«)
X
I.e., < e <«=
ESIN
e =
sin(x) - sin*(x)
< 3. X 10
for the range
ELN
e =
ln(x) - ln*(x)
ln(x)
<3.0 X 10
-1. X 10 < X <
1. X 10 > X >
for X = sin (x) =
for the range
< X <<
Arithmetic and Functional Subroutines 67
ETANH
FATAN
e = |tanh(x) - tanh*(x)| <3.0 x 10
for the range
-9
-» < X < «
ESQRT
e =
^^ - ^/x
sTx
<1.0 X 10
for the range
< X < 00
STANDARD PRECISION SUBROUTINES
The following statements of accuracy apply to the
standard precision subroutines .
atn(x) - atn*(x)
atn (x)
<5.0 x 10
for the range
37 37
-3.883361 X 10 < x< 3.883361 x 10
FEXP
e =
(e"")*
< <
2.5 X 10~ |x|
or
2.5 X 10
-7
whichever
is
greater
for the range
-In (oo) < X < In (oo) i.e. , < e < «
FSIN
e =
sin(x) - sin*(x)
< 2. 5 X 10
-7
for the range
-1. X 10^ < X <
1. X 10 > X >
for X = sin (x) =
FCOS
e =
cos(x) - cos*(x)
\A -\
< 2. 5 X 10
for the range
-1. X 10 < X 1 1. X 10
FLN
ln(x) - ln*(x)
ln(x)
<4.0 X 10
for the range
< x <c
FTANH
e = tanh(x) - tanh*(x) <2.5 x 10
for the rai^e
-00 < x< + oo
68
FSQRT
wnere
e =
s/x - Jx*
^y"x
<2.5 X 10
z = l/4-y in the range 0< y < 1/2
z = y-3/4 in the range 1/2 < y < 1
for the range
sin 27ry = F(z)
< X < oo
where
ELEMENTARY FUNCTION ALGORITHMS
The choice of an approximating algorithm for a given
function depends on such considerations as expected
execution time , storage requirements , and accuracy.
For a given accuracy, and within reasonable limits,
storage requirements vary inversely as the execution
time. Polynomial approximating is used to evaluate
the elementary functions to effect the desired balance
between storage requirements and efficiency.
z = y in the range < y < 1/4
z = 1/2-y in the range 1/4 < y < 3/4
z = y-1 in the range 3/4 < y < 1
Extended Precision
„ , . ^3 5 7 9 11
F (z) = a z+a z +a z +a z +a z +a z
SINE -COSINE
Polynomial Approximation
where
Given a real number, x, n and y are defined such
that
2ir
n + y
6.2831853071
-41.341702117
81.605226206
-76.704281321
42.009805726
-14.394135365
where n is an integer and 0<y<l. Thus,
27rn + 2Tr y , and the identities are
Standard Precision
sin X = 'sin 27ry and cos x = cos 2 Try.
r^/ X ,3 5 7 9
F(z) = a z + a z + a„z + a.z + a^z
■!• ^ o 4 5
The polynomial approximation, F(z) , for the func-
tion (sin 27rz)/z is used where -1/4 < z < 1/4 .
The properties of sines and cosines are used to
compute these functions as follows.
cos 27ry = F(z)
where
"4 =
a^ =
6.2831853
-41.341681
81.602481
-76.581285
39.760722
Arithmetic and Ftmctional Subroutines 69
ARCTANGENT
Pol3moniial Approximation
The subroutine for arctangent is built around a
polymonial, F (z), that approximates Arctan (z) in
the range -. 23 < z < . 23. The Arctan (z) for z
outside this range is found by using the identities:
Arctan (-Z)
Arctan (z)
Standard Precision
2 4 6
F (z) = X (1. -a^x + a^x -a^x )
where
s =
. 333329573
. 199641035
.131779888
Arctan (z)
a, + Arctan
k
zb, + 1
k
where
a, =
— and b,
7 k
tan a.
SQUARE ROOT
Square Root (x)
Let X = 22bF when .25<F<1
then n/x = 2^ s/f
where \/F=P. i = number of approximation
and k is determined so that
(2k-l)7r^ (2k + l)7r ,
tan ^ j^^ ^ < z < tan : — j^-^ k
1, 2, 3
Having determined the value of k appropriate to
z, the transformation x = (z-b )(zb + 1) puts x in
the range -tan 7r/i4 s x < tan 7r/l4. The poly-
nomial F (z) was chosen to be good over a range
slightly larger (i. e. , .23 > tan t /14) so that the
comparisons to determine the interval in which z
lies need be only standard precision accuracy.
P^ = AF + B
where
as a first approximation
followed by 2 Newton
iterations
A = .875, B = .27863 when .25 < F<. 5
Extended Precision
r(z) = X (l.O
where
2 4
ax + a X
agx + a^x
a = .33333327142
a = . 19999056792
a = .14235177463
a, = .09992331248
4
A = .578125, B = .421875 when .5<r<l
P„ =
2
70
NATURAL LOGARITHM
Polynomial Approximation
Given a normalized real number
X = 2'^x f
where the range of f is 1/2 < f < 1 . and
j and g are found such that x = 2 g where
( v/2/2 < g< /2 ) . This is done by setting j = k-1,
g = 2f if f< J'2/2 and j = k , g = f otherwise.
Thus:
ln(x) = j.ln(2)+ln(g).
The approximation for In (g) , n/2/2 ^ g < ■J'2 ,
is based on the series
ln^= 2((x/v) + (x^/3v^ + (xVsv^ +...]
which converges for (-v < x < v) .
With the transformation
X = v^ , V = ( /2 + 1)2
so that -1 < X < 1 for s/2/2 < g < -J2 .
Substituting,
In (g) = 2 (z + z^/3 + z^/5 + . . . )
where z = x/v = SzL . The approximation
g+1
used is G(z) for ln(g)/z in the range s/2/2 ^ g <
Then for both extended and standard precision,
z=i4
g+i
n/2/2 = . 7071067811865
In (2) = . 6931471805599
Thus, the required calculation is
ln(x) = j . ln(2) + zG(z)
Extended Precision
G(z) = b^+ b^z +b^z + bgZ +bg7.
where
b^=2.0
b = . 666666564181
b = .400018840613
b^ = . 28453572660
o
b„ = .125
Standard Precision
G(z) = b^+ b^z^ b^z^+ bgZ^
where
b^=2.0
b = . 66664413786
b = .4019234697
EXPONENTIAL
Polynomial Approximation
To find e , the following identity is used.
To reduce the range, we let
X log e = n + d + z
where
n is the integral portion of the real number,
d is a discreet fraction (1/8, 3/8, 5/8, or 7/8)
of the real number, and
z is the remainder which is in the range
-1/8 < z < 1/8 .
Arithmetic and Functional Subroutines 71
Thus,
where
X r,° <,d „z
e =2 X 2 X 2
and it is necessary to only approximate 2 for
-1/8 < z < 1/8 by using the polynomial F(z) .
Extended Precision
2 3 4"^
F(z) = a^ + a^z + a^z + a z + a z + a z"
a^ = 1.0
a = .693147079
a = . 240226486
a- = . 0555301557
a. = . 00962173985
HYPERBOLIC TANGENT
where
^0 = '■'
a^ = .69314718057
a = .24022648580
a = .055504105406
a^ = .0096217398747
4
a^ = .0013337729375
for
2x
Tanh (X) = \^
e +1
X > 32
Tanh (x) = 1
X < -32
Tanh (x) = -1
REAL BASE TO REAL EXPONENT
InA
A = e
Standard Precision
T./ V 2 3 4
F(z) = a„ + a^z + a„z + a„z + a.z
12 3 4
therefore;
.B
(^InAJB ^
BlnA
72
SELECTIVE DUMP SUBROUTINES
The IBM 1130 Subroutine Library and the System
Library include three dump subroutines: Dump
Selected Data on the Console Printer, Dump Selected
Data on the 1132 Printer, and Diunp Status Area.
These subroutines allow the user to dump selected
portions of core storage during the execution of a
user's program.
DUMP SELECTED DATA ON CONSOLE PRINTER
OR 1132 PRINTER
Two subroutines are available to select an area of
core storage and dump it on the Console Printer
or the 1132 Printer. Each of these subroutines has
two entry points, one for hexadecimal output and
one for decimal output. The entry points for the
various configurations are shown below:
DMTXO Dump on Console Printer in hexadecimal
format, using the WRTYO subroutine
DMTDO Dump on Console Printer in decimal
format, using the WRTYO subroutine
DMPXl Dimip on 1132 Printer in hexadecimal
format, using the PRNTl subroutine
DMPDl Dimip on 1132 Printer in decimal
format, using the PRNTl subroutine
put device, the user is given one line of status in-
formation. This line indicates the status of the
Overflow and Carry indicators (ON or OFI^, the con-
tents of the Accimiulator and Extension, and the con-
tents of the three index registers. The index register
contents are given in both hexadecimal and decimal
form, regardless of which type of output was request-
ed. The format of the status information is shown
below:
OFF ON HHHH (+DDDDD) HHHH {+DDDDD)
Overflow Carry Accumulator Extension
HHHH {+DDDDD) HHHH (+DDDDD) HHHH (+DDDDD)
Index Register 1 Index Register 2 Index Register 3
All other data is dumped eight words to a line;
the address of the first word in each line is printed
to the left of the line. Hexadecimal data is printed
four characters per word; decimal data is printed
five digits per word, preceded by a plus or minus
sign.
Page ntimbers axe not printed for either subrou-
tine. However, the 1132 Printer subroutine does
provide for automatic page overflow upon the sensing
of a channel 12 punch in the carriage tape.
DUMP STATUS AREA
Calling Sequence
The calling sequence for any of the above functions
is as follows:
CALL ENTRY POINT
DC START
DC END
START and END represent the starting and ending
addresses of the portion of core storage to be
dumped. A starting address greater than the ending
address results in the error message, ERROR IN
ADDRESS, and a return to the calling program.
Format
This subroutine provides a relatively easy and
efficient means of dumping the first 80 words of
core storage. These words contain status informa-
tion relating to index registers, interrupt addresses,
etc. , which may be required frequently during the
testing of a program. It may also be desirable to
dimip these words before loading because pressing
PROGRAM LOAD destroys the data in the first 80
words of core storage.
The Dump Status Area subroutine is called via the
following statement:
CALL
DMP80
Before the actual dump spears on the selected out-
The Console Printer prints the first 80 words of
core storage in hexadecimal form; the printing
format provides spacing between words. After typ-
ing the last word, the subroutine returns control to
the calling program.
Selective Dump Subroutines 73
SPECIAL MONITOR SUBROUTINES
DM2 SYSTEM
The System Library contains a group of subroutines
that perform various system utility functions. These
subroutines, with the exception of SYSUP which can
be called by the user, are intended for system use
only. Under normal circumstances, they should not
be deleted from the System Library.
The subroutines in the group are:
FLIPR - LOCAL/SOCAL overlay subroutine
RDREC - Read *ID record
CALPR - Call system print
FSLEN - Fetch phase IDs or,
FSYSU - Fetch system subroutine (FSYSU is an
alternate entry point to FSLEN)
SYSUP - DOOM update
FSLEN (FETCH PHASE IDs AND FETCH SYSTEM
SUBROUTINE)
This subroutine has two entry points. They are
FSLEN and FSYSU.
• FSLEN (Fetch Phase IDs from SLET)
This entry point obtains the requested phase ID
headers from SLET.
• FSYSU (Fetch System Subroutine)
Fetches the requested system subroutine into
core storage.
This subroutine is intended for system use only.
FLIPR (LOCAL/SOCAL OVERLAY)
The System Library contains a flipper subroutine
(FLIPR) which is used to call LOCAL (load on
call) and SOCAL (system load on call) subroutines
into core storage. FLIPR is used with DISKZ,
DISKl, or DISKN.
FLIPR passes the total word count to DISKZ,
DISKl, or DISKN to fetch the LOCAL. When a
LOCAL subroutine is called, control is passed to
the flipper, which reads the LOCAL into core storage
if it is not already in core and transfers control to it.
All LOCALS in a given core load are executed from
the same core storage locations; each LOCAL over-
lays the previous one. FLIPR fetches SOCALs in the
same manner as LOCALs.
RDREC (READ *ID RECORD)
This subroutine is called by the Disk Maintenance
Programs to read the *ID (disk label) record. This
subroutine is intended for system use only.
SYSUP (DOOM UPDATE)
Whenever a core load requires changing disk
cartridges during the job, SYSUP must be called to
update DCOM on the master cartridge (logical drive
0) with the IDs and DCOM information from all satel-
lite cartridges moxmted on the system. The cart-
ridges are specified in the list or array in the SYSUP
calling sequence. The list or array must be exactly
five words long or be ended by a zero (not both) .
The Assembler-Language calling sequence for
SYSUP Is:
u^,
Opirofion
^
T
Op.n>.d. & tl»»k.
r.jf.L.L
Si^^SjtkP. i . . . ^CiAiL,
T)r
1 ir,s
Ti
.
.
LiLSi
T,
nr^
rTi
n.r.
hi
nn
n,r,
lii
AT.
p,
,
where
CALPR (CALL SYSTEM PRINT)
This subroutine calls FSLEN to bring the system
print subroutine into core storage for the purpose of
printing one or more lines on the principal printer.
This subroutine is intended for system use only.
List is the address of the table of requested
cartridge IDs,
a is the ID of the master cartridge on the system,
b is the ID of the first satellite cartridge on the
system,
74
c is the ID of the second satellite cartridge on the
system,
d is the ID of the third satellite cartridge on the
system,
e is the ID of the fourth satellite cartridge on the
system.
If a is 0, the master cartridge is the same as
before.
The FORTRAN calling sequence for SYSUP is:
1 I 3 4 5 * 7 g 9 10 11 12 13 14 15 16 17 IB 19 M 21 a Z3 24 25 ia 27 ifl K 30 31 3? 33 34 35
I I CA,L,u iSiygit/iPiC,«tjj
I I I I rill
I I 1 I I I I I 1 I I I I I I I 1
I I I I I I I I I
where
a is the name of the last item in an array contain-
ing the IDs of the satellite cartridges on the sys-
tem. The last entry in the array may be 0, in
which case the master cartridge remains un-
changed.
For example:
CALL SYSUP A (5)
The array is stored in reverse order.
A(5) DC
A(4) DC
A(3) DC
A(2) DC
A(l) DC
Thus A(5) is the entry for logical 0, the master
cartridge.
SYSUP messages are listed in the publication
1130 Monitor Programming and Operator's^ Guide
(Form C26-3717). SYSUP execution is terminated
if an error printout occurs.
DM1 SYSTEM
OVERLAY SUBROUTINES (FLIPPERS)
The Monitor subroutine library contains two flipper
subroutines which are used to call LOCAL (load on
call) subroutines into core storage, FLIPO is used
with DISKO and DISKZ, and FLIPl is used with DISKl
and DISKN, FLIPO reads a LOCAL into storage one
sector at a time, whereas FLIPl passes the total
word count to DISKl or DISKN and that subroutine
reads in the entire LOCAL. When a LOCAL sub-
routine is called, control is passed to the flippers
which read the LOCAL into core storage if it is not
already in core and transfer control to it. All
LOCALS in a given core load are executed from the
same core storage locations; each LOCAL overlays
the previous one.
Special Monitor Subioutines 75
SYSTEM LIBRARY MAINLINE PBOGRAMS (DM2 SYSTEM)
The 1130 System Library mainline programs provide
the user with the ability to perform disk maintenance
and paper tape utility functions by requesting
execution of the appropriate program directly
through the job stream.
The calling sequences for the System Library
mainline programs are listed below. The operating
procedures and error messages are contained in the
IBM 1130 Disk Monitor System, Version 2, Pro-
gramming and Operator's Giiide (Form C26-3717).
DISK MAINTENANCE PROGRAMS
The disk maintenance programs are mainline pro-
grams and subroutines that are a part of the System
Library and that initialize and modify disk cartridge
I IDs, addresses, and tables required by the DM2
system. Normally, they should never be deleted
from the System Library.
The disk maintenance programs are:
IDENT - Print Cartridge ID
DISC - Satellite Disk Initialization*
ID - Change Cartridge ID
COPY - Disk Copy
ADRWS - Write Sector Addresses in Working
Storage
DLCm - Delete CIB
DSLET - Dump System Location Equivalence
Table
MODIF - System Maintenance Program
I*A11 new cartridges are initialized using the stand-
alone program DCIP (see IBM 1130 Disk Monitor
System. Version 2, Programming and Operator's
Guide. Form C26-3717).
IDENT (Print Cartridge ID )
This program prints the ID and physical drive
number of each cartridge moxmted on the system,
IDENT prints aU cartridge IDs regardless of
validity (JOB card processing only recognizes valid
IDs).
The calling sequence for IDENT is:
a 3 4 5 6 7 8 9 10 n 12 13 U 15 It 17 '6 19 » 21 2 2 23 24 » 26 g? 28 29 30 31 32 33 M 5
// X£,g, j;o£-Mr,
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 1 I I I t I I I I I I I I
_J_1 L_I I I I I I I I I
DISC (Satellite Disk Initialization)
I This program re-initializes up to four satellite cart-
ridges — all but the master cartridge. It writes the
sector addresses, defective cylinder addresses, a
cartridge ID, a LET, a DOOM, and a CIB on each
cartridge being re -initialized.
DISC overrides all cartridge IDs specified on the
JOB card except the master cartridge ID.
The calling sequence for DISC is:
/ , / , |y|iF | <i) | ,J | / | S|C |
6 ? 8 > 10 II 12 13 14 U la 17 18 19 » 21 a 33 » 25 M 27 i8 29 30 3T 32 33 34 33 3.
I I I I I ■ I
<lf,T,OiF,I,0,I,,,T,I,D,l,,,/=;T,a2,, ,T,T,aZ,j,*,;t,A,T,a/f,,,r,T,0,n,
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
where
FIDl through FIDn are the IDs currently on the
satellite cartridges to be re -initialized (identified
by IDENT or a JOB record),
TIDl through TIDn are the IDs to be written on
the satellite cartridges by this program. A valid
cartridge ID is a nvimber between /OOOl and
/7FFF.
ID (Change Cartridge ID)
This program changes the ID on up to four satellite
cartridges.
The calling sequence for ID is:
// ,y^,<f, a.a
2 3 4 5 . 7 B » 10 11 12 13 H 13 16 17 16 H 20 21 32 23 24, 35 3a 27 28 29 30 31 32 33 34 3
I I I I I Ill 1111
t,T,o,f,rMi,, I ra,o,i,, ,F,zfia,^ , ra,£^,, ,.,«,» ,^a,aji, , ,r,ra/i,
I I I I I I I I I I I '
where
FIDl through FIDn are the IDs currently on the
satellite cartri(^es being changed (these IDs must
76
be in the same logical order as the entries on the
JOB card),
TIDl through TIDn are the new IDs to be written
on the selected satellite cartridges.
COPY (Disk Copy)
This program copies the contents (except the de-
fective cylinder table and the cartridge ID) of one
cartridge onto another. The copy ID (word 5 of
sector 0) is Incremented by one prior to being
written on the new cartridge.
The calling sequence for COPY is:
The calling sequence for DLCIB is:
a 3 4 5 6 7 a ff 10 11-12 13 14 13 1* I? '8 19 20 21 22 23 24 ii 26 27 23 39 3Q 3t 32 33 M 3i 3»
// lyigp iCiOi/^Yi I I [ I I I I I I I I
1^T,CkF,Z<Dd,, ,r,I,aL, ,F^J>,2,j .r,Z,D.2.,,;;:^.T,a^, , , rjr^a^
I I I I I I I I I I I I I
where
FIDl through FIDn are the IDs of the cartridges
to be copied.
TIDl through TIDn are the IDs of the cartridge
onto which the copies are to be made.
If multiple copies are to be made from a single
master, FIDl through FIDn will all contain the same
ID.
ADRWS (Write Sector Addresses in Working Storage)
This program, linked to from DUP on detection of the
DUP control record DWADE, writes sector addresses
on all sectors of Working Storage on the disk cart-
ridge specified on the DWADR control record (see
DUP in the 1130 Monitor Programming and Operator's
Guide (Form C26-3717)).
DLCIB (Delete Core Image Buffer)
This program deletes the CIB from a non-system
cartridge. If a user area is defined, the user area
is moved two cylinders closer to cylinder 0. The
new addresses of disk areas moved as the result of
the deletion of the CIB are reflected in DOOM on the
master cartridge, on the non-system cartridge from
which the CIB is deleted, and in COMMA.
} 1 3 * S a 7 e J 10 11 12 13 H IS 16 17 18 19 M 21 K a3 24 25 26 27 23 29 30 31 32 33 34 3i
/i/i I Xi^[(^ iM^ \CtTiO\ I I I I 1 I 1 I I I I I
I ] I I I I 1 I 1 I 1
*a,ac,A/!,r,
1 I I I 1 I 1 1 I I I 1 I I
I I L_] I 1 I I I r I I
I I I r I I I I
I I I I I I I I 1 I I I I I I I I I I I I I I
where
CART is the ID of the non-system cartridge
from which the CIB is to be deleted.
DSLET (Dump System Location Equivalence Table)
This program dumps the contents of SLET on the
principal printer. Each entry printed consists of a
symbolic name, a phase ID, a core address, a word
count, and a disk sector address. A SLET dump is
listed in the publication 1130 Monitor Programming
and Operator's Guide (Form C26-3717).
The calling sequence for DSLET is;
y;/ .y,g<j> ,asL,£,T,
7 B 9 m 11 12 13 14 H i* 12 16 19 20 21 22 23 24 23 26 27 2B 2 9 30 31 32 33 34 35 :
I I I I I 1 I I I I I I I I
1 I I I I I I
MODIF (System Maintenance Program)
Included in the system library is a system mainten-
ance program, MODIF, that provides the user with
the ability to update the monitor system on the master
cartridge. This program makes changes to the ver-
sion and modification level word in DCOM, the super-
visor, DUP, FORTRAN compiler, assembler, and or
system library. A card deck or paper tape contain-
ing corrections to update the monitor system to the
latest version and modification level is supplied by
IBM. Every modification must be run to update the
version and modification level, even if the affected
program has been deleted from the system.
The calling sequence for MODIF is:
ia II u 13
22 23 2* 21> :
1/ n J9 30 :
// ,X.£,^ M,0,OJ-f,
Ill I
I I I I I 1 I I I I
I I I I I I I
System Library Mainline Programs 77
PAPER TAPE UTILITY (PTUTL)
This program accepts input from the keyboard or the
1134 paper tape reader and provides output on the
console printer and/or the 1055 paper tape punch.
PTUTL allows changes and/or additions to
FORTRAN and assembler language source records
as well as monitor control records.
The calling sequence for PTUTL is:
i 3 < 3 i 7 8 ; 10 II 12 13 14 15 U '7 18 T9 iO Zl g 23 24 23 lb 17 16 29 30 31 32 33 34 35 :
-I I I I r I r I I I I I I I r I r I I I I I I I
// ,x,£;<^ ,Pt/;i/,r,L,
L_]
78
WRITING ISSs AND ILSs (DM1 AND C/PT SYSTEM)
The section on Writing ISSs and ILSs for the DM2
system will be found in the IBM 1130 Disk Monitor
System, Version 2, Programming and Operator's
Guide (Form C26-3717).
INTERRUPT SERVICE SUBROUTINES
The following rules must be adhered to when writing
an ISS:
1. Precede the ISS statement with an LIBR state-
ment if the subroutine is to be called by a LIBF
rather than a CALL.
2. Precede the subroutine with an EPR (extended)
or an SPR (standard) statement if precision
specification is necessary.
3. Precede the subroutine with one ISS statement
defining the entry point (one only) , the ISS
nimiber, and the ILS subroutines required. The
device interrupt level assignments, and the ISS
nvimbers used in the IBM -provided ISS and ILS
subroutines, are shown in Table 7.
4. The entry points of an ISS are defined by the
related ILS. This must be taken into considera-
tion when a user-written ISS is used with an IBM-
supplied ILS. The ILS executes a BSI to the ISS
at the ISS entry point plus n (see Table 7). The
ISS must return to the ILS via a BSC instruction
(not a BOSC).
INTERRUPT LEVEL SUBROUTINES
An ILS is included in a program only if requested by
a loaded ISS. The following are rules for writing an
ILS:
1. Precede the subroutine with an ILS statement.
2. Precede all instructions by an ISS Branch Table
and include one word per ILSW bit used. If the
ILSW will not be scanned, (i. e. , a single ISS
subroutine to handle all interrupts on the level) ,
then a one word table is sufficient. The mini-
mum table size is one word. Table words must
be non-zero.
Table 7. DM1 and C/PT System ISS/ILS Correspondence
ISS
Number
Device
Device Interrupt
Level Assignments
n
1
1442 Card Read Punch
0,4
+4, +7
2
Keyboard/Console Printer
4
+4
3
1134/1055 Paper Tape
Reader/Punch
4
+4
4
Single Disk Storage
2
+4
6
1132 Printer
1
+4
7
1627 Plotter
3
+4
ILSW Bit 15 word
ILSW Bit 14 word
ILSW Bit word
ISS Branch Table
The ISS Branch Table Identifies both the ISS sub-
routine and the point within the ISS which should
be entered for each bit used in the ILSW. The
actual linkage is generated by the Relocating
Loader or Core Image Converter. Basic to this
generation is the ISS number implied by bits
8-15 of the branch table word and specified in
the ISS statement. This number identifies a
core location in which the loader or converter
has stored the address of the called entry point
in the ISS. This entry point address is incre-
mented by the value in bits 0-7 of the branch
table word, producing the branch linkage. The
loader or converter replaces the ISS branch
table word with the generated branch linkage.
During execution, the ISS Branch Table con-
tains core addresses. It may be used with an
Indirect BSI instruction to reach the ISS corres-
ponding to that ILSW bit position. The ILSW bit
that is ON can be determined by the execution of
a SLCA instruction. At the completion of this in-
struction, the index register specified contains a
relative value equivalent to the bit position in the
Writing ISSs and ILSs (DM1 and C/PT System) 79
ISS branch table. An indirect, indexed BSI may
then be used to reach the appropriate ILS.
Each word in the ISS branch table has the
following format:
Bits 0-7 — Increment added to the entry point
named in the ISS statement to obtain the interrupt
entry point in the ISS for this ILSW bit. (In
IBM -written ISS subroutines, this increment is
+4 for the primary interrupt level and +7 for
the secondary interrupt level. )
Bits 8-15 — ISS nimaber +51 for the ISS subroutine
for this ILSW bit. This address should match
word 13 of the compressed ISS header card.
The ILS entry point must immediately follow
the ISS branch address table and must be a zero.
The first zero word in the program is the end of
the branch table and is also the entry point of the
ILS. (The table must contain at least one entry.)
The interrupt results in a BSI to the ILS entry
point.
To clear the level, a user-written ILS, used
with an IBM -supplied ISS, should exit via the
return linkage with a BOSC instruction.
so
Sample ILS
0000 0439
0001 043B
0002 0000
0003 D810
0004 O 2806
0005 O 6908
0006 O
0007 01
0009 1
OOOB C
OOOC O
OOOD 00
080F
4C2Ba01 1
44800001
2000
ceoT
650000O0
»»• HDNG ILSOl
♦»**♦♦*•»*»*•■•»»**»»«****»♦»♦«■«*»***»**•*♦*********
• TITLE - ILSOl »
» STATUS - CHANGE LEVEL *
» FUNCTlONz-OPERATION - .ILSOl. IS THE INTERRUPT »
* LEVEL SUBROUTINE FOR LEVEL I ♦
» ENTRY POINTS - ILSOl. ENTERED BY HARDWARE BSI «
» VIA LOCATION 9 »
♦ INPUT - NONE ♦
♦ OUTPUT - NONE »
* EXTERNAL ROUTINES - NONE •
« EXITS - NORMAL - BOSC INDIRECT THROUGH .ILSOl. »
* -ERROR - NONE *
* TABLES/WORK AREAS - NONE •
» ATTRIBUTES - REUSABLE »
♦ NOTES - *
» »»««»» 1130 ILSOl »
♦ « THIS IS THE INTERRUPT LEVEL ♦
» ♦ SUBROUTINE FOR LEVEL 1. »
» ♦ THE 1132 PRINTER AND THE »
» » COMMUNICATIONS ADAPTER ARE ON ♦
» ♦ LEVEL 1. »
* * BIT - 1132 PRINTER •
» ♦ BIT 1 - COMMUNICATIONS ADAPTER*
» *♦»*♦* »
*»«»*»****«*»*#♦*»»*»»**»**»**»«»****»**«*«*♦******
ENTERED BY HARDWARE BSI
VIA LOCATION 0009
SAVE ACC AND EXTENSION
STATUS
INDEX 1
ILS C
n
P2
DC
/04 39
CAT2
DC
/043B
ILSOl
DC
*
STD
AQ
STS
STAT
STX
1 XRl+1
•
XIO
SENS-1
BSC L VIP.+Z
BSI 1
1 CATS
*
STAT
LDS
LDD
AO
XRl
LDX LI *-»
SENSE ILSW
PROCESS 1132
INTERRUPT
OOOF 01 4CC00002
0011 01
0013 O
0014
0016 O
0017 O
0018
448O0000
70F7
0002
0000
0300
BSI
MDX
ess
DC
SENS DC
*
END
AO
P2
STAT
2
/C300
PROCESS ADAPTER INTERRUPT
TURN OFF LEVEL AND EXIT
PROCESS 1132 INTERRUPT
GO TO RESTORE AND EXIT
FOR SAVING ACC AND EXT.
lOCC TO SENSE ILSW
ILSOl OOO
ILSOlOOl
ILSOl 002
ILSOl 003
ILSOl 004
ILS01005
1LS01006
ILS01007
ILSOl 006
IUS01009
ILSOIOIO
ILSOlOll
iLsoioia
ILS01013
ILSOIOIA
ILSOIOIS
ILS01016
ILS01017
iLSOlOie
ILS01019
ILS01020
ILSOl 021
ILS01022
ILSOl 023
ILS01024
ILSOl 025
ILSOl 026
ILS01027
ILSOl 028
ILSOl 029
ILS0I03G
ILS01031
ILSOl 032
ILSOl 033
ILSOl 034
1LS01035
1LS01036
ILSOl 037
ILS0103a
ILSOl 039
ILSOl 040
ILS01041
ILS01042
IL501043
ILSOl 044
ILSOl 045
ILS01046
ILS01047
ILSO1048
ILS01049
ILSOl 050
ILSOIOSI
ILS01052
ILSOl 062
Writing ISS and ILS (Card/Paper Tape System) 81
Sample ISS
0305"? 130
0000 695E
0001 00 65800OO0
0003
0004
7006
OOOO
0005 01 4C000ODA
0007 OOOO
0008 01 4C00009F
OOOA
OOOB
OOOC
OOOD
OOOE C
OOOF 01
OCl I
0012
0013 O
GO 14
0015
0016 01
0018
0019
OOIA
OOlB
OOIC
OOID
OOlF
0020 01
0022
0023
0024
0025
0026 n
0027
0028
029
ooaa
002B
002C 00
002E 01
0C30
0031
0032
0033
0034
0035 01
0037
0038
39 00
003B
003C 00
003E
C03F
0040
0041
0042
0043
0044
0045
0046 01
0048
0049 01
004B
C07B
2856
6A54
ClOO
180C
4C2000 15
C078
4818
7101
7046
9077
4C 300070
8C7A
DOOB
806D
DOC 7
C06D
4C20001C
0868
4C040072
C066
9075
D062
7000
7Q03
703D
7018
7028
9072
DO 59
CS80OO01
4C08OO70
DO09
B05A
0061
D063
9058
4C300070
ClOl
D004
6600O000
C050
D6000000
72FF
70FC
ClOl
D042
DOSS
7101
0843
1003
4C1000SO
COOC
4C040050
1O08
»»» HDNG LIBF CARDO
LI BR
1130 ISS 01 C4RD0 O 4
***«**«»»#»*»♦**«»»**#**»*»**»»♦*♦«****♦**»»»***»**
» THIS 1130 SUBROUTINE OPERATES THE 1442 CARD ♦
* READER PUNCH. IT INITIATES REQUESTED OPERA- »
» TIONS. PROCESSES ANY COLUMN OR OPERATION »
* COMPLETE INTERRU°TSi AND AUTOMATICALLY •
* INITIATES ERROR RECOVERY PROCEDURES. ♦
* *
* IDENTIFYING FEATURE - NO ERROR PARAMETER »
*«*»«*****•»**»«.**♦**»*♦»**■♦♦*»***»*»»»*»*♦♦*»**♦«»■»
* LOADER DEFINED LOCATIONS »
* **************lc***lt** It ********************* tt*****1t
LIBF ENTRANCE (+0)
LOADER STORES TV ADDR ( +2 >
COLUMN INTERRUPT (+4)
CARDO
STX
!
CA30+1
LINK
LDX
I 1
MDX
CAIO
INTl
DC
BSC
L
NT14
INT2
DC
BSC
L
NT 10
OP CMPLTE INTERRUPT (+7)
***************************************************
* LIBF PROCESSING *
********»***»#»#*«*******»♦*«*»*****»»*♦#»»*•»#»»»♦
« THIS PORTION STORES CALLING SEQUENCE INFO •
* AND CHECKS THE DEVICE STATUS BEFORE ANY I/O *
* OPERATION IS INITIATED. A CALLING ERROR OR •
* NOT READY 1442 CAUSES AN ERROR EXIT TO »
* LOCATION 41. IF THE OPERATION WILL CAUSE »
» INTERRUPTS. THE ROUTINE IS SET BUSY AND THE »
* IOCS COUNTER IS INCREMENTED TO INDICATE »
* INTERRUPT(S) PENDING. »
^ ******** ******************************************
CAIC STO
STS
STX
LD
SRA
BSC
LD
BSC
MDX
MDX
CA14 S
BSC
A
STO
A
STO
CAI5 LD
BSC
CA17 XIO
3SC
LD
CA18 S
STO
CA20 MDX
MDX
MDX
MDX
MDX
CA21 S
STO
CA218 LD
BSC
STO
A
STO
STO
S
BSC
LD
STO
CA22 LDX
LD
CA23 STO
MDX
MDX
CA24 LD
STO
STO
MDX
CA25 XIO
SLA
BSC
LD
BSC
SLA
TEMP
CA32
2 CA31+1
1 O
12
CA14.Z
BUSY
+-
1 +1
CA2e
O0OO4
CA40.Z-
H7003
CA20
CONST
CA18
BUSY
CA15.Z
SENSE- 1
CA42.E
SENSE
SETUP
INIT
CA20+1
CA21
CA36
CA26
CA26
SETUP+4
COLM+1
1 1
CA40.+
CA22+1
DOOCl
COUNT
RSTRT
0008 1
CA40.Z-
1 1
CA23+1
2 O
DOOOl
2
-1
CA23
1
COLM
RSTRT+1
+ 1
SENSE- 1
3
CA258.-
CA20
CA25B.E
8
SAVE STATUS
XI = ADDR OF CALL+I
IS FUNCTION TEST
NO
YES. IS ROUTINE BUSY
NO. EXIT TO CALL+3
YES. EXIT TO CALL+2
IS FUNCTION LEGAL
NO. ERROR
IS ROUTINE BUSY
YES. WAIT TIL NOT
IS DEVICE READY
NO. ERROR
SETUP CONTROL I OCC
WHAT IS FUNCTION
= GET
- PUT
= FEED
= STK
GET FUNCTION
SET UP READ I yO
= ERROR IF ZERO OR NEG
SAVE WORD COUNT +1
BECAUSE DECREMENT IS
BEFORE COLUMN READ
= ERROR IF OVER +81
STORE +1 IN DATA AREA
(=^ NOT READ INDIC FOR
SPEED CONVRT SBRT)
SAVE DATA ADDRESS
SET XI TO SKIP 2ND PARAM
IS LAST CARD IND ON ,
NO
IS FUNCTION GET OR FEED
NO
IS FUNCTION GET
CRDOOOOl
CRD00002
CRD00003
CRD00004
CRD00005
CRD00006
CRD00007
CRDOOOoa
CRDO00O9
CRDOOOIO
CRDOOO I 1
CRD00012
CRDOOO 13
CRDOOO 1 4
CRDOOO 15
CROG0016
CRDOOO 17
CRDOOO 18
CRDOOO 19
CRD00020
CR000021
CRD00022
CHD00023
CRD00024
CRDOOO 25
CRDOO026
CRD00027
CRD00028
CRDOOO 29
CRDOOO30
CRDOOO 31
CRDOOO 32
CRDOOO 33
CRD00034
CRDOOO 35
CRD00036
CRDOOO 37
CRDOOO 38
CRDOOO 39
CRD000*0
CRD00041
CR000042
CRDOOO 43
CRDOOO**
CRDOOO 45
CRDOOO 46
CRD00047
CRDOOO 48
CRD00049
CRDO0O50
CRD00051
CRD00052
CHO00O53
CR0000S4
CRDOOO 55
CRD00056
CR000057
CRDOOO 58
CRDOOO 59
CRD00060
CRD00061
CRD00062
CRD00063
CRDOOO 64
CRD00065
CRDOOO 66
CRD00067
CRD0006B
CRD00069
CRD00070
CHD0007I
CRD00072
CRD00073
CRD00074
CRDOOO 75
CRDOOO 76
CR000077
CRDOOO 78
CRDOOO 79
CRDOOOeO
CRDOOOei
CRD00082
CRD000S3
CRD00084
CRD00085
CRD000e6
CRD000B7
CRD00088
82
0040
4808
BSC
+
0040
71FF
MDX
1
-1
004E
0838
XIO
FEED-1
004F
702C
. MDX
CA43
0050
00
74010032
CA25B
MDX
L
50. + 1
0052
1000
NOP
0053
C03a
LO
DOOOl
0054
DO 35
STO
BUSY
C055
C03F
CA26
UD
ERROR
0056
01
4C20005A
BSC
L
CA27.Z
O058
0S2D
XIO
INIT-1
0059
70O1
MDX
CA28
005A
oesF
CA27
XIO
FEED- 1
005B
7101
CA28
MDX
1
+ 1
005C
C029
LD
TEMP
005D
6906
CA29
STX
1
CA34+1
OOSE
00
65000000
CA30
LDX
LI
0060
oo
66000000
CA31
LDX
L2
0062
o
2000
CA32
LDS
0063
00
4COO0O0O
CA34
BSC
L
0065
o
9038
CA36
S
SETUP+5
0066
DOIE
STO
COLM+1
0067
00
CSBOOOOl
UD
«I 1
1
0069
Ol
4C080070
BSC
L
CA4 . +
006B
D02S
STO
COUNT
006C
D02A
STO
RSTRT
006D
9021
S
D0080
OOftP
a
4B08
BSC
+
006F
70D0
MDX
CA24
0070
C021
CA40
LD
HlOOl
0071
700B
MDX
CA44
0072
1801
CA42
SRA
1
O073
01
4C04001F
BSC
L
CA17.E
O075
1003
SUA
3
0076
01
4C10007C
BSC
L
CA43.-
0078
COAC
LD
CA20
0079
01
4C04007C
BSC
L
CA43.E
0079
DO 19
STO
ERROR
007C
C014
CA43
LD
HIOOO
007D
71FF
CA44
MDX
1
-1
007E
00
6D000028
STX
LI
40
0080
6129
LDX
1
41
COBl
70DB
MDX
CA29
YES. SET XRl = LIBF+1
EJECT CARD
INCREMENT IOCS COUNTER
0032
0000
0082
1
0082
0083
0000
0084
0000
0085
0000
0086
0000
0087
0400
0038
2075
0089
I700
008A
c
0000
0088
1402
ooac
0001
OOSD
0004
OOSE
0008
OOSF
0050
0090
0051
0091
1000
0092
c
1001
0093
7003
0094
■0000
0095
0000
0096
0000
0097
0000
0098
0000
0099
02FC
009A
02FF
0098
02FE
009C
0280
009D
0204
009E
o
030 1
#«»*»**♦****♦**»♦»*****
« CONSTANTS
BSS E
CHAR-1
O
/040O
SETUP-CAl
/1700
/1402
+ 1
+4
+8
+ao
+81
/lOOO
/lOOl
/7003
/'02FC
/02FF
/02FE
/0280
/•0204
/03D1
ADDR
DC
CHAR
DC
COLM
DC
DC
TEMP
DC
INIT
DC
CONST
DC
SENSE
DC
BUSY
DC
FEED
DC
DOOOl
DC
DO 00 4
DC
Doooe
DC
D0080
DC
DOOBl
DC
HIOOO
DC
HI 001
DC
H7003
DC
COUNT
DC
ERROR
DC
INDIC
DC
RSTRT
DC
DC
SETUP
DC
DC
DC
DC
DC
DC
SET ROUTINE BUSY
INITIATE 1/0
SET EXIT TO SKIP 1ST PARAM
RESTORE STATUS
EXIT
SETUP PUNCH I/-0
= ERROR IF ZERO OR NEG
SAVE WORD COUNT
DO NOT PUNCH OVER 80 COL
ERROR CODE - ILLEGAL CALL
IS DEVICE BUSY
YES. WAIT TIL NOT
IS DSW ERROR INDIC ON
NO
YES. IS FUNCT GETz-FEED
NO
YES. INDIC SKIP 1ST CO
ERROR CODE - DVCE NOT RDY
STORE CALL ADOR IN 40
SET EXIT FOR 41
*
**»*»*»»*»***»■»*«»»*»»*»**»»
ADDR TO REPLACE O/P AREA
TEMPORARY REGISTER O
lOCC FOR COLUMN I/O E
O
TEMPORARY STORAGE
lOCC TO INITIATE I/O O
8-1+/2000
SENSE DSW WITHOUT RESET O
ROUTINE BUSY INDICATOR
lOCC TO FEED 1 CARD O
INSTRUCTIONS = MDX X +3
NO. WORDS TO XFER
SKIP ONE CARD INDIC
FEED CHK (RD STATION) IND
RESTART INFO - WORD COUNT
DATA ADDR
INITIATE lOCC SETUP - GET
- PUT
- FEED
. - STK
COLUMN lOCC SETUP - GET
- PUT
CRD0O089
CRD00090
CRD0OO91
CRD0O092
CRD0OO93
CRD00094
CRD00095
CRD00096
CR000097
CR00O098
CRO0O099
CRDOOIOO
CRDOOlOl
CRD00102
CRD00103
CRD00104
CRDOOIOS
CRD00106
CRD0OI07
CRDOOIOS
CRD00109
CRDOOl 10
CHDOOl I I
CRDOOl 12
CRDOOl 13
CRDOOl 14
CRDOOl 15
CRDOOl 16
CRDOOl 17
CRDOOl 18
CRDOOl 19
CRDOOl 20
CRD00121
CRDOOl 22
CRDOOl 23
CRDOOl 24
CRDOOl 25
CRDOOl 26
CRDOOl 27
CRDOOl 28
CRDOOl 29
CRDOOl 30
CRDOOl 31
CRDOOl 32
CHDOOl 33
CRDOOl 34
CRDOOl 35
CRDOOl 36
CRDOOl 37
CRDOOl 38
CRDOOl 39
CRDOOl 40
CRDOOl 41
CRDOOl 42
CRDOOl 43
CRDOOl 44
CRDOOl 45
CRDOOl 46
CRDOOl 47
CRDOOl 48
CRDOOl 49
CRDOOl 50
CRDOOl 51
CRDOOl 32
CRDOOl 53
CRDOOl 54
CRDOOl 55
CRDOOl 56
CRDOOl 57
CRDOOl 58
CRDOO 1 59
CR000160
CRDOO 1 61
CRDOOl 62
CRDOOl 63
CRDOOl 6*
Writing ISS and ILS (Card/Paper Tape System) 83
* OP COMPLETE INTERRUPT PROCESSING ♦
*»**»««********* ************* **♦**«*♦**♦**»*******♦
* THIS PORTION IS ENTERED FROM INTERR UEVEU •
* SROUTINE 04, IF NO ERROR HAS BEEN DETECTED. »
* THE ROUTINE IS SET NOT BUSY AND THE IOCS *
« COUNTER IS DECREMENTED TO INDICATE *
« INTERRUPT PROCESSING COMPLETED. OTHERWISE »
* THE SUBROUTINE LOOPS UNTIL THE OPERATOR HAS »
* INTERVENED AND THE l^A2 BECOMES READY. AT *
* WHICH TIME THE CARDS ARE POSITIONED AND THE »
* I/'O OPERATION IS RE- IN I TI ATED. «
oogF
80EC
NTlO
A
0000 1
OPER COMPLETE INTERRUPT
COAO
D0E2
STO
CHAR
OOAl
08E0
XIO
CHAR- I
SENSE DSW WITH RESET
0CA2
1003
SLA
3
IS OPERATION OK
00A3
01
4C0200BA
8SC
L
NT! 1 .C
NO . ERROR
0CA5
01
4C2800BA
NTIOB
BSC
L
NT10X.Z+
NO. LAST CARD
00A7
COED
LD
ERROR
00A8
1002
SLA
2
YES. WAS THIS SKIP OP
00A9
1810
SRA
16
OCAA
DOEA
STO
ERROR
OOAB
01
4C0200C5
BSC
L
NT 1 2 . C
YES. INITIATE FUNCT
OCAO
00
7AFF0032
NTIOE
MDX
L
SO.-l
NO. TERMINATE FUNCT
OOAF
1000
NOP
DECREMENT IOCS COUNT
OOBO
1810
SRA
16
OOHI
dods
STO
BUSY
CLEAR ROUTINE BUSY
00B2
01
4CB00007
BSC
I
INT2
EXIT
00S4
COCO
NTIOX
LD
ADDR
00B5
80D6
A
DOOOl
00B6
FOCD
EOR
COLM
IS FUNCTION PUT
C0B7
4818
BSC
+-
NO
OOBB
0801
XIO
FEEO-1
YES. EJECT LAST CD
00B9
70F3
MDX
NTIOE
OOBA
1005
NTH
SLA
5
SAVE FO CHK (RO STAl I ND
OOBB
COCB
LD
INIT
IS FUNCT PUNCH
ODBC
01
4C0400C5
BSC
L
NT12.E
YES. DONT SKIP
OOBE
1801
SRA
I
IS FUNCT FEED
OOBF
01
4C0400D5
BSC
L
NT13B.E
YES
OOCl
C0D6
LD
RSTRT+J
WAS ONE COL READ IN
00C2
FOCI
EOR
COLM
0CC3
01
4CieO0D7
BSC
L
nt:3e.+-
NO. SKIP 1ST CARD
00C5
08BC
NT12
XIO
CHAR-1
C0C6
01
4C0400C5
BSC
L
NT12.E
WAIT TIL PEAOFR READY
ooce
COCC
LD
ERROR
IS CARD SKIP NECESSARY
C0C9
01
4CI800CE
BSC
L
NT13.+-
NO
OOCB
08BE
XIO
FEED-1
SKIP 1ST CARD
OOCC
01
4Ca00007
BSC
[
INT2
OOCE
c
C0C8
NT13
LD
RSTRT
OOCF
D0C4
STO
COUNT
SETUP FOR RETRY
OODO
C0C7
LD
RSTRT+1
OODl
D0B2
STO
COLM
0OD2
08B3
XIO
INIT-1
INITIATE I/O OPERATION
0003
01
4C800007
BSC
I
INT2
EXIT
00D5
01
4C0200C5
NT13B
BSC
L
NT12.C
NO SKIP IF FD CHK (RDl
0OD7
COBB
NTI3E
LD
H7003
OODB
D08C
STO
ERROR
SET BIT 1 OF INDIC
0OD9
70EB
MDX
NT 12
* COLUMN INTERRUPT PROCESSING •
*»*«*«*■»******»*♦♦*«»«****#♦«**#»*♦♦»*»*«♦**»♦«»##*
» THIS PORTION IS ENTERED FROM INTERR LEVEL »
» SUBROUTINE 00. AFTER THE REQUESTED NO. OF »
* COLUMNS HAS BEEN READ. THE REMAINING COLUMN »
* INTERRUPTS ARE MERELY TURNED OFF AS THEY *
» OCCUR. WHEN THE LAST COLUMN REQUESTED IS »
« PUNCHFD. SN INDICATION IS GIVEN TO THE 1442 •
* TO INITIATE AN OP COMPLETE INTERRUPT. »
COLUMN REQUEST INTERRUPT
SENSE DSW WITH RESET
ANY MORE COLS TO PROCESS
YES
IS THIS READ COL INTERR
YES. SET TO SKIP
NEXT COL
NO. STORE STOP PUNCH
BIT (BIT 12) IN COL
DATA
PUNCH FROM TEMPORARY
LOCATION
SET ADDR FOR NEXT COLUMN
EXECUTE COLUMN I/O
EXIT
OODA
00A3
NT 14
STO
CHAR
OODB
OSAS
XIO
CHAR-1
OOOC
01
74FF0094
MDX
L
COUNT. -1
oode
700D
MDX
NT18
oodf
01
4C1OO0E4
BSC
L
NT16.-
OOEl
CI
740100Q4
MDX
L
COUNT.+l
00E3
7006
MDX
NT22
0CE4
01
74 010084
NT16
MDX
L
COLM.-H
00E6
01
C4800084
LD
I
COLM
00E8
EeA5
OR
D0008
0OE9
D099
STO
CHAR
COEA
C097
LD
ADDR
OQEB
D098
STO
COLM
OOEC
01
74 10084
NT 18
MDX
L
COLM.+l
OOEE
0B95
NT20
XIO
COLM
OOEF
01
4C800004
NT22
BSC
I
INTl
0F2
END
CRD00165
CRD00166
CRD00167
CRD0OI68
CRD00169
CRD00170
CRD00171
CRDOO 1 72
CRD00173
CROOOI 74
CRDOO 175
CRDOO 176
CRDOO 177
CRDOO 178
CRDOO 179
CRDOO 1 60
CRDOOiei
CRDOO 182
cRDooiaa
CRDOO ISA
CROOOI 85
CRDOO 166
CRDOO 187
CRD00188
CRDOO 189
CRDOO 190
CRD0019I
CRDOO 192
CRDOO 1 93
CRDOO I 94
CRDOO 195
CRDOO 196
CRDOO 197
CRD00198
CRDOO I 99
CRO0O2O0
CRD00201
CRD00202
CRO0O2O3
CRO00204
CRD00205
CRD00206
CRD00207
CRD00208
CRD00209
CRO002 1
CRD00211
CRD00212
CRD00213
CRD002 1 4
CRD00215
CRD00216
CRD00217
CRD002 1 8
CRD0O2I9
CRD00220
CRD00221
CRD00222
CRD00223
CHD00224
CRD0022S
CRD00226
CRD00227
CRD0022a
CRD00229
CRD00230
CRD00231
CRD0O232
CRD00233
CRD00234
CRD00235
CRD0O236
CRD00237
CRD0023a
CRD0O239
CRD00240
CRD00241
CRD00242
CRD00243
CRD00244
CRD0024S
CRD00246
CRD00247
CRO0O24a
CRD00249
CRDOO250
CRD0O251
84
APPENDIX A. LISTING OF SUBROUTINES
Table 8 is a listii^ of the Disk Monitor 1 and Card/
Paper Tape System Subroutine Library. The Disk
Monitor 2 System Library is listed in Table 9.
• Table 8. DM1 and C/PT System Subroutine Library
Subroutine
Names
Subroutines Required
FORTRAN
Called by CALL
Looder ReiniHalization (card only)
LOAD
None
Data Switch
DATSW
None
Sense Light On
SLITE, SLITT
None
Overflow Test
OVERF
None
Divide Check Test
DVCHK
None
Function Test
FCTST
None
Trace Start
TSTRT
TSET
Trace Stop
TSTOP
TSET
Integer Transfer of Sign
ISIGN
None
Real Transfer of Sign (E)
ESIGN
ESUB, ELD
Real Transfer of Sign (S)
FSIGN
FSUB, FLD
Called by LIBF (Cord/Poper Tape)
Real IF Trace (E)
VIF
TTEST, VWRT, VIOF, VCOMP
Real IF Trace (S)
WIF
FSTO, TTEST; WWRT, WIOF, WCOMP
Integer IF Trace (E)
VIIF
TTEST, VWRT, VIOF, VCOMP
Integer IF Trace (S)
WIIF
TTEST, WWRT, WIOI, WCOMP
Integer Arithmetic Trace (E)
VIAR, VIARX
TTEST, VWRT, VIOI, VCOMP
Integer Arithmetic Trace (S)
WIAR, WIARX
TTEST, WWRT, WIOI, WCOMP
Real Arithmetic Trace (E)
VARI, VARIX
ESTO, TTEST, VWRT, VIOF, VCOMP
Real Arithmetic Trace (S)
WARI, WARIX
FSTO, TTEST, WWRT, WIOF, WCOMP
Computed GO TO Trace (E)
VGOTO
TTEST, VWRT, VIOI, VCOMP
Computed GO TO Trace (S)
WGOTO
TTEST, WWRT, WIOI, WCOMP
Trace Test-Set Indicator
TTEST, TSET
None
Pouse
PAUSE
None
Stop
STOP
None
Subscript Calculation
SUBSC
None
Store Argument Address
SUBIN
None
I/O Linkage (E)
VFIO, VRED, VWRT, VCOMP
VIOAI, VIOAF, VIOFX.VIOIX,
VI OF, VI Ol
FLOAT, ELD/E5TO, IFIX
I/O Linkage (S)
WFIO, WRED, WWRT, WCOMP
WIOAI, WIOAF, WIOFX,
WIOIX, WIOF, WIOI
FLOAT, FLD/FSTO, IFIX
Card Input/Output
CARDZ
HOLEZ
Printer-Keyboard Output
WRTYZ
GETAD, EBCTB
Printer-Keyboard Input/Output
TYPEZ
GETAD, EBCTB, HOLEZ
1132 Printer Output
PRNTZ
None
Paper Tape Input/Output
PAPTZ
None
Card Code-EBCDIC Conversion
HOLEZ
GETAD, EBCTB, HOLTB
Console Printer Code Table
EBCTB
None
Card-Keyboard Code Table
HOLTB
None
Address Calculation
GETAD
None
Called by LIBF (DM1)
Real IF Trace (E)
SEIF
FSTO, TTEST, SWRT, SIOF, SCOMP
Real IF Trace (S)
SFIF
FSTO, TTEST, SWRT, SIOF, SCOMP
Integer IF Trace
SIIF
TTEST, SWRT, SIOI, SCOMP
Integer Arithmetic Trace
SIAR, SIARX
TTEST. SWRT, SIOI, SCOMP
Real Arithmetic Trace (E)
SEAR, SEARX
ESTO, TTEST, SWRT, SIOF, SCOMP
Real Arithmetic Trace (S)
SFAR, SFARX
FSTO, TTEST, SWRT, SIOF, SCOMP
Computed GO TO Trace
SGOTO
TTEST, SWRT, SIOI, SCOMP
Trace Test- Set Indicotor
TTEST, TSET
None
Pause
PAUSE
None
Stop
STOP
None
Subscript Calculation
SUBSC
None
Store Argument Address
SUBIN
None
I/O Linkage (non-disk)
SFIO, SRED, SWRT, SCOMP,
SIOAF, SIOAI, SIOF, SIOI,
SIOFX, SIOIX
FLOAT, ELD/ESTO or FLD/FSTO, IFIX
Disk- I/O Linkage
SDFIO, SDRED, SDWRT,
SDCOM, SDAF, SDAI,
SDF, SDI, SDFX, SDIX
DISKZ
Disk Find
SDFND
DISKZ
Card Input/Output
CARDZ
HOLEZ
Disk Input/Output (part of Supervisor)
DISKZ
ILS02
Printer-Keyboard Output
WRTYZ
GETAD, EBCTB
Printer-Keyboard Input/Output
TYPEZ
GETAD, EBCTB, HOLEZ
1 1 32 Printer Output
PRNTZ
None
Paper Tape Input/Output
PAPTZ
None
Card Code-EBCDIC Conversion
HOLEZ
GETAD, EBCTB, HOLTB
Console Printer Code Table
EBCTB
None
Card-Keyboard Code Table
HOLTB
None
Address Calculation
GETAD
None
Appendix A . Listing of Subroutines 85
Table 8. DM1 and C/PT System Subrout±ae library (Cont.)
Subroutine
Subroutfnes Required
ARITHMETIC AND FUNCTIONAL
Coiled by CALL
Real Hyperbolic Tangent (E)
Real Hyperbolic Tangent (S)
Real Base to Real Exponent (E)
Real Base to Real Exponent (5)
Real Natural Logarithm (E)
Real Natural Logarrthm (S)
Real Exponential (E)
Real Exponential (S)
Real Square Root (E)
Real Square Root (S)
Real Trigonometric Sine/Cosine (E)
Real Trigonometric Sine/Cosine (S)
Real Trigonometric Arctangent (E)
Real Trigonometric Arctangent (S)
Fixed-Point Square Root
Real Absolute Value (E)
Real Absolute Value (S)
Integer Absolute Value
Real Binary to Decimal/Real Decimal to Binary
CaHed by LIBF
Get Parameters (E)
Get Parameters (S)
Real Base to Integer Exponent (E)
Real Base to Integer Exponent (S)
Real Reverse Divide (E)
Real Reverse Divide (S)
Real Divide (E)
Real Divide (S)
Real Multiply (E)
Real Multiply (S)
Real Reverse Subtract (E)
Real Reverse Subtract (S)
Real Add/Subtract (E)
Real Add/Subtract (S)
Load/Store FAC (E)
Load/Store FAC (S)
Fixed Point Double Word Divide
Fixed Point Double Word Multiply
Fixed Point Fractional Multiply (short)
Real Reverse Sign
Integer to Real
Real to Integer
Fixed Integer Base to an Integer Exponent
Normalize
Real Arithmetic Range Check
DUMP
Called by CALL
Dump Status Area
Selective Dump on Console Printer
Selective Dump on Printer
INTERRUPT LEVEL
Level
Level 1
Levels
Level 3
Level 4
ETNH
, ETANH
FTNH
, FTANH
EAXB
EAXBX
FAXB
FAXBX
ELN,
EALOG
FLN,
FALOG
EXPN
EEXP
FXPN
FEXP
ESQR,
ESQRT
FSQR,
FSQRT
ESIN,
ESINE, EGOS,
ECOSN
FSIN,
FSINE, FCOS,
FCOSN
EATN
EATAN
FATN
FATAN
XSQR
EAVL,
EABS
FAVL,
FABS
lABS
FBTD,
FDTB
EGETP
FGETP
EAXI, EAXIX
FAXI, FAX[X
EDVR, EDVRX
FDVR, FDVRX
EDIV, EDIVX
FDIV, FDIVX
EMPY, EMPYX
FMPY, FMPYX
E5BR, ESBRX
FSBR, FSBRX
EADD, EADDX, ESUB, ESUBX
FADD, FADDX, FSUB, FSUBX
ELD, ELDX, ESTO, ESTOX
FLD, FLDX, FSTO, FSTOX
XDD
XMD
XMDS
5NR
FLOAT
IFIX
FIXI, FIXIX
NORM
FARC
DMP80
DMTXO, DMTDO
DMPXl, DMPDl
ILSOO*
ILSOl*
ILS02*
ILS03*
ILS04*
*These subroutines are not identified by name in the card and paper tape systems
CONVERSION
Called by LIBF
Binary to Decimal
Binary to Hexadecimal
Decimal to Binary
EBCDIC to Console Printer Code
IBM Card Code to or From EBCDIC
IBM Card Code to Console Printer Code
BINDC
BINHX
DCBIN
EBPRT
HOLEB
HOLPR
EEXP, ELD/ESTO, EADD, EDIV, EGETP
FEXP, FLD/FSTO, FADD, FDIV, FGETP
EEXP, ELN, EMPY
FEXP, FLN, FMPY
XMD, EADD, EMPY, EDIV, NORM, EGETP
FSTO, XMDS, FADD, FMPY, FDIV, NORM, FGETP
XMD, FARC, EGETP
XMDS, FARC, FGETP
ELD/ESTO, EADD, EMPY, EDIV, EGETP
FLD/FSTO, FADD, FMPY, FDIV, FGETP
EADD, EMPY, NORM, XMD, EGETP
FADD, FMPY, NORM, XMDS, FSTO, FGETP
EADD, EMPY, EDIV, XMD, EGETP, NORM
FADD, FMPY, FDIV, XMDS, FSTO, FGETP
None
EGETP
FGETP
None
None
ELD
FLD
ELD/ESTO, EMPY, EDVR
FLD/FSTO, FMPY, FDVR
ELD/ESTO, EDIV
FLD/FSTO, FDIV
XDD, FARC
FARC
XMD, FARC
XMDS, FARC
EADD
FADD
FARC, NORM
NORM, FARC
None
None
XMD
None
None
None
NORM
None
None
None
None
None
WRTYO
PR NT I
None
None
None
None
None
None
None
None
EBPA, PRTY
EBPA, HOLL
HOLL, PRTY
86
• Table 8. DM1 and C/PT System Suhroutine Library (Cont.)
SubrouHnc
Called by LIBF (Cont'd)
Hexadecimal to Binary
EBCDIC to or from PTTC/8
IBM Card Code to or from PTTC/8
PTTC-'S to Console Printer Code
IBM Card Code to or from EBCDIC
EBCDIC and PTTC/8 Table
IBM Card Code Table
Console Printer Code Table
DISK SUBROUTINE INITIALIZE iCard^aper Tapel
Called by CALL
Set Pock Initialization Subroutine
OVERLAY (DM1)
Colled by LIBF
Local Read-in
INTERRUPT SERVICE
Called by LIBF
Card
Disk (part of Supervisor in DM1)
Paper Tape
Plotter
1132 Printer
Keyboard/Console Printer
PLOTTER SUBROUTINES
Standard Plot Calls
Standard Precision Character
Standard Precision Scale
Standard Precision Grid
Standard Precision Plot
Extended Plot Calls
Extended Precision Character
Extended Precision Scale
Extended Precision Grid
Extended Precision Plot
Common Plot Col I
Point Charocters
Standard Plot LIBFs
Standard Precision Annotation
Standard Precision Plot Scaler
Extended Plot LIBFs
Extended Precision Annotation
Extended Precision Plot Scaler
Common Plot LIBFs
Pen Mover
Interface
Interrupt Service
Synchronous Commu nications Adaptor Subroutines
Synchronous Communications Adaptor (SCA)
STR Mode
SCA(BSC, Point-to-Point Mode)
SCA(BSC, Multi-Point Mode
11 32- SCA Print with Overlap
4 of 8 Code to EBCDIC, EBCDIC to 4 of 8 Code
4 of 8 Code to IBM Cord, IBM Card Code
to 4 of 8 Code
4 of 8 Code to Table of Displacements
Table of IBM Card Codes
Table of 4 of 8 and EBCDIC Codes
Names
HXBIN
PAPEB
PAPHL
PAPPR
SPEED
EBPA
HOLL
PRTY
SPIRO, SPIRl, SPIRN
FLIPO, FLIPl
CARDO, CARDl
DISKO, DISKl, DISKN
PAPTl , PAPTN
PLOTl
PRNTl
TYPEO, WRTYO
FCHAR
SCALE
FGRID
FPLOT
ECHAR
SCALE
EGRID
EPLOT
POINT
FCHRX, FCHRl, WCHRl
FRULE, FMOVE, FINC
ECHRX, ECHRl, YCHRl
ERULE, EMOVE, EINC
XYPLT
PLOTl
PLOTX
SCAT1
SCAT2
SCAT3
PRNT2
EBC48
HOL48
HXCV
HOLCA
STRTB
Subroutines Required
None
EBPA
EBPA, HOLL
None
None
None
None
N', .e
DISKO, DISKl, DISKN
DISKZ or DISKO, DISKl or DISKN
ILSOO, ILS04
ILS02
ILS04
ILS04
ILSOl
HOLL, PRTY, ILS04
FSIN, FCOS, FPLOT, FCHRX, FLD, FSTOX, FSTO
FRULE
FPLOT, POINT, FADD, FLD, FSTO, SNR
FMOVE, YPLT, PLOTl
ESIN, ECOS, EPLOT, ECHRX, ELD, ESTO, ESTOX
ERULE
EPLOT, POINT, EADD, ELD, ESTO, SNR
EMOVE, XYPLT, PLOTl
PLOTl
FLOAT, FMPY, IFIX, FADD, FLDX, FINC, XYPLT,
PLOTl , FSTOX, FLD
FLDX, FSUBX, FMPYX, FLD, FSTOX, FMPY,
IFIX, FADD
FLOAT, EMPY, IFIX, EADD, ELDX, EINC, XYPLT,
PLOTl , ESTOX, ELD
ELDX, ESUBX, EMPYX, ELD, ESTOX, EMPY,
IFIX, EADD, ESTO
PLOTl
PLOTX
ILSOl
ILSOl
ILSOl
ILSOl
HXCV, STRTB
HXCV, HOLCA, STRTB
None
None
None
Appendix A . listing of Subroutines 87
Table 9. 1130 Disk Monitor Version 2 System Library-
System Library Programs
MAINLINES
Disk Maintenance Progroms
Disk IniHalizafion
Print Cartridge ID
Chonge Cartridge ID
Disk Copy
Writer Sector Addresses in WS
Delete CIB
Dump System Location
Equivalence Table
System Maintenance
Poper Tape Utility
Keyboard or 1134 Input/Console Printer
or 1055 Output
SUBROUTINES
Utility Calls
Selective Dump on Console Printer
Selective Dump on 1132 Printer
Dump 80 Subroutine
Update DCOM
Call System Print
Reod *ID Record
Fetch Phase IDs or. Fetch System Subroutine
Common FORTRAN Colls
Test Data Entry Switches
Divide Check Test
Functional Error Test
Overflow Test
Sense Light Control and Test
FORTRAN Trace Stop
FORTRAN Trace Start
Integer Transfer of Sign
Extended Arith/Funct Colls
Extended Precision Hyperbolic Tangent
Extended Precision A**B Function
Extended Precision Natural Logarithm
Extended Precision Exponential
Extended Precision Square Root
Extended Precision Sine-Cosine
Extended Precision Arctangent
Extended Precision Absolute Value Function
FORTRAN Sign Transfer Colls
Extended Precision Transfer of Sign
Standard Precision Transfer of Sign
Stondord Arith/Funct Colls
Standard Precision Hyperbolic Tangent
Standard Precision A**B Function
Standard Precision Notural Logarithm
Standard Precision Exponential
Standard Precision Squore Root
Standard Precision Sine-Cosine
Standard Precision Arctangent
Standard Precision Absolute Value Function
Common Arith/Funct Calls
Fixed Point (Fractional) Square Root
Integer Absolute Function
Floating Binary/EBC Decimal Conversions
Flipper for LOCAL SOCAL Subprograms
FORTRAN Trace Subroutines
Extended Floating Variable Trace
Fixed Variable Trace
Standard Floating IF Trace
Extended Floating IF Trace
Fixed IF Trace
Standard Floating Variable Trace
GO TO Trace
Names
DISC
IDENT
ID
COPY
ADRWS (cannot be called)
DLCIB
DSLET
MODIF
PTUTL
DMTDO, DMTXO
DMPDl, DMPXl
DMP80
SYSUP
CALPR
RDREC
FSLEN, FSYSU
DATSW
DVCHK
FCTST
OVERF
SLITE, SLin
TSTOP
TSTRT
ISIGN
ETANH, ETNH
EAXB, EAXBX
ELN, EALOG
EEXP, EXPN
ESQR, ESQRT
ESIN, ESINE, ECOS, ECOSN
EATN, EATAN
EABS, EAVL
ESIGN
FSIGN
FTANH, FTNH
FAXB, FAXBX
FLN, FALOG
FEXP, FXPN
FSQR, FSQRT
FSIN, FSINE, FCOS, FCOSN
FATN, FATAN
FABS, FAVL
XSQR
lABS
FBTD (BIN. TO DEC.)
FDTB(DEC. TO BIN.)
FLIPR
SEAR, SEARX
SIAR, SIARX
SFIF
SEIF
SIIF
SFAR, SFARX
SGOTO
Type and
Sub-type
2,0
2,0
2,0
2,0
2
2,0
2,0
4,0
4,0
4,0
4,0
4,0
4,0
4,0
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,8
4,0
4,0
3,0
3,0
3,0
3,0
3,0
3,0
3,0
Subroutines Required
SYSUP, RDREC, DISK2
CALPR, DISKZ
RDREC, CALPR, DISKZ
RDREC, DISKZ
Linked From D UP DWADR
RDREC, DISKZ
FSLEN, DISKZ
DISKZ
WRTYO
PRNTI
None
FSLEN, FSYSU
FSLEN
FSLEN
DISKZ
None
None
None
None
None
TSET
TSET
None
EEXP, ELD/ESTO, EADD, EDIV, EGETP
EEXP, ELN, EMPY
XMD, EADD, EMPY, EDIV, NORM, EGETP
XMD, FARC, EGETP
ELD/ESTO, EADD, EMPY, EDIV, EGETP
EADD, EMPY, NORM, XMD, EGETP
EADD, EMPY, EDIV, XMD, EGETP, NORM
EGETP
ESUB, ELD
FSUB, FLD
FEXP, FLD/FSTO, FADD, FDIV, FGETP
FEXP, FLN, FMPY
FSTO, XMDS, FADD, FMPY, FDIV, NORM, FGETP
XMDS, FARC, FGETP
FLD/FSTO, FADD, FMPY, FDIV, FGETP
FADD, FMPY, NORM, XMDS, FSTO, FGETP
FADD, FMPY, FDIV, XMDS, FSTO, FGETP
FGETP
None
None
None
DISKZ, DISKl, or DISKN
ESTO, TTEST, SWRT, SIOF, SCOMP
TTEST, SWRT, SIOI, SCOMP
FSTO, TTEST, SWRT, SIOF, SCOMP
FSTO, TTEST, SWRT, SIOF, SCOMP
TTEST, SWRT, SIOI, SCOMP
FSTO, TTEST, SWRT, SIOF, SCOMP
TTEST, SWRT, SIOI, SCOMP
88
# Table 9. 1130 Disk Monitor Version 2 System Library (Cont.)
System Library Progroms
Non-Disk FORTRAN Format I/O
FORTRAN Format Subroutine
FORTRAN Find Subroutine
Disk FORTRAN I/O
Unformatted FORTRAN Disk I/O
FORTRAN Common LIBFs
FORTRAN Pause
FORTRAN Stop
FORTRAN Subscript Displacement
Calculation
FORTRAN Subroutine Initialization
FORTRAN Troce Test and Set
FORTRAN I/O and Conversion Subroutines
FORTRAN 1442 Input/Output Subroutine
FORTRAN 1442 Output Subroutine
FORTRAN 2501 Input Subroutine
Disk I/O Routine (Port of Supervisor)
FORTRAN Paper Tape Subroutine
FORTRAN 1132 Printer Subroutine
FORTRAN 1403 Printer Subroutine
FORTRAN Keyboard-Typewriter Subroutine
FORTRAN Typewriter Subroutine
FORTRAN 1627 Plotter Subroutine
FORTRAN Hollerith to EBCDIC Conversion
FORTRAN Get Address Routine
FORTRAN EBCDIC Table
FORTRAN Hollerith Table
Extended Arith/Funct LIBFs
Extended Precision Get Parameter Subroutine
Extended Precision A** I Function
Extended Precision Divide Reverse
Extended Precision Float Divide
Extended Precision Float Multiply
Extended Precision Subtract Reverse
Extended Add-Subtroct
Extended Load-Store
Standard Arith/Funct LIBFs
Standard Precision Get Parameter Subroutin
Standard Precision A**l Function
Standard Precision Divide Reverse
Standard Precision Float Divide
Standord Precision Float Multiply
Standard Precision SubtractoReverse
Standard Add-Subtract
Standard Load-Store
Standard Precision Fractional Multiply
Common Arith/Funct LIBFs
Names
Fixed Point (Fractional) Double Divide
Fixed Point (Fractior>al) Double Multiply
Sign Reversal Function
Integer to Floating Point Function
Floating Point to Integer Function
l**J Integer Function
Normalize Subroutine
Floating Accumulator Range Check
Subroutine
Interrupt Service Subroutines
1442 Card Read Punch Input/Output
(No Error Parameter)
1442 Cord Read Punch Input/Output
(Error Parameter)
2501 Cord Read Input (No Error Parameter)
2501 Cord Read Input (Error Parameter)
1442 Card Punch CVitput (No Error Parameter)
1442 Card Punch Output (Error Parameter)
Multiple Sector Disk Input/Output (Part
of Supervisor)
High Speed Multiple Sector Disk Input/
Output (Port of Supervisor)
Synchronous Communications Adaptor
(SCA) STR Mode
SFIO, SIOI, SIOAI, SIOF, SIOAF,
SIOFX, SCOMP, SWRT, SRED, SIOIX
SDFND
SDFIO, SDRED, SDWRT, SDCOM,
SDAF, SDF, SDI, SDIX, SDFX, SDAI
SUFIO
PAUSE
STOP
SUBSC
SUBIN
TTEST, TSET
CARDZ
PNCHZ
READZ
DISKZ
PAPTZ
PRNTZ
PRNZ
TYPEZ
WRTYZ
PLOTX
HOLEZ
GETAD
EBCTB
HOLTB
EGETP
EAXI, EAXIX
EDVR, EDVRX
EDIV, EDIVX
EMPY, EMPYX
ESBR, EXBRX
EADD, ESUB, EADDX, ESUBX
ELD, ELDX, ESTO, ESTOX
FGETP
FAX I, FAXIX
FDVR, FDVRX
FDIV, FDIVX
FMPY, FMPYX
FSBR, FSBRX
FADD, FSUB, FADDX, FSUBX
FLD, FLDX, FSTO, FSTOX
XMOS
XDD
XMD
SNR
FLOAT
IFIX
FIXI, FIXIX
NORM
FARC
CARDO
CARDl
READO
READl
PNCHO
PNCHl
DISKl
DISKN
SCATl
Type and
Sub-type
3,3
3,1
3,1
3,1
3,2
3,2
3,0
3,0
3,0
5,3
5,3
5,3
5,3
5,3
5,3
5,3
5,3
5,0
3,3
3,3
3,3
3,3
3,2
3,2
3,2
3,2
3,2
3,2
3,2
3,0
3,2
3,2
3,2
3,2
3,2
3,2
3,2
3,0
3,2
3,2
3,2
3,2
3,0
3,0
3,2
3,0
3,2
5,0
5,0
5,0
5,0
5,0
5,0
5,0
Subroutines Required
FLOAT, ELD/ESTO or FLD/lFSTO, IFIX
DISKZ, DISKl, or DISKN
DISKZ, DISKl, or DISKN
DISKZ, DISKl, or DISKN
None
None
None
None
None
HOLEZ, GETAD, EBCTB, HOLTB, ILSOO, ILS04
HOLEZ, GETAD, EBCTB, HOLTB, ILSOO, ILS04
HOLEZ, GETAD, EBCTB, HOLTB, ILS04
ILS02
ILS04
ILSOl
ILS04
GETAD, EBCTB, HOLEZ, ILS04
GETAD, EBCTB, ILS04
ILS03
GETAD, EBCTB, HOLTB
None
None
None
ELD
ELD/ESTO, EMPY, EDVR
ELD/ESTO, EDIV
XDD, FARC
XMD, FARC
EADD
FARC, NORM
None
FLD
FLD/FSTO, FMPY, FDVR
FLDASTO, FDIV
FARC
XMDS, FARC
FADD
NORM, FARC
None
None
XMD
None
None
NORM
None
None
None
None
ILSOO, ILS04
ILSOO, ILS04
ILS04
ILS04
ILSOO, ILS04
ILSOO, ILS04
ILS02
ILS02
ILSOl
Appendix A. Listing of Subioutines 89
Table 9. 1130 Disk Monitor Version 2 System Library (Cont.)
System Library Programs
Names
Type and
Sub-type
Subroutines Required
Interrupt Service Subroutines (Cont'd)
SCA(BSC, Point-to-Point Mode)
SCAT2
5,0
ILSOl
SCA(BSC, Multi-Point Mode)
SCAT3
5,0
ILSOI
Paper Tape Input/Output
PAPTl
5,0
ILS04
Simultaneous Paper Tape Input/Output
PAPTN
5,0
ILS04
CharacterAVord Count Paper Tape Input/
PAPTX
5,0
ILS04
Output
Plotter Output Subroutine
PLOTl
5,0
ILS03
1 132 Printer Output Subroutine
PRNTl
5,0
ILSOl
1 132-SCA Print With Overlap
PRNT2
5,0
ILSOl
1403 Printer Output Subroutine
PRNT3
5,0
ILS04
Keyboard/Console Printer Input/Output
TYPEO
5,0
HOL, PRTY, ILS04
Console Printer Output Subroutine
WRTYO
5,0
ILS04
1231 Opticol Mark Page Reader Input
OMPRl
5,0
ILS04
Subroutine
Conversion Subroutines
BINDC
3,0
None
Binary Word to 6 Decimal Characters
(Card Code)
Binary Word t6 A Hexadecimal Characters
BINHX
3,0
None
(Cord Code)
6 Decimal Characters (Card Code) to
DCBIN
3,0
None
Binary Word
EBCDIC to Console Printer Output Code
EBPRT
3,0
EBPA, PRTY
Card Code to EBCDIC-EBCDIC to Cord Code
HOLEB
3,0
EBPA, HOLL
Cord Code to Console Printer Output Code
HOLPR
3,0
HOLL, PRTY
4 Hexodecimal Characters (Card Code) to
HXBIN
3,0
Mone
Binary Word
PTTC/8 to EBCDIC-EBCDIC to PTTC/8
PAPEB
3,0
EBPA
PTTC/8 to Card Code-Card Code to
PAPHL
3,0
EBPA, HOLL
PTTC/8
PTTC/8 to Console Printer Output Code
PAPPR
3,0
EBPA, PRTY
Card Code to EBCDIC-EBCDIC to Card Code
SPEED
3,0
None
4 of 8 Code to EBCDIC, EBCDIC to 4 of 8
EBC48
3,0
HXCV, STRTB
Code
4 of 8 Code to IBM Card Code ,
HOL48
3,0
HXCV, HOLCA, STRTB
IBM Card Code to 4 of 8 Code
4 of 8 Code to Table of Displacements
HXCV
3,0
None
32-Bit Binary Value to IBM Cord Code
BIDEC
3,0
None
Decimal Value
IBM Card Code Decimal Value to 32-Bit
DECBI
3,0
None
Binary Value
Supplement to All Standard Conversions
ZIPCO
3,0
Any ZIPCO Conversion Table
Except Those Involving PTTC/8
Conversion Tables
EBPA
3,0
None
EBCDIC and PTTC/8
Cord Code Table
HOLL
3,0
None
Console Printer Output Code Table
PRTY
3,0
None
Table of IBM Cord Codes
HOLCA
3,0
None
Table of 4 of 8 ond EBCDIC Codes
STRTB
3,0
None
ZIPCO Conversion Tables
EBCCP
3,0
None
EBCDIC to Console Printer Code
EBCDIC to IBM Card Code
EBHOL
3,0
None
EBCDIC to 1403 Printer Code
EBPT3
3,0
None
Console Printer Code to EBCDIC
CPEBC
3,0
None
Console Printer Code to IBM Card Code
CPHOL
3,0
None
Console Printer Code to 1403 Printer Code
CPPT3
3,0
None
IBM Cord Code to EBCDIC
HLEBC
3,0
None
IBM Card Code to Console Printer Code
HOLCP
3,0
None
IBM Cord Code to 1403 Printer Code
HLPT3
3,0
None
1403 Printer Code to EBCDIC
PT3EB
3,0
None
1403 Printer Code to Console Printer Code
PT3CP
3,0
None
1403 Printer Code to IBM Card Code
PTHOL
3,0
None
Interrupt Level Subroutines
ILSOO
7,0
None
Interrupt Level Zero Subroutine
Interrupt Level One Subroutine
ILSOl
7,0
None
Interrupt Level Two Subroutine (Part of
ILS02
7,1
None
Supervisor)
Interrupt Level Three Subroutine
ILS03
7,0
None
Interrupt Level Four Subroutine (Part of
ILS04
7,1
None
Supervisor)
Standard Plot Colls
FCHAR
4,0
FSIN, FCOS, FPLOT, FCHRX, FLD, FSTOX,
FSTO
Standard Precision Character
Stondard Precision Scale
SCALF
4,0
FRULE
Standard Precision Grid
FGRID
4,0
FPLOT, POINT, FADD, FLD, FSTO, SNR
Standard Precision Plot
FPLOT
4,0
FMOVE, XYPLT, PLOTl
90
Table 9. 1130 Disk Monitor Version 2 System Library (Cont.)
System Library Programs
Names
Type and
Sub-type
Subroutines Required
Extended Plot Calls
ECHAR
SCALE
EGRID
EPLOT
4,0
4,0
4,0
4,0
ESIN, ECOS, EPLOT, ECHRX, ELD, ESTO, ESTOX
ERULE
EPLOT, POINT, EADD, ELD, ESTO, SNR
EMOVE, XYPLT, PLOTI
Extended Precision Character
Extended Precision Scale
Extended Precision Grid
Extended Precision Plot
Common Plot Call
POINT
4,0
PLOTI
Point Characters
Standard Plot LIBFs
FCHRX, FCHRI, WCHRI
3,2
FLOAT, FMPY, IFIX, FADD, FLDX, FINC, XYPLT, PLOTI,
FSTOX, FLD
Standard Precision Annotation
Standard Precision Plot Scaler
FRULE, FMOVE, FINC
3,2
FLDX, FSUBX, FMPYX, FLD, FSTOX, FMPY, IFIX, FADD
Extended Plot LIBFs
ECHRX, ECHRI, YCHRI
3,2
FLOAT, EMPY, IFIX, EADD, ELDX, EINC, XYPLT, PLOTI,
ESTOX, ELD
Extended Precision Annotation
Extended Precision Plot Scaler
ERULE, EMOVE, EINC
3,2
ELDX, ESUBX, EMPYX, ELD, ESTOX, EMPY, IFIX, EADD,
ESTO
Common^Plot LIBFs
XYPLT
PLOTI
PLOTX
3,2
3,2
5,0
PLOTI
PLOTX
ILS03
Pen Mover
Interface
Interrupt Service
Appendix A , Listing of Subroutines 91
APPENDIX B. ERRORS DETECTED BY THE ISS SUBROUTINES
ERROR
CONTENTS OF ACCUMULATOR
Unary
Hexadecimal
Content's of
Extension
(if any)
1442 Card Read Punch or 1442 Card Punch
*Last card
*Feed check
'Read check
*Punch check
Device not ready
Last cord indicator on for Read
Illegal device (not version)
Device not in system
Illegal function
Word count over +80
Word count zero or negative
Keyboard/Console Printer
Device not ready
Device not in system
Illegal function
Word count zero or negative
1134/1055 Paoer Tape Reader/Punch
*Punch not ready
•Reader not ready
Device not ready
Illegal device
Illegal function |
Word count zero or negative
Illegal check digit I
2501 Card Reader
*Last card
*Feed check 1
•Read check (
Device not ready
Illegal function
Word count over +80
Word count zero or negative
Disk
*Reod check remaining offer ten attempts
(16 for DM2 system) l
Data Error f
Data overrun I
*WrIte check remaining after ten attempts i
(16 for DM2 system)
Write select j
Data error j
Data Overrun I
*Seek failure remaining after ten attempts
(16 for DM2 system)
*Disk overflow
Device not ready
Illegal device (not version)
Device not in system
Illegal function
Attempt to write in file protected area
Word count zero or negotive '
Word count over +320 (DISKO only)
Starting sector identification over + 1599 '
Write select/power unsafe
Identical to 5001 except error caused
by Monitor program (DISKl ,
DISKN only)
0000000000000000
•fO 000000000000001
{0 001000000000000
{0 001 000000000001
0010000000000000
(0 01 0000000000001
0000000000000100
00000000O0O00101
00110O0OO000000O
{0 01 1000000000001
Disk error (DISKZ only)
0000000000000000
-[OOOOOOOOOOOOOOO 1
1 00000000000000
{O 1 00000000000001
"OOOOOOOOOOOOOOO 1
.0 00000000000001
000000000000001 1
0000000000000100
0101000000000000
-|-[0 1 01 OOOOOOOOOOOl
0101000000000010
[OlOIOOOOOOOOOOl 1
OIOIOOOOOOOOOIOO
1
10
10 1
2
2 1
4
5
3
3 1
1
4
4 1
1
2
3
4
5
5 1
5 2
5 3
5 4
Effective Sector Id
Effective Sector Id
Effective Sector Id
Effective Sector Id
Effective Sector Id
NOTE: The errors marked with an asterisk cause a branch via the error parameter . These ore postoperative errors and ore detected
during the processing of interrupts; as a consequence, the user error subroutine is on interrupt subroutine, executed at the priority level
of the I/O device. All other errors are preoperotiye and cause a branch to location/0029 on the DM1 and C/PT system or $PRET+I on
the DM2 system . The address of the LIBF in error is in location/0028 or $PRET.
92
ERROR
CONTENTS OF ACCUMULATOR
Binary
Hexodecimal
Contents of
Extension
(if any)
1132 Printer
*Chonnel 9 detected
♦Channel 12 detected
Device not ready or end of forms
IMego! function i
Word count over +60 >
Word count zero or negative )
Plotter
Plotter not reody
Illegal device
Device not in system
Illegal function
Word count zero or negative
1403 Printer
*Ring check
*Sync check
♦Parity check
♦Chonnel 9 detected
♦Channel 12 detected
Device not ready or end of forms
Illegal function ^
Word count over +60 >
Word count zero or negative )
Optical Mark Page Reader
Master mark
Timing mark error
Read error
Hopper empty
Document selected
Device not ready
Illegal function
000000000000001 1
0000000000000 1 00
01 lOOOOOOOOOOOOO
-[0 1 lOOOOOOOOOOOOl
0111000000000000
-[0 1 11000000000001
-[0 000000000000001
000000000000001 1
00000000000001 00
1 001 000000000000
-[1001000000000001
0000000000000001
-[OOOOOOOOOOOOOOIO
000000000000001 1
00000000000001 00
1010000000000000
1010000000000001
3
4
6
6 1
7
7 1
1
3
4
9
9 1
1
2
A
NOTE: The errors marked with an asterisk cause a branch via the error parameter. These are postoperative errors and are detected during
ttie processing of interrupts; as o consequence, the user error subroutine is an interrupt subroutine, executed at the priority level of the
I/O device. All other errors are preoperative and cause a branch to location/0029 on the DM1 or C/PT system or $PRET+1 on the DM2
system. The address of the LIBF in error is in locaKon/0028 or $PRET.
Appendix B. Eirois Detected by the ISS Subroutines 93
APPENDIX C. SUBROUTINE ACTION AFTER RETURN FROM A USER'S ERROR SUBROUTINE
Error Code
Condition
Subroutine Action
1442 Card Read Punch or
1442 Card Punch
0000
0001*
If function is PUNCH
Otherwise
If Accumulator is
Otherwise
Eject card and terminate
Temiinate Immediately
Terminate immediately
DM1 and C/PT System: Loop until 1442 is ready, then reinitiate operation
DM2 System: WAIT at $PST4 until 1442 Is readied and PROGRAM START pressed
2501 Card Reader
0000
0001*
If Accumulator is
Otherwise
Terminate
Terminate immediately
WAIT at SPST4 until 2501 Is readied and PROGRAM START pressed
1134/1055 Paper Tape Reader/Punch
0004, 0005
If Accumulator is
Otherwise
Terminate Immediately
Check again for device ready
Disk
OOOU 0002, and 0003
If Accumulator is
Otherwise
Temiinate immediately
Retry 10 times {DM1 and C/PT system), or 16 times (DM2 system)
1132 Printer
0003, and 0004
if Accumulator is
Otherwise
Terminate immediately
Skip to channel 1 and then terminate
1403 Printer
0001
0003, and 0004
If Accumulator is
Otherwise
If Accumulator is
. Otherwise
Terminate Immediately
Check for device ready and reinitiate the operation
Terminate immediately
Skip to channel 1 and then terminate
1231 OMPR
0001
0002*
0003
0004*
If Accumulator Is
Otherwise
If Accumulator is
Otherwise
If Accumulator Is
Otherwise**
Continue nomial processing
Use contents of Accumulator as new address of I/O area
Terminate, immediately
Check device ready, then reinitiate operation
Terminate
Terminate immediately
Check device ready, then reinitiate operation
Assumes operator Intervention
User must provide a WAIT In his error subroutine to allow him to remove the sheet from the select stacker,
place the sheet back in the hopper, and make the 1231 ready.
94
APPENDIX D. CHARACTER CODE CHART
Ref
No.
EBCDIC
IBM Card Code
Graph
cs and Control
Names
1132
Printer
EBCDIC
PTTC/8
Hex
U -Upper Case
Console
Printer
Hex
1403
Printer
Binary
Hex
Rows
Hex
0123 4567
12 11 9 8
7-1
Subset Hex
L-Lower Case
Notes
Hex
0000 0000
00
12
9 8
1
B030
NUL
I
0001
01
12
9
1
9010
2
0010
02
12
9
2
8810
3
0011
03
12
9
3
8410
4
0100
04
12
9
4
8210
PF
Punch Off
5*
0101
05
12
9
5
8110
HT
Horiz.Tab
6D(UA)
-*' ®
6*
0110
06
12
9
6
8090
LC
Lower Case
6E (U/L)
7*
0111
07
12
9
7
8050
DEL
Delete
7F (U/L)
8
1000
08
12
9 8
8030
9
1001
09
12
9 8
1
9030
10
1010
OA
12
9 8
2
8830
11
1011
OB
12
9 8
3
8430
12
1100
OC
12
9 8
4
.8230
13
1101
OD
12
9 8
5
8130
14
1110
OE
12
9 8
6
80B0
15
nil
OF
12
9 8
7
8070
16 0001 0000
10
12 1
1 9 8
1
D030
17
0001.
11
1 9
1
5010
18
0010
12
1 9
2
4810
19
0011
13
1 9
3
4410
20*
0100
14
1 9
4
4210
RES
Restore
4C (UA)
05 (D
21*
0101
15
1 9
5
4110
NL
New Line
DD{U/L
5E (U/L
81 @
22*
Olio
16
1 9
6
4090
BS
Backspace
11
23
0111
17
1 9
7
4050
IDL
Idle
24
1000
18
1 9 8
4030
25
1001
19
1 9 8
1
5030
26
1010
lA
1 9 8
2
4830
27
1011
IB
1 9 8
3
4430
28
1100
IC
1 9 8
4
4230
29
1101
ID
1 9 8
5
4130
30
1110
IE
1 9 8
6
40BO
31
nil
IF
1 9 8
7
4070
32 0010 0000
20
1
10 9 8
1
7030
33
0001
21
9
1
3010
34
0010
22
9
2
2810
35
0011
23
9
3
2410
36
0100
24
9
4
2210
BYP
Bypass
37*
0101
25
9
5
2110
LF
Line Feed
3D(UA)
03
38*
Olio
26
9
6
2090
EOB
End of Block
3E(U/L)
39
0111
27
9
7
2050
PRE
Prefix
40
1000
28
9 8
2030
41
1001
29
9 8
1
3030
42
1010
2A
9 8
2
2830
43
1011
2B
9 8
3
2430
44
1100
2C
9 8
4
2230
45
1101
2D
9 8
5
2130
46
1110
2E
9 8
6
20B0
47
nil
2F
9 8
7
2070
48 0011 OOOO
30
12 1
10 9 8
1
F030
49
0001
31
9
1
1010
50
0010
32
9
2
0810
51
0011
33
9
3
0410
52
0100
34
9
4
0210
PN
Punch On
53*
0101
35
9
5
0110
RS
Reader Stop
OD(U/L)
09 @
54*
Olio
36
9
6
0090
UC
Upper Case
OE(U/L)
55
0111
37
9
7
0050
EOT
End of Trans.
56
1000
38
9 8
0030
57
1001
39
9 8
1
1030
58
1010
3A
9 8
2
0830
59
1011
3B
9 8
3
0430
60
1100
3C
9 8
4
0230
61
1101
3D
9 8
5
0130
62
1110
3E
9 8
6
OOBO
63
nil
3F
9 8
7
0070
NOTES: Typewriter Output
<D Tabulate
(D Shift to black
Carrier Return
Shift to red
* Recognized by all Conversion subroutines
Codes that are not asterisked are recognized only by the SPEED subroutine
Appendix D. Character CcxJe Chart 95
Ref
No.
EBCDIC
IBM Card Code
Graphics and Control
Names
1132
Printer
EBCDIC
Subset Hex
PTTC/8
Hex
U-Upper Case
L-Lower Case
Console
Printer
Hex
1403
Printer
Hex
Binary
0123 4567
Hex
12 11
Rows
9 8
7-1
Hex
64* 0100 0000
40
no punches
0000
blank
40
10 (U/L)
21
7F
65
0001
41
12
9
1
BOlO
66
0010
42
12
9
2
A810
67
0011
43
12
9
3
A410
68
0100
44
12
9
4
A210
6?
0101
45
12
9
5
Alio
70
0110
46
12
9
6
A090
71
0111
47
12
9
7
A050
72
1000
48
12
9 8
A030
73
1001
49
12
8
1
9020
74*
1010
4A
12
8
2
8820
+
20 (U)
6B(L)
02 (U)
19 (U)
70 (U)
3B(U)
02
75*
1011
4B
12
8
3
8420
(period)
4B
00
6E
76*
1100
4C
12
8
4
8220
<
DE
77*
1101
4D
12
8
5
8120
(
40
FE
57
78*
1110
4E
12
8
6
80AO
+
4E
DA
6D
79* V 1111
4F
12
8
7
8060
1 (logical OR)
C6
80* 0101 0000
50
12
8000
&
50
70 (L)
44
15
81
0001
51
12 11
9
1
D010
82
0010
52
12 11
9
2
C810
83
0011
53
12 11
9
3
C410
84
0100
54
12 11
9
4
C210
85
0101
55
12 11
9
5
Clio
86
Olio
56
12 11
9
6
C090
87
0111
57
12 11
9
7
C050
88
1000
58
12 11
9 8
C030
89
1001
59
11
8
1
5020
90*
1010
5A
11
8
2
4820
1
5B(U)
42
91*
1011
5B
11
8
3
4420
$
5B
5B(L)
40
62
92*
1100
5C
11
8
4
4220
*
5C
08(U)
D6
23
93*
1101
5D
11
8
5
4120
)
5D
1A(U)
F6
2F
94*
1110
5E
11
8
6
40AO
13 (U)
D2
95* » 1111
5F
11
8
7
4060
-^ (logical NOT)
6B(U)
F2
96* 0110 0000
60
11
4000
- (dash)
60
40 (L)
84
61
97*
0001
61
1
3000
/
61
31 (L)
BC
4C
98
0010
62
11
9
2
6810
99
0011
63
11
9
3
6410
100
0100
64
11
9
4
6210
101
0101
65
11
9
5
6110
102
Olio
66
11
9
6
6090
103
0111
67
11
9
7
6050
104
1000
68
11
9 8
6030
105
1001
69
8
1
3020
106
1010
6A
12 11
COOO
lOT'
1011
6B
8
3
2420
, (comma)
6B
3B(L)
80
16
108*
1100
6C
8
4
2220
%
I5(lfl
06
109*
1101
6D
8
5
2120
(underscore)
40 (U)
BE
110*
1110
6E
8
6
20A0
>
07 (U)
46
HI* nil
6F
8
7
2060
?
31 (U)
86
112 0111 0000
70
12 11
EOOO
113
0001
71
12 11
9
1
FOlO
114
0010
72
12 11
9
2
E810
115
0011
73
12 11
9
3
E410
116
0100
74
12 11
9
4
E210
117
0101
75
12 11
9
5
E110
118
Olio
76
12 11
9
6
E090
119
0111
77
12 11
9
7
E050
120
1000
78
12 11
9 8
E030
121
1001
79
8
1
1020
122*
1010
7A
8
2
0820
04 (U)
82
123*
1011
7B
8
3
0420
#
OB(q
CO
124*
1100
7C
8
4
0220
©
20 (L)
04
125*
1101
7D
8
5
0120
' (apostrophe)
7D
16 (U)
E6
OB
126*
1110
7E
8
6
OOAO
=
7E
01 (U)
C2
4A
127* » nil 1
7F
8
7
0060
OB(U)
E2
96
EBCDIC 1
IBM Card Code
Graphics and Control
1132
Printer
PTTC/8
Console
1403
Ref
Rows
Hex
Hex
Printer
Printer
No.
Binary
Hex
Names
EBCDIC
U -Upper Case
Hex
Hex
0123 4567
12 11 9 8 7-1
Subset Hex
L-Lower Case
128 1000 0000 1
80
12 8 1
B020
129
0001
81
12 1
BOOO
a
130
0010
82
12 2
A800
b
131
0011
83
12 3
A400
c
132
0100
84
12 4
A200
d
133
0101
85
12 5
A100
e
134
0110
86
12 6
A080
f
135
0111
87
12 7
A040
?
136
1000
88
12 8
A020
h
137
1001
89
12 9
A010
1
138
1010
BA
12 8 2
AB20
139
1011
8B
12 8 3
A420
140
1100
8C
12 8 4
A220
141
1101
8D
12 8 5
A120
142
1110
8E
12 8 6
AOAO
143
nil
8F
12 8 7
A060
144 1001 0000
90
12 11 8 1
D020
145
0001
91
12 11 1
DOOO
146
0010
92
12 11 2
C800
c
147
0011
93
12 11 3
C400
1
148
0100
94
12 11 4
C200
m
149
0101
95
12 11 5
C100
n
150
0110
96
12 11 6
COBO
o
151
0111
97
12 11 7
C040
P
152
1000
98
12 11 8
C020
q
153
1001
99
12 11 9
COlO
r
154
1010
9A
12 11 8 2
C820
155
1011
9B
12 11 8 3
C420
156
1100
9C
12 11 8 4
C220
157
1101
9D
12 11 8 5
C120
158
1110
9E
12 11 8 6
COAO
159
nil
9F
12 11 8 7
C060
160 1010 0000
AO
11 8 1
7020
161
0001
Al
11 1
7000
162
0010
A2
11 2
6800
s
163
0011
A3
110 3
6400
t
164
0100
A4
no 4
6200
u
165
0101
A5
110 5
6100
V
166
0110
A6
110 6
6080
w
167
oil!
A7
11 7
6040
X
168
1000
A8
11 8
6020
y
169
1001
A9
11 9
6010
z
170
1010
AA
11 8 2
6820
171
1011
AB
11 8 3
6420
172
1100
AC
11 8 4
6220
173
1101
AD
11 8 5
6120
174
1110
AE
11 8 6
60A0
175 ' nil
AF
11 8 7
6060
176 1011 0000
BO
12 11 8 1
F020
177
0001
Bl
12 11 1
FOOO
178
0010
B2
12 11 2
E800
179
0011
B3
12 11 3
E400
180
0100
B4
12 11 4
E200
181
0101
B5
12 11 5
ElOO
182
Olio
B6
12 11 6
E080
183
0111
B7
12 11 7
E040
184
1000
B8
12 11 8
E020
185
1001
B9
12 11 9
E010
186
1010
BA
12 11 8 2
E820
187
1011
BB
12 11 8 3
E420
188
1100
BC
12 11 8 4
E220
189
1101
BD
12 11 8 5
E120
190
1110
BE
12 11 8 6
EOAO
191
nil
BF
12 11 8 7
E060
1
Appendix D. Character Code Chart 97
EBCDIC
IBM Card Code
1132
Printer
EBCDIC
PTTC/8
Hex
U-Upper Case
Console
Printer
1403
Printer
Ref
No.
Binary
Hex
Rows
Hex
Graphics and Control
Names
123 4567
12 11 9 8 7-1
Subset Hex
L-Lowei Case
Hex
Hex
192 1 100 0000
CO
12
AOOO
(+ zero)
193*
0001
CI
12 1
9000
A
CI
61 (U)
3C or 3E
64
194*
0010
C2
12 2
8800
B
C2
62 (U)
73 (U)
64 (U)
75 (U)
18 or lA
25
195*
0011
C3
12 3
8400
C
C3
IC or IE
26
196*
197*
0100
0101
C4
C5
12 4
12 5
8200
8100
D
E
C4
C5
30 or 32
34 or 36
67
68
198*
0110
C6
12 6
8080
F
C6
76 (U)
67 (U)
68 (U)
79 (U)
10 or 12
29
199*
200*
201*
202
0111
1000
1001
1010
C7
C8
C9
CA
12 7
12 8
12 9
12 9 8 2
8040
8020
8010
A830
G
H
1
C7
C8
C9
14 or 16
24 or 26
20 or 22
2A
6B
2C
203
1011
CB
12 9 8 3
A430
204
1100
CC
12 9 8 4
A230
205
1101
CD
12 9 8 5
A 130
206
1110
CE
12 9 8 6
AOBO
207
nil
CF
12 9 8 7
A070
208 1101 0000
DO
11
6000
(- zero)
209*
210*
211*
212*
213*
214*
215*
216*
217*
218
0001
0010
0011
0100
0101
Olio
0111
1000
1001
1010
Dl
D2
D3
D4
D5
D6
D7
D8
D9
DA
11 1
11 2
n 3
n 4
n 5
11 6
11 7
11 8
11 9
12 11 9 8 2
5000
4800
4400
4200
4100
4080
4040
4020
4010
C830
J
K
L
M
N
O
P
Q
R
Dl
D2
D3
D4
D5
D6
D7
D8
D9
51 (U)
52 (U)
43 (U
54 (U
45 (U
46 (U
57 (U
58 (U)
49 (U)
7C or 7 E
58 or 5A
5C or 5E
70 or 72
74 or 76
50 or 52
54 or 56
64 or 66
60 or 62
58
19
lA
5B
IC
5D
5E
IF
20
219
1011
DB
12 11 9 8 3
C430
220
1100
DC
12 11 9 8 4
C230
221
1101
DD
12 11 9 8 5
C130
222
1110
DE
12 11 9 8 6
COBO
223 » 1111
DF
12 11 9 8 7
C070
224 1110 0000
EO
8 2
2820
225
0001
El
11 9 1
7010
226*
227*
228*
229*
230*
231*
232*
233*
234
0010
0011
0100
0101
Olio
0111
1000
1001
1010
E2
E3
E4
E5
E6
E7
E8
E9
EA
2
3
4
5
6
7
8
9
11 9 8 2
2800
2400
2200
2100
2080
2040
2020
2010
6830
5
T
U
V
W
X
Y
Z
E2
E3
E4
E5
E6
E7
E8
E9
32 (U)
23 (U)
34 (U)
25 (U)
26 (U)
37 (U)
38 U)
29 U)
98 or 9A
9C or 9E
BO or B2
B4 or B6
90 or 92
94 or 96
A4 or A6
AO or A2
OD
OE
4F
10
51
52
13
5A
235
1011
EB
11 9 8 3
6430
236
1100
EC
11 9 8 4
6230
237
1101
ED
11 9 8 5
6130
238
1110
EE
11 9 8- 6
60B0
239
nil
EF
11 9 8 7
6070
240* 11
241*
242*
1 0000
0001
0010
FO
Fl
F2
1
2
2000
1000
0800
I
2
FO
Fl
F2
1A(L)
01 (L)
02 (L)
C4
FC
D8
49
40
01
243*
244*
245*
246*
247*
248*
249*
0011
0100
0101
Olio
0111
1000
1001
F3
F4
F5
F6
F7
F8
F9
3
4
5
6
7
8
9
0400
0200
0100
0080
0040
0020
0010
3
4
5
6
7
8
9
F3
F4
F5
F6
F7
F8
F9
13 (L)
04 (L)
15 (L)
16 (L)
07 (L)
08 (L)
19 (L)
DC
FO
F4
DO
D4
E4
EO
02
43
04
45
46
07
08
250
1010
FA
12 11 9 8 2
E830
251
1011
FB
12 11 9 8 3
E430
252
1100
FC
12 11 9 8 4
E230
253
1101
FD
12 11 9 8 5
EI30
254
1110
FE
12 11 9 8 6 EOBO
255
nil
FF
12 11 9 8 7 E070
98
APPENDIX E. CORE REQUIREMENTS
Communications Adaptor subroutine core require-
ments are listed in the publication IBM 1130 Synchron-
ous Communications Adaptor Subroutines (Form
C26-3706). 1627 Plotter subroutine core require-
ments are included in the publication IBM 1130/1800
Plotter Subroutines (C26-3755).
> Table 10. Arithmetic and Functional Subroutines
Standard
Extended
Standard
Extended
FADD/FADDX
}
102
EADD/EADDX
ESUB/ESUBX
EMPY/EMPYX
98
CAT System
C/PT System
FSUB/FSUBX
FMPY/FMPYX
52
46
WARI/WARIX
32
VARI/VARIX
32
FDIV/FDIVX
FLD/FLDX
}
86
EDIV/EDIVX
ELD/ELDX \
ESTO/ESTOX J
78
46
WIAR/W1ARX
WIF
36
26
VIAR/VIARX
VIF
36
26
FSTO/FSTOX
54
WIIF
24
VIIF
24
FLOAT
10
10
WGOTO
22
VGOTO
22
IFIX
40
40
WFIO/WIOIA'IOAI/ 1
VFIOAIOIA/IOAI/
NORM
42
42
WIOF/WIOAF/ /
VIOF/VIOAF/ /
FSBR/FSBRX
24
ESBR/ESBRX
24
WIOFX/WCOMP/ )
854
VIOFX/VCOMP/ )
864
FDVR/FDVRX
28
EDVR/EDVRX
28
WWRT/WRED/ I
VWRT/VRED/
SNR
8
8
WIOIX )
VIOIX
FABS/FAVL
lABS
12
16
EABS/EAVL
12
16
DMI System
DMI System
FGETP
22
EGETP
22
SDFIO/SDAF/SDAI/ )
FARC
34
34
SDCOM/SDF/SDFX/ \
604
604
XMDS
28
—
SDI/SDIX/SDRED/ i
FIXl/FIXIX
68
68
SDWRT Z
XSQR
52
52
SDFND
60
60
XMD
66
66
SFAR/SFARX s
32
SEAR/SEARX
32
XDD
74
ESIN/ESINE
ECOS/ECOSN
74
SFIO/SIOI/SIOAI/ 1
FSIN/FSINE
1 IB
138
SIOF/5IOAF/SIOFX/ )
980
980
FCOS/FCOSN
SCOMP/SWRT/SRED/ \
FATN/FATAN
130
EATN/EATAN
150
SIOIX ''
FSQR/FSQRT
fln/falog
70
esqr/esqrt
eln/ealog
76
SFIF
26
SEIF
28
136
148
SGOTO
22
22
FEXP/FEXPN
118
EEXP/EXPN
140
SIAR/SIARX
36
36
FAXI/FAXIX
78
EAXI/EAXIX
82
SIIF
24
24
FAXB/FAXBX
FTNH/FTANH
54
54
EAXB/EAXBX
ETNH/ETANH
54
46
DM2 System
DM2 System
FBTD (bin. to dec.
FDTB (dec. to bin.
) \
) ■
420
420
SDFIO/SDAF/SDAI/ }
SDCOM/SDF/SDFX/ (
622
DMTDO/DMTXO
412
412
SDI/SDIX/SDRED/ (
DMPDl/DMPXl
520
520
SDWRT ;
DMP80
102
102
SDFND
76
DATSW
34
34
SFAR/SFARX ,
32
SEAR/SEARX
32
DVCHK
16
16
SFIO/SIOI/SIOAI/ i
FCTST
30
30
SIOF/SIOAF/SIOFX/ >
1148
LOAD
138
138
SCOMP/SWRT/SRED/ (
OVERF
18
18
SIOIX '
SLITE, SLITT
68
68
SFIF
26
SEIF
28
TSTOP
6
6
SGOTO
22
TSTRT
6
6
SIAR/SIARX
36
ISIGN
24
24
SIIF
24
FSIGN
34
esign
34
SUFIO
732
Appendix E. Core Requirements 99
9 Table 1 1 . Miscellaneous and ISS Subroutines
• Table 12. Conversion Subroutines
Subroutmes
CAR DO
CARDl
READO
READl
PNCHO
PNCHl
OMPRl
PARTI
PAPTN
DISKO
DISKl
DI5KN
WRTYO
TYPED
PLOTl
PRNTI
PRNT3
ILSOO
ILS01
ILS02*
ILS03
ILS04*
SPIRO
SPIRl
SPIRN
FLIPO
FLIPl
No.
Core
Locotions
DM2
System
244
250
96
no
206
218
262
260
304
418
688
126
282
222
386
262
22
28
17
22
32
FLIPR
102
PAUSE
12
STOP
12
SUBSC
30
SUBIN
32
TTEST/T5ET
16
DI5KZ*
238
CARDZ
168
PAPTZ
226
PRNTZ
190
TYPEZ
94
WRYTZ
60
READZ
58
PNCHZ
72
PRNZ
192
HOLEZ
54
GETAD
16
EBCTB
60
HOLTS
54
DM1 and C/PT
System
Uses
242
246
254
294
356
620
808
124
296
216
386
18
18(28)
18
18(24)
30
48(-)
62(-)
62(-)
- (72)
-(48)
12
8(12)
30
32
16
- (208)
80 (136)
202 (222)
176 (200)
82 (94)
60
54
14
54
54
ILSOO, ILS04
ILSOO, ILS04
ILS04
ILS04
ILS04
ILS04
ILS04
ILS04
IL502
ILS02
ILS02
ILS04
ILS04,PRTY,HOLL
ILS03
ILSOI
DISKO,
DISKl,
DISKZ
DISKN
ILS02
ILS04
ILS04
ILS04
No.
Conversion
C
ore
SubrouKnes
Locations
Uses
DM2
DM1 and C/PT
System
System
BINDC
72
72
DCBIN
88
88
BINHX
44
44
HXBIN
66
66
HOLEB
134
134
HOLL, EBPA
HOLPR
100
100
HOLL, PRTY
EBPRT
102
102
EBPA, PRTY
PAPEB
246
246
EBPA
PAPHL
244
244
EBPA, HOLL
PAPPR
192
192
EBPA, PRTY
ZIPCO
154
_
SPEED
330
330
HOLL
80
80
EBPA
80
80
PRTY
80
80
EBCCP
128
EBHOL
128
_
EBPT3
128
_
CPEBC
128
_
CPHOL
128
_
CPPT3
128
_
HLEBC
128
_
HOLCP
128
_
HLPT3
128
_
PT3EB
128
_
PT3CP
128
_
PTHOL
128
-
*Part of Resident Monitor
( ) DM1 System core requirements are different.
100
APPENDIX F. EXECUTION TIMES
Execution times for the Cominunications Adaptor
subroutines are listed in the adaptor subroutine
manual. Form C26-3706.
CONVERSION SUBROUTINES (see Table 13).
Basic Definitions
1. All times are based on 3. 6 /^sec memory.
2. The table ordering for codes is as follows
(except SPEED)
Standard set: blank, +,&,-, 0-9, A-Z,
other special
Extended set: standard, non-FORTRAN
special, control
3. Maximvim ntimber of characters checked varies
with the set.
Standard set
Except SPEED: 49
SPEED only: 16
Extended set
Except SPEED: 74
SPEED only: 45
4. Conversion times given are
Best time: Found as first character in set
Worst time, standard set: Found as last
character in set
Worst time, extended set: Not foimd in set
5. Time per character is best time, plus table
look-up time multiplied by the number of char-
acters to be skipped.
Example:
If best = 211, look-Tip = 45. 5 and character is
fourth in table (-)
Then, character time = 347. 5 = 211 + 3(45. 5)
1130 ISS TIMES (see Tables 14 and 15)
Basic DefiBitions
1. Only CPU time used by ISS (including transfer
vector BSC L) and ILS (including forced BSI I)
is given. All the remaining time, minus cycle
steals, is available to the user.
2. ILS time is included in ISS interrupt processing
calculations
DM1 and C/PT System
ILSOO - CARDO (col), CARDl (col)
ILSOl - PRNTl
ILS02 - DISKO, DISKl, DISKN
ILS03 - PLOTl
ILS04 - CARDO (op complt), CARDl (op
complt) WRTYO, TYPEO, PAPTl,
PAPTN
# Table 13. Conversion Subroutines
Initial*
Time,
Per Character
Table
Worst
Subroutine
ization
Look-
up
Best
Std.
Set
Extd.
Set
BINDC
1130
_
_
-
-
DCBIN
1110
-
-
-
-
BINHX
620
-
-
-
-
HXBIN
760
-
-
-
-
HOLPR
430
211
2395
3533
45.5
EBPRT
420
207
2487
3675
47.5
HOLEB
EBCDIC oufput
550
159
2343
3481
45.5
EBCDIC input
550
161
2441
3629
47.5
SPEED
Packed EBCDIC output
250
270
-
-
-
Unpacked EBCDIC output
270
260
-
-
-
Pocked EBCDIC input
240
394
1594
3914
80.0
Unpacked EBCDIC input
240
404
1604
3924
80.0
1
ZIPCO (DM2 only)-
All codes except IBM
270
270
-
-
-
Card Code
IBM Card Code input
270
374
-
-
-
IBM Card Code output
270
435
-
-
-
PAPPR
580
Per shift chor. input
180
-
-
-
Per graphic char, input
427
2707
3895
47.5
Per control char, input
407
2687
3875
47.5
PAPHL
PTTC/8 input
490
Per shift char, input
180
-
-
-
Per graphic char, input
306
2482
3870
49.5
Per control char, input
296
2472
3860
49.5
PTTC/8 output
490
Per control char, output
266
-
3830
49.5
Per graphic char, output
316
2492
3880
49.5
Per shift/graphic char, output
446
2622
4010
49.5
PAPEB
PTTC/8 input
440
Per shift char, input
190
-
-
-
Per graphic char, input
366
2542
3930
49.5
Per control char, input
386
2562
3950
49.5
PTTC/8 output
440
Control char, output
296
-
3860
49.5
Per graphic char, output
346
2522
3910
49.5
Per shift/graphic char, output
476
2652
4040
49.5
Appendix F. Execution Times 101
I DM2 System
ILSOO - CARDO (col), CARDl (col)
PNCHO (col), PNCHl (col)
ILSOl - PRNTl
ILS02 - DISKl, DISKN
ILS03 - PLOTl, PLOTX
ILS04 - CARDO (op complt), CARDl (op
complt), PNCHO (op complt),
I Table 14. 1130 ISS Times (DM1 and C/PT System)
Subroutine and
Times (/isec)
FuncHon
(n = word count)
ILSOO
112
ILSOl
134
ILS02
112
ILS03
112
ILS04
148
CARDO
Test
165
Reod
14930+ 38.5 (n)
Punch
763+ 185 (n)
Feed
605
Sel. Stack.
290
CARDl
Test
165
Read
14972 + 38.5 (n)
Punch
800+ 190 (n)
Feed
640
Sel. Stack.
325
WRTYO
Test
165
Print
228 + 734 (n)
TYPED
Test
165
Read print
685+ e (825 + 48.5y) + 390a +
1595 b + 1224 c
€ - sum of char, times for each
graphic
y = no. char, skipped In table
look-up
a = EOM character
b - re-entry character
c - backspace character
Print
344 + 920 (n)
PAPT)
Test
152
Read
432 + 808* (n)
*add +1 12 if check
Punch
480 + 680* (n)
*add +96 if check
PAPTN
Test
176
Read
408 + 952* (n)
*add+ll2 if check
Punch
464 + 840* (n)
*add +64 if check
PLOTl
Test
130
Print
418 = if char is 0-9
472 = if char is A
624 = if char is B
698+ •
752 = if char is C
224 = per dup. of
previous pen
motion
PNCHl (op complt), READO,
READl, WRTYO, TYPEO,
PAPTl, PAPTN, PAPTX,
PRNT3, OMPRl
NOTE: In the DM2 system, the Z subroutines are
considered to be ISSs and therefore use the appro-
priate ILSs, e.g. , PRNTZ uses ILSOl.
3. All times are based on a 3. 6 ^sec memory.
Subroutine and
Function
PRNTl
Test
Print
Print Numeric
Control
Single space
Double space
Triple space
Skip to channel 12
Skip to channel 1
DISKO
Test
Read
Write
Without RBC
With RBC
Write Imm
Seek
1 to center
By addr
DISKl
Test
Read
Write
Without RBC
Write
With RBC
Write Imm
Seek
1 to center
By oddr
DISKN
Test
Read
Write
Without RBC
Write
With RBC
Write Imm
Seek
1 to center
By addr
Times (/isec)
(n - word count)
188
44142 + 5971.2 (n-1)*
*subtroct 1 1 .4 for each word
where I char, does not match;
22.8 where both char, do not
match.
25950 + 2736.8 (n-1)
+268 X
X - no. idle cycles before 1st
numeric chor. on wheels is
reached
708
998
1288
676*
936*
*add 208 for each channel crossed
before correct one reached
178
1492
1778
2050
1062
1076
1502
178
900 + 760 X + 478 y
X = no. sectors
y = no. seeks after 1st sector
1292 + 660 X +822 y
1562+ 1098
660 + 622 X
x + 908 y
+ 476y
1072
1468
178
908 + 652 X
+ 1012 y
X = no. sectors
y = no. seeks after 1st sector
1516 + 610 x + 926 y
1728+ 1022 x + 1178 y
820 + 606 X +282/
1076
1478
102
Table 15. 1130 ISS Times (DM2 System)
Subroutine and
Function
ILSOO
ILSOl
ILS02
ILS03
ILS04
CARDO
Test
Read
Punch
Feed
Sel, Stack.
CARDl
Test
Read
Punch
Feed
Sel. Stack.
READO
Test
Read
Feed
READl
Test
Read
Feed
PNCHO
Test
Punch
Feed
PNCHl
Test
Punch
Feed
WRTYO
Test
Print
TYPED
Test
Read print
Print
PAPTl
Test
Read
Punch
PAPTN
Test
Read
Punch
PLOTl
Test
Print
Times (jisec)
(n - word count)
112
134
102
112
163
165
14930 + 38.5 {n
763 + 185 (n)
605
290
165
14972
800 +
640
325
+ 38.5(n
190 (n)
173
546
523
173
576
553
165
763 +
605
185 (n)
165
800 +
640
190 (n)
165
228 +
734 (n)
165
685 + f (825 - 48. 5y) + 390 o +
1595 b+ 1224 c
e = sum of char, times for each
graphic
y = no. char, skipped In table
look-up
a = EOM character
b = re-entry character
c = backspace character
344 + 920 (n)
152
432 + 808* (n)
*add + 112 if check
480 + 680* (n)
*add + 96 if check
176
408 + 952* (n)
*add + 112 if check
464 + 840* (n)
*add +64 if check
130
678 +
•418 = if char is 0-9
472 = if char is A
. 624 = if chor is B
Subroutine and
Function
PLOTl (Cont'd)
PRNTl
Test
Print
Print Numeric
Control
Single space
Double space
Triple space
Skip to channel 12
Skip to channel 1
PRNT3
Test
Print
Control
Single Space
Double Space
Triple Space
Skip to channel 12
Skip to channel 1
OMPRl
Test
Feed
Read
Times ( fi sec)
(n = word count)
678 + f 752 = if char is C
224 = per dup. of
previous pen
motion
188
44142 + 5971.2 (n-1)*
*subtract 1 1 .4 for each word
where 1 char, does not match;
22.8 where both char, do not
match .
25950 + 2736.8 (n-1)
+ 268x
X = no. idle cycles before 1st
numeric char, on wheels is
reached
708
998
1288
676*
936*
*add 208 for each channel crossed
before correct one reached
183
3743 + 45 (n-1)
785
6746
12704
817
817
200
658
737 + 262 X c
c = no. of chars, programmed to
be read
Disconnect
342
Sel. Stock.
324
DISKl
Test
158
Read
1021 +491 x + 1226y
X = no. sectors
y = no. seeks after 1st sector
Write
Without RBC
1035 + 491 x + 1226y
Write
With RBC
1829 + 982 x + 2452 y
Write Imm
689 + 491 x + 489 y
Seek
1 to-center
1843
By addr
2056
DISKN
Test
244
Read
1500 + 725 x + 1973 y
X = no. sectors
y = no. seeks after 1st sector
Write
Without RBC
1500 + 725 x + 1973 y
Write
With RBC
2599 + 1450 x + 3947 y
Write Imm
1085 + 725 x + 1707 y
Seek
1 to-center
1871
By addr
2151
Appendix F. Execution Times 103
ARITHMETIC AND FUNCTION SUBROUTINES
The execution times of the arithmetic and function
subroutines are shown in Table 16. All times are
based on a 3. 6 jusec memory; the times containing a
decimal point are milliseconds, all other are
microseconds.
Table 16. Arithmetic and Function Subroutines
I SPIR (C/PT SYSTEM)
The SPIRx subroutines take 220 ^<sec (3. 6 jtsec
memory) plus the DISKx time to read sector 0000.
STANDARD
EXTENDED
FADD/TADDX "1
FSUB/FSUBX J
460
EADD/EADDX "
ESUB/ESUBX
440
560
490
FMPY/FMPYX
560
EMPY/EMPYX
790
FDIV/FDIVX
766
EDIV/EDIVX
2060
FLD/TLDX \
FSTO/FSTOX J
180
ELD/tLDX \
ESTO/ESTOX
160
180
170
FLOAT
330
3M
IFIX
140
140
NORM
260
260
FSBR/I=SBRX
650
ESBR/tSBRX
740
FDVR/FDVRX
1090
EDVR/EDVRX
2520
SNR
80
80
FABS/fAVL
50
EABS/EAVL
60
lABS
100
TOO
FGETP
330
EGETP
320
FARC
60
60
XMDS
260
««
FIXI/FIXIX
465
465
XSQR 550 av. (860
max.)
550 av. (860 max.) |
XMD
520
520
XDD
1760
1760
FSIN/FSINE "
FCOS/FCOSN
3.0
ESIN/ESINE \
ECOS/ECOSNj
5.4
3.4
5.9
FATAN/FATN
5.2
EATAN/EATN
8.9
FSQRT/FSQR
4.5
ESQRT/ESQR
10.4
FALOG/FLN
5.1
EALOG/ELN
8.0
FEXP/TXPN
2.0
EEXP/EXPN
4.4
FAXI/FAXIX
3.8
EAXI/EAXIX
4.7
FAXB/FAXBX
8.0
EAXB/EAXBX
13.3
FTANH/FTNH
4.3
ETANH/ETNH
8.1
FBTD (bin. to dec.)
40.0
40.0
FDTB(dec. to bin.)
20.0
20.0
104
INDEX
ADRWS (write sector address in working storage: monitor system) 77
Arctangent 70
Arithmetic and functional subroutine error indicators 66
Arithmetic and functional subroutines 60
Arithmetic subroutine core requirements 99
Arithmetic subroutine execution times 104
Assignment of core storage locations (card/paper tape system) 9
Assignment of core storage locations (monitor system) 10
Backspace 30 '
Basic ISS calling sequence 6
BIDEC subroutine (monitor system) 56
BINDC subroutine 48
BINHX subroutine 48
BSC/printer overlap 26
Call processing (ISS) 2
Calling sequences (arithmetic and functional subroutines) 62
CALPR (call system print: monitor system) 74
CARDZ subroutine 40, 42
CARDO subroutine 11
CARDl subroutine 11
Card subroutines 11, 13, 14, 40, 42, 43
Carriage control operations 26, 27, 28
Character code chart 95
Character interrupts 3
Check legality of calling sequence 3
Console printer code 46, 95
Console printer/keyboard subroutines 29, 39, 40, 41, 42
Control parameter (ISS) (also see individual subroutines) 7
Conversion subroutine core requirements 100
Conversion subroutine error checking 47
Conversion subroutine execution times 101
Conversion subroutines 46
COPY (disk copy: monitor system) 77
Core requirements 99
CPEBC (ZIPCO table) 58
CPHOL (ZIPCO table) 58
CPPT3 (ZIPCO table) 58
Data channel 1
Data code conversion subroutines 44
DCBIN subroutine 48
DECBI subroutine (mcmitor system) 57
Defective sector handling (disk subroutines) 16, 21
Descriptions of data codes 44
Description of interrupt service subroutines 11
Descriptions of I/O subroutines used by FORTRAN 39, 41
Determine status of previous operation 2
Device identification (ISS) 8
Device processing 1
Direct program control 1
DISC (disk initialization satellite cartridge: monitor system) 76
Disk initialization (card/paper tape system) 19
Disk initialization (monitor system) 23
Disk maintenance programs (monitor system) 76
DISKN subroutine
card/paper tape system 16
monitor system 20
Disk pack initialization routine (card/paper tape system) 19
Disk subroutines (card/paper tape system) 15
Disk subroutines (monitor system) 19
DISKZ subroutine (monitor system) 20, 23
DISKO subroutine (card/paper tape system) 15
DISKl subroutine
card/paper tape system 15
monitor system 20
DLCIB (delete core image buffer: monitor system) 77
DPIR (card/paper tape system) 19
DSLET (dump system location equivalence table: monitor system) 77
Dimip on console printer 73
Dump on 1132 printer 73
Dump status area 73
EABS, real absolute value (extended) 45
EADD(X), real add (extended) 62
EALOG, real natural logarithm (extended) 63, 66
EATAN, real trigonometric arctangent (extended) 63, 67
EATN, real trigonometric arctangent (extended) 63
EAVL, real absolute value (extended) 65
EAXB(X), real base to a real exponent (extended) 64, 67
EAXI(X), real base to an integer exponent 63, 67
EBCCP (ZIPCO table) 58
EBCDIC 46, 95
EBHOL (ZIPCO table) 58
EBPA (conversion table) 46
EBPRT subroutine 55
EBPT3 (ZIPCO table) 58
ECOS, real trigonometric cosine (extended) 63, 66, 67
ECOSN, real trigonometric cosine (extended) 63, 66
EDIV(X), real divide (extended) 62
EDVR(X), real reverse divide (extended) 65
EEXP, real exponential (extended) 63, 67
Effective address calculation (disk subroutines) 19, 23
EGETP, get parameters (extended) 66
ELD(X), load FAC (extended) 62
Elementary function algorithms 69
ELN, real natural logarithm (extended) 63, 66, 67
EMPY(X), real multiply (extended) 62
End of file (monitor system) 67
End-of-message 30
Erase field 30
Error detection and recovery procedures 4
Error parameter (ISS) (also see individual subroutines) 8
Error detected by ISS subroutines 92
ESBR(X), real reverse subtract (extended) 65
Index 105
ESIN, real trigonometric sine (extended) 63, 66, 67
ESINE, real trigonometric sine (extended) 63, 66
ESQR, real square (extended) 63, 66
ESQRT, real square root (extended) 63, 66, 68
ESTO(X), store FAC (extended) 62
ESUB(X), real subtract (extended) 62
ETANH, real hyperbolic tangent (extended) 63, 68
ETNH, real hyperbolic tangent (extended) 63
Execution times 101
EXPN, real exponential (extended) 63
Exponential 71
Extended binary coded decimal interchange code (EBCDIC)
Extended precision format 60
Extended precision subroutines 67
46, 95
FABS, real absolute value (standard) 65
FADD(X), real add (standard) 62
FALOG, real natural logarithm (standard) 63, 66
FARC, real arithmetic range check 64
FA TAN, real trigonometric arctangent (standard) 63, 68
FATN, real trigonometric arctangent (standard) 63
FAVL, real absolute value (standard) 65
FAXB{X), real base to a real exponent (standard) 64, 67
FAXI(X), real base to an integer exponent (standard) 63, 67
FBTD, real binary to decimal 64
FCOS, real trigonometric cosine (standaixi) 63, 66, 68
FCOSN, real trigonometric cosine (standard) 63, 66
FDIV(X), real divide (standard) 62
FDTB, real decimal to binary 64
FDVR(X), real reverse divide (standard) 65
FEXP, real exponential( standard) 63, 68
FGETP, get parameters (standard) 66
File protection (disk subroutines) 16, 20, 21
Fixed-point format 61
FIXI(X), integer base to an integer exponent 64, 66
FLD(X), load FAC (standard) 62
FLIPR (LOCAL/SOCAL overlay: monitor system) 74
FLN, real natural logarithm (standard) 63, 66, 68
FLOAT, integer to real 64
FMPY(X), real multiply (standard) 62
FORTRAN, subroutines used by 39, 41
FSBR(X), real reverse subtract (standard) 65
FSIN, real trigonometric sine (standard) 63, 66, 68
FSINE, real trigonometric sine (standard) 63, 66
FSLEN (fetch phase IDs from SLET: monitor system) 74
FSOR) real square root (standard) 63, 66
FSQRT, real square root (standard) 63, 66, 69
FSTO(X), store FAC (standard) 62
FSUB(X), real subtract (standaid) 62
FSYSU (fetch system subroutine: monitor system) 74
FTANH, real hyperbolic tangent (standard) 63, 68
FTNH, real hyperbolic tangent (standard) 63
Fimctional subroutine accuracy 67
Functional subroutine core requirements 99
Functional subroutine execution times 104
Functional subroutines 60
FXPN, real exponential (standard)
General error-handling procedures 4
General specifications (FORTRAN subroutines) 39, 41
Hexadecimal notation 44
HOLCP (ZIPCO table) 58
HOLEB subroutine 49
HOLL (conversion table) 46
HOLPR subroutine 54
HLEBC (ZIPCO table) 58
HLPT3 (ZIPCO table) 58
HXBIN subroutine 49
Hyperbolic tangent 72
lABS, integer absolute value 65
IBM card code, 45, 95
ID (change cartridge ID: monitor system) 76
IDENT (print cartridge ID: monitor system) 76
IFDC, real to integer 64, 66
ILS description 2
ILS, writing 79
Implications of the user's error routine 5
Important locations (card/paper tape system disk subroutines) 18
Initiate I/O operation 3
INT REQ 30
Interrupt branch addresses 9, 10
Interrupt level subroutines 2, 9, 10
Interrupt processing 1
Interrupt response processing 3
Interrupt service subroutines 1
Interrupt trap 9, 10
I/O area parameter (ISS) (also see individual subroutines) 8
I/O function (ISS) (also see individual subroutines) 7
ISS branch table 79
ISS characteristics 1
ISS counter 10
ISS execution times (card/paper tape system) 102
ISS execution times (monitor system) 103
ISS exit 9, 11
ISS/ILS correspondence (card/paper tape system) 79
ISS operation 2
ISS subdivision 2
ISS subroutine core requirements 100
ISS subroutine errors 92
ISS, writing 79
Keyboard/console printer subroutines 29, 39, 40, 41, 42
Keyboard functions 30
Keyboard input (Z routines) 39, 42
Level processing 1
Machine configuration ii
Methods of data transfer 1
Miscellaneous subroutine core requirements 100
MODIF (system maintenance program: monitor system) 77
Monitor system library listing 88
106
Name parameter (ISS) 6
NAMED, NAMEl, NAMEN, NAMEZ (ISS) 7
Natural logarithm 71
No error parameter 5
NORM, normalize 64
OMPRl subroutine (monitor system) 37
Operation complete inteiiupts 4
Operator request function (INT REQ) 30
Optical mark page reader subroutine 37
Overlapping BSC and printer operations 26
PAPEB subroutine 51
Paper tape subroutines 31, 33, 40, 42
PAPHL subroutine 52
PAPPR subroutine 54
PAPTN subroutine
card/paper tape system 31
monitor system 33
PAPTX subroutine (monitor system) 33
PAPTZ subroutine 40, 42
PAPTl subroutine
card/paper tape system 31
monitor system 33
Perforated tape and transmission code 45 , 95
PLOTX subroutine 35
PiOTl subroutine 35
Plotter control 36
Plotter subroutines 35
PNCHZ subroutine (monitor system) 43
PNCHO subroutine (monitor system) 14
PNCHl subroutine (monitor system) 14
Polynomial approximation 69, 70, 71
Post-operative error detection 5
Post -operative error traps 11
Pre -operative error detection 4
Pre-operative error trap 9, 10
Printer/BSC overlap 26
Printer subroutines 24, 26, 27, 29, 39, 40, 41, 42, 43
PRNTZ subroutine 40, 42
PRNTl subroutine 24
PRNT2 subroutine 26
PRNT3 subroutine 27
PRNTZ subroutine (monitor system) 43
Programming techniques - error subroutine exits 6
Protection of input data (card subroutines) 12
PRTY (conversion table) 46
PTHOL (ZIPCO table) 58
PTTC/8 code 45, 95
PTUTL (paper tape utility program: monitor system) 78
PT3EB (ZIPCO table) 58
PT3CP (ZIPCO table) 58
Read-print (TYPED) 29
READZ subroutine (monitor system) 43
READO subroutine (monitor system) 13
READl subroutine (monitor system) 1 3
Real base to real exponent (elementary function algorithm) 72
Real data formats 60
Real negative number representation 60
Real number psuedo-accumulator 62
Recoverable device 4
Recurrent subroutine entries 2
RDREC (read *ID record: monitor system) 74
Restriction on use of PRNTl and PRNT2 26
Sample ILS (card/paper tape system) 81
Sample ISS (card/paper tape system) 82
Save calling sequence 3
Sector numbering (disk subroutines) 16, 20
Selective dump subroutines 73
Set pack initialization routine (card/paper tape system) 19
Sine-cosine 69
SNR, real reverse sign 65
Special monitor subroutines 74
SPEED subroutine 50
SPIR (card/paper tape system) 19
SPIR execution time (card/paper tape system) 104
Square root 70
Stacker select 12, 38
Standard precision format 60
Standard precision subroutines 68
Subroutine action after return from a user's error subroutine 94
Subroutine library listing (card/paper tape system) 85
Subroutines used by FORTRAN 39, 41
System library listing (monitor system) 88
System library mainline programs 76
SYSUP (DCOM update: monitor system) 74
TYPEZ subroutine 39, 41
TYTED subroutine 29
Types of conversion (chart) 47
User's error routine implications 5
User's ISS subroutine error exits 6
Writing ILS (card/paper tape system)
Writing ISS (card/paper tape system)
WRTYZ subroutine 40, 42
WRTYD subroutine 29
79
79
XDD, fixed-point double -word divide 65
XMD, fixed -point double -word multiply 65
XMDS, fixed-point ftactional mtdtiply (short) 65
XSQR, fixed-point square root 65
ZIPCO conversion tables 58
ZIPCO subroutine (monitor system)
1403 printer code 46, 95
57
Index 107
C26-5929-4
o
o
N
Ol
I
01
to
I
International Business Machines Carporatian
Data Processing Division
112 East Post Road, White Plains, NY. 1Q6Q1
[USA Only]
IBM World Trade Carporatian
821 United Nations Plaza, New York, New YorklOOl?
[International]
READER'S COMMENT FORM
IBM 1130 Subroutine Library
Form C26-5929-4
• Your comments, accompanied by answers to the following questions, help us produce better
publications for your use. If your answer to a question is "No" or requires qualification,
please explain in the space provided below. Comments and suggestions become the property of
IBM.
• Does this publication meet your needs?
• Did you find the material;
Easy to read and understand?
Organized for convenient use?
Complete?
Well illustrated?
Written for your technical level?
• What is your occupation?
• How do you use this publication?
As an introduction to the subject?
For advanced knowledge of the subject?
For information about operating procedures?
Other
• Please give specific page and line references with your comments when appropriate.
COMMENTS
Yes
No
D
n
D
n
D
n
n
D
D
n
n
n
□ As an instructor in a class? □
□ As a student in a class? □
□ As a reference manual? □
• Thank you for your cooperation. No postage necessary if mailed in the U.S.A.
C26-5929-4
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 pub-
lishing 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
FIRST CLASS
PERMIT NO. 2078
SAN JOSE, CALIF.
BUSINESS REPLY MAIL
NO POSTAGE STAMP NECESSARY IF MAILED IN U. S. A.
POSTAGE WILL BE PAID BY
IBM Corporation
Monterey & Cottle Rds.
San Jose, California
95114
Attention: Programming Publications, Dept. 232
CM
O
fold
fold
a.
G
c/i
>
n
M
I
w
VD
M
International Business Machines Corporation
Data Processing Division
112 East Post Road, White Plains, N.Y. lOBOl
[USA Only]
IBM World Trade Corporation
821 United Nations Plaza, New York, New YorklOOl?
[International]