next up previous
Next: Tapes Up: Alan Turing's Manual for Previous: Programming hints

The official account of a routine

Here we mainly assemble what has been said about the official account of the routine elsewhere in the handbook. The account should include

(i) The name of the routine. The length of this must not exceed 25 characters, and should aim at about eight. It should preferably be pronounceable, and give some indication of the purpose of the routine.

(ii) A short description of the purpose of the routine in general terms in English.

(iii) The cue, or rather the `skeleton cue' and the principal lines /E and /A. The cue consists of forty digits made up as follows.

First ten digits. This is the control transfer number i.e. 1 less than the name of the line in which the routine starts.

Digits 10-19. The `check characters'. They are given by the value of $\{1025([\tp{/E}]_+ - [\tp{/A}]_+)\}_{10}^{19}$ when the routine is first entered. For two page routines this is determined by the `principal lines' /E and /A of the routine itself, and is independent of the context in which it is used. This will also be the case for one-page routines with false cue occupying page 1. In those cases digits 10-19 of the cue can be given in the official account. In other cases, viz. page 0 routines and page 1 routines with true cue, these digits must be left blank. They have to be filled in differently in different applications. The information required for the filling in consists of the principal lines (/E and /A) of the routine in question and the routine from which it is reached.

Sometimes a routine will have a `variable' or `undetermined' subroutine, i.e. one which is not decided until after the routine itself has been completed. This occurs for instance when an undetermined function is involved, e.g. in calculating $\int_0^1 f(x)dx$. In such cases the function is determined by a subroutine, and the subroutine is given through its cue.

These variable subroutines will be subject to numerous restrictions imposed by the master routine, e.g. certain store lines, used by the master routine must not be used by the subroutine, and the results must be given in a specified form. The account of the master routine must also specify its own principal lines at the time of entering the subroutine, in order that the cue of the subroutine may be determinable. These principal lines will be presumed to be the same as applied on entering the master routine unless otherwise specified.

Digits 20-39. These determine the magnetic transfer which will bring the routine to pages 0,1. In the case that digit 39 is 0 we have what is called a true cue, and those twenty digits are simply the magnetic instruction which has to be obeyed. If however digit 39 is 1 we have a false cue, and these twenty digits merely tell us where the magnetic instruction of the true cue is to be found. The last ten digits, with the final 1 replaced by 0, are the number of the track in which it lies. It will be in the right half of the track and the remaining digits give the line in which the required magnetic instruction will appear if the half track in question is transferred to p. 0.

If one is concerned with the false cue of a one page routine using page 1, the check number can be given without qualifying phrase, by using one's knowledge of the content of the appropriate line of a cue-bearing half track. One may take it that $[\tp{/A}]_+=$ track number. But more often these routines will come to p. 0 or will bring their partner pages with them.

It is always recommended that single page routines be given an alternative cue which results in both halves of its track being read. This is the easier alternative to use in cases where the routine is not used in conjunction with another one-page routine.

Routines will often have a number of cues corresponding to alternative entries.

(iv) The effects of the routine must be described accurately, so far as they are known or considered of interest. This will often consist of equations or inequalities relating the states of the machine immediately before entering and immediately after leaving the routine. It must state conditions of validity, accuracy of results etc., and should make some statement of the time taken. Those lines of the store which are altered must be mentioned, if not one of GK,MK,VK or on p0 or p1. It is important at this point to remember to include the lines altered in subroutines. B lines other than B7 which are altered must be mentioned.

(v) Some account of the method should be attempted if this is not obvious. Unusual tricks (e.g. unusual uses of the B tube) should be pointed out.

(vi) The subroutines used should be listed. These need only be the subroutines directly entered from the routine. If it is required to know the indirectly entered subroutines this information must be obtained indirectly.

(vii) The names of the tapes required in order to put the routine into force should be listed. It will usually be the case that a job uses many subroutines in several different ways, so that the list of tapes required will have many duplicates. There will also probably be many whose content is known to be already stored within the machine. To save space therefore we give only the titles of the tapes in the official account of the routine. Additional data about the tapes must be found elsewhere.

(viii) It may happen that the routine uses ACTION as a subroutine. In this case the controller is required to take certain action depending on the printed output. The considerations governing the choice of action must be explained elsewhere, preferably in the account of one of the routines. It will usually be the case that the `descriptive word' which describes the type of action is handed on from routine to routine until it is eventually printed by OUTPUTA under orders from ACTION. The explanation will usually be given in the routine from which the word originates.

Official accounts of a number of routines are given with this handbook. [But regrettably, not in the copy available to the transcriber; the official accounts of ACTION and OUTPUTA would be of great interest. The closest thing available is the set of somewhat informal accounts of routines used with the pilot machine in the appendix.]

next up previous
Next: Tapes Up: Alan Turing's Manual for Previous: Programming hints
Robert S. Thau 2000-02-13