20 BM610
PROGRAM TAPE
There are many occasions when it is desirable to
process several sets of data for the same problem in
some automatic manner. One method of doing this
is by using the Program Tape Reader.
While the operator is working aproblem for the
first time, he may set switches on the keyboard that
cause the machine to punch codes into apaper tape
equivalent to the keys being depressed. Later he may,
by changing switch settings and depressing appro-
priate keys, turn over control of the machine to this
program tape. The only activity required of the
operator when the program tape is being used will
be the entering of new sets of data into the machine
during the processing of each problem.
In order to get the program into the tape during
the processing of the first set of data, the operator
simply sets the punch switch on the keyboard to the
ON position. Afull discussion of the switches and
lights on the keyboard will be found in alater section.
The operator now proceeds in amanner similar to
the one-time calculation. He must always be cog-
nizant of the source of the data. The only difference
will be that the program tape punch is active. At the
end of the processing of the first calculation, the
program is entirely punched into the tape and the
tape is accumulated (up to fifty feet) in the machine.
Now the operator is ready to allow the program
tape to take over control of the machine. He first
turns off the punch switch and turns on the dup
switch. The dup switch causes the code symbols read
by the program tape reader to be duplicated back into
program tape that is passing by the program tape
punch. The program tape thus continuously recreates
itself sequentially so that it may be used again and
again. The program tape is placed in control of the
machine by depressing the ptr key.
®(Program Tape Reader)
The depression of this key tells the machine to turn
control over to the instructions punched into the pro-
gram tape, which is standing ready to be read at the
Program Tape Reader. The first character encoun-
tered by the reader will be the first step in the pro-
gram to be executed.
TkB J(Keyboard)
When the 610 is under the control of the program
tape unit, it may be necessary to give an instruction
to return control to the keyboard.
This instruction causes control of the machine to
be transferred from the unit in control to the key-
board. One use of this instruction is to return control
from the program tape reader to the keyboard for the
entry of data. An instruction sequence 05 ent kb
will cause the machine to transfer control to the key-
board for data entry. After the number has been en-
tered, depressing ptr will return control to the pro-
gram tape reader.
Instruction Classes
In many problems, it may be necessary to choose
one of several possible methods of solution after some
point in the calculation, depending on conditions
generated up to that point.
For example, in the calculation of the roots of a
quadratic equation (previously used example), it is
possible that the discriminant (b^ -4ac) may be
negative. If the discriminant is negative, the roots of
the quadratic equation will be complex numbers and
it will be necessary to separate the real and imaginary
parts for printing. The possibility of having complex
roots was not considered in our previous example.
In solving for the roots of aseries of such equa-
tions, it is usually inconvenient to separate by visual
inspection the equations having real roots, from the
equations having imaginary roots, and then solve
them with separate programs. It would be extremely
desirable to have aprogram that would solve for
either condition, dependent upon the sign of the dis-
criminant. Because all symbols on the program tape
must be read in sequence, aproblem is posed having
both the series of steps for finding the roots of an
equation with apositive discriminant and the series
of steps for finding the roots of an equation with a
negative discriminant on the same tape. It would be
very convenient to have the machine make alogical
decision and use only one series of steps while ignoring
the other. The IBM 610 is able to make such alogical
decision.