Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ PrefaceContentsMembers1 Welcome2 Introduction3 EDSAC4 EDSAC Demo5 Relay Computers6 Discussion7 CRT Storage8 Coding9 Library10 Sign Correction11 Nozzle Flow12 Magnitude13 France14 Checking15 Large Integers16 Discussion Storage17 Magnetic Storage18 Magnetic Recording19 Photographic Store20 EDSAC Auxillary Store21 Circuit Checking22 Circuit Checking23 Addition Circuit24 Trigger Circuits25 Checking26 Discussion27 USA28 Comment29 Holland30 Ficticious Traffic31 Sweden32 Manchester33 Discussion34 Bibliography
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureOther manualsCambridge Conference 1949 :: High Speed Automatic Calculating-Machines 22-25 June 1949
ACLLiteratureOther manualsCambridge Conference 1949 :: High Speed Automatic Calculating-Machines 22-25 June 1949
ACL ACD C&A INF CCD CISD Archives
Further reading

Preface
Contents
Members
1 Welcome
2 Introduction
3 EDSAC
4 EDSAC Demo
5 Relay Computers
6 Discussion
7 CRT Storage
8 Coding
9 Library
10 Sign Correction
11 Nozzle Flow
12 Magnitude
13 France
14 Checking
15 Large Integers
16 Discussion Storage
17 Magnetic Storage
18 Magnetic Recording
19 Photographic Store
20 EDSAC Auxillary Store
21 Circuit Checking
22 Circuit Checking
23 Addition Circuit
24 Trigger Circuits
25 Checking
26 Discussion
27 USA
28 Comment
29 Holland
30 Ficticious Traffic
31 Sweden
32 Manchester
33 Discussion
34 Bibliography

9 Planning the Use of a Paper Library: D J Wheeler

In preparing problems for numerical solution by means of an automatic calculating machine it is apparent that different problems have many parts in common. These parts could therefore be prepared once and for all in a form sufficiently flexible to be used in different problems thus forming a library which would be of great assistance to all users.

We now define the following terms:

PROGRAMME
A PROGRAMME is a flow chart showing the operations (in block form) corresponding to the action of the calculator during the solution of the problem;
ROUTINE
A ROUTINE is the programme written in the detailed code of a particular calculating machine;
SUB-ROUTINE
A SUB-ROUTINE is the coded form of an element in a routine (e.g. square root, input and binary decimal conversion, etc.)

The following advantages arise from the use of such a library:

  1. It simplifies the task of preparing problems for the machine;
  2. It enables routines to be more readily understood by other users, as conventions are standardised and the units of a routine are much larger, being sub-routines instead of individual orders;
  3. Library sub-routines may be used directly, without detailed coding and punching;
  4. Library sub-routines are known to be correct, thus greatly reducing the overall chance of error in a complete routine, and making it much easier to locate errors.

In order to produce a workable library it is necessary to code subroutines in such a way that they can be taken directly into the store of a machine. In the case of a machine such as EDSAC in which orders all refer to absolute storage locations each sub-routine can be placed in the store in one set of positions only. Thus if one order refers to, or operates on another order of the same sub-routine it will need to be adjusted when the sub-routine is moved from one storage location to another.

Example: to replace the number in storage location 100 by its modulus:

Storage    Order    Interpretation
Location
n          A 100    Add contents of 100 to Acc
n+1        E n+4    Examine sign of Acc; if +ve select the contents of (n+4) as the 
                    next order otherwise proceed serially
n+2        S 100    Subtract contents of 100 from Acc
n+3        S 100    Subtract contents of 100 from Acc
n+4        T 100    Transfer the contents of the Acc to 100

The meaning of the above orders is invariant only if the second order is adjusted according to its location in the store.

This difficulty could be overcome in four ways:

  1. By increasing the number of orders to allow direct or indirect use of relative orders, i.e. orders which refer to storage locations relative to their own location.
  2. By choosing an order code so that orders are never altered in the store, but only just before they are executed, orders in the store being invariant.
  3. By arranging for the sub-routine to be transferred before it is used to the position in the store for which it was constructed.
  4. By punching the sub-routine on the tape in such a form that the orders comprising it can be translated into their correct final form during the process of input, using a special sub-routine for the purpose.

We have adopted this last solution at Cambridge for the use of our punched tape library as it does not involve an increase of equipment and overcomes most of the troubles experienced. In many ways it is a more flexible solution than would result from increasing our equipment. We have named the special sub-routine referred to in (4) above, the CO-COORDINATING-ORDERS.

Another difficulty arises from the fact that, although it is desirable to have sub-routines available to cover all possible requirements it is also undesirable to allow the size of the resulting library to increase unduly. However, a sub-routine may be made more versatile by the use of parameters associated with it, thus reducing the total size of the library.

We may divide the parameters associated with sub-routines into two classes:

  1. EXTERNAL Parameters, i.e. parameters which are fixed throughout the solution of a problem and arise solely from the use of the library;
  2. INTERNAL Parameters, i.e. parameters which vary during the solution of the problem.

The co-ordinating orders use the external parameters (l) by combining them with the sub-routine, order by order, and placing the corresponding adjusted sub-routine in the store, just as if it had been coded for the particular values, given to the external parameters. This means that the sub-routine is much simpler and shorter than it would be if it had to modify itself by means of internal parameters each time it was used. Thus the use, where possible, of external parameters reduces the complexity of sub-routines.

Sub-routines may be divided into two types, which we have called OPEN and CLOSED. An open sub-routine is one which is included in the routine as it stands whereas a closed sub-routine is placed in an arbitrary position in the store and can be called into use by any part of the main routine.

The combination of closed sub-routines, and internal parameters in the main routine is very attractive and in some ways may be considered as equivalent to an exceedingly large multi-address order code.

An example of the plan of the input tape for a typical problem is given below:

Co-ordinating Orders Use B Use B Open sub-routine Closed sub-routine A Closed sub-routine B Numerical data ..... orders to call of closed sub-routine B ..... which is punched later on the tape. ..... orders to call in use of B again, in a ..... different part of the main programme. Main Routines

The following description of the working of the co-ordinating orders we have selected may be of interest.

Each order in a sub-routine is punched on the paper tape followed by an additional code letter which enables the co-ordinating orders to deal with it appropriately.

The following is a selection from the code:

Code letter Meaning as interpreted by co-ordinating orders
D Number all subsequent orders with the code letter θ from the position of this order in the store.
θ This order is numbered with reference to the previous D order.
F This order requires no modification.
K Use the order as an external parameter.
H Add the 1st external parameter to this order.
M Add the 2nd external parameter to this order.

Examples of the use of co-ordinating orders.

Suppose that there is a sub-routine in the library which will take the modulus of the difference of the contents of storage locations n and m and place it in location 1, where n and m are determined by external parameters. We will illustrate giving n and m the values of 100 and 110.

Form of orders in Library

    Order   Code Letter
 0   T       1 D     clear acc
 1   A         H     add n to acc
 2   E       5 θ     if acc is +ve, transfer control to 5
 3   S         H)    change sign of
 4   S         H)    acc
 5   T       1 F     put modulus in location 1
 6   A         M
 7   E      10 θ
 8   S         M)    change sign of acc if negative
 9   S         M)
10   S         H     form difference
11   E      14 θ     change sign of
12   T       1 F)    difference if
13   S       1 F)    negative
14   T       1 F     put answer in location 2

Form of orders on the tape ready for including in problem

P 100 K)  external parameters
P 110 K)  punched for problem
T   1 D)
A     H)
E   5 θ)
s     H)
S     H)
T   1 F)
A     M)
E  10 θ)
S     M) from library
S     M)
S     H)
E  14 θ)
T   1 F)
S   1 F)
T   1 F)

Form of order after translating inside machine

Storage    Order in Storage
Location   Location
P          T    1
P+1        A  100
P+2        E  P+5
P+3        S  100
P+4        S  100
P+5        T   1
P+6        A  110
P+7        E P+10
P+8        S  110
P+9        S  110
P+10       S  100
P+11       E P+14
P+12       T    1
P+13       S    1
P+14       T    1

Order code used above

T n
Transfer contents of the Accumulator to storage location n and clear Accumulator.
A n
Add contents of storage location n to the Accumulator.
S n
Subtract contents of storage location n from the Accumulator.
E n
Examine the sign of the number in the Accumulator. If +ve. select the contents of n as the next order, otherwise proceed serially.

Thus using a set of co-ordinating orders which may be of various kinds it is practical to make use of a library of sub-routines, oven with the restricted order code of the EDSAC and if one uses the same orders for the main programme in the store the coding of the main programme is simplified. This in some small way illustrates how it is possible to make calculating machines organise their own problems, and thus - apart from anything else - make them less liable to errors from the fallible human element.

⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site