IBM 1130 User Manual page 542

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

Using The Overlapped I/O System
General
If you are to gain the full potential of the over lapped
I/o routines, you should lmow several basic princi-
ples of this system:
You must decide whether your non-disk I/O
will be done by FORTRAN FORMAT READs and
WRITEs or by the overlapped I/O subroutines. A
program cannot use both.
Note that the disk I/o is
completely independent of the overlapped I/O system
and,does not enter into this discussion.
Certain devices are not overlapped by these
routines, making the placement of the subroutines
CALLs quite important.
Overlapping and Your Program
As far as your program is concerned, only two I/o
devices are really overlapped: the 1132 Printer and
the console printer.
The other devices are either
not overlapped at all or overlapped with various
housekeeping chores (for example, code convers ion)
rather than with your program.
In
other words:
These subroutines
initiate an action,
then continue
processing:
PRINT
SKIP
TYPER
These subroutines start
an action and finish it
before they continue
processing:
READ
PUNCH
KEYBD
Thus the sequence in which you use these rou-
tines becomes important.
For example, suppose
you have a program that develops some result, then
must print a line on the 1132 and punch a card.
How
should this be done?
Alternative A
Develop results
CALL PRINT ( )
CALL PUNCH ( )
Section
Subsections
70
20
I
20
Alternative B
Develop results
CALL PUNCH ( )
CALL PRINT ( )
Page
01
With alternative A, PRINTing is initiated, then
PUNCHing, and the two I/O functions are overlapped.
Alternative B, on the other hand, does not overlap
these two functions, since the 1130 will wait until
PUNC Hing is completed before starting PRINTing.
Alternative B does, however, overlap whatever
follows the PRINT statement.
To gain maximum overlap, then, the three truly
overlapped routines (PRINT, SKIP, and TYPER)
should be placed as early in the processing cycle
as possible.
Figure 70.19 gives some examples
of good and bad usage of these routines.
Example
Bad Practice
Good Programming
I
processing
I
p""~';ng
1
processing
processmg
CALL PRINT
CALL SKIP
CALL SKIP
CALL PRINT
I
processing
processing
processing
CALL PRINT
2
CALL PRINT
processing
CALL PRINT
CALL PRINT
1
CALL PUNCH
{ CALL PRINT
3
CALL PRINT
CALL PUNCH
1
WRITE disk
1
CALL PRINT
4
CALL PRINT
WRITE disk
Figure 70. 19.

Advertisement

Table of Contents
loading

Table of Contents