IBM 1130 User Manual page 660

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

Advertisement

Section
Subsections
Page
90
20
I
20
02
the need for Overlay level 2, but is a rather extreme
case of over-reacting to a problem. Figure 90.7
shows the way in which this program would run, if
all seven subroutines were LOCAL and Overlay
level 1 were used.
Each card processing cycle
would involve 11 overlays (7 LOCALs, 4 SOCALs)
and
i
arm movements (these figures are not depend-
ent on the number of times the disk must be read
before finding the desired item).
Reviewing Figure 90. 7, it seems that you are
somewhat better off than if you had used Overlay
level
2,
but you still require an excessive number
of over lays and arm movements.
It
would have been far more prudent to LOCALize
only BADCD, NOHIT, and NEWPG, three subroutines
that are only used occasionally. This would reduce
your LOCAL overlays drastically and might save
enough core storage for Overlay level 1 to be used.
Another technique that would reduce the size of
this program is the use of LINKs. The blocks
called INIT and WRAP could easily be separated
from the main program, and made into what can be
called "one-shot LINKs". This might save enough
core storage to eliminate the need for LOCALs and
SOCAL level 2 altogether.
Another LINK is possible here -- a type you might
call a "repetitive LINK". Suppose you split the main
program into:
PARTI
a. Read card
b.
Look up key in index
c. CALL LINK (PAR T2)
PART2
a. Read disk
b. Check if correct record found
c. Calculations
d. Write new disk record
e. CALL LINK (PART3)
PART3
a.
Print results
b. Miscellaneous arithmetic
c.
CALL LINK (PARTl) if not finished
CALL LINK (WRAP)
if
finished
This arrangement is particularly good, for several
reasons:
It
cuts the original program into five pieces
(two small and three large).
• It
isolates the
I/o
into separate LINK.s -- for
example:
PARTI uses neither the disk nor the printer.
PART2 uses neither card nor printer.
PART3 uses neither card nor disk.
This reduces the sizes of these LINKs substantially
• It
probably eliminates the need for SOCALs
and LOCALs altogether.
Initialization
Arithmetic
Read Card
):0
e
,....------,;;:;
'----r----~
E.R.ROR ROUTINE
@--
.....
SRb CRNb
Look up key
item number
in index table
Read a
disk
record for
an item
8-0
.....-----......;::::::;
~
ERRORROUnNE-
Check it against
TEM NOr 011 DISK
the item number
. - - - .... / _ _ _ _ _
- - - J
Not
found
Not
finished
Found
Calculations
Write a new
disk record
Print results
Miscellaneous
arithmetic
/.: L OCR/. OVERLI1Y
S =
SOCRJ. OVEIUR'I'
Figure 90.7.
Finished
e,0
,....-------~~
5KIP TONElli PRf;E
AND
PRINT NERD/NtiS
WileN NECE»RR'I
Print
Grand
Totals
,Al0
=
MOYE
I1RN TO
OV£~LA'I
AIUR
ND" "'"VE AIIN TO DI17R
'Ii~ AR~A

Advertisement

Table of Contents
loading

Table of Contents