Extended Autocode(ID:5838/ext002)

Autocode optimised 


Barrett and Mitchell, Leeds University, 1962

Pegasus Autocode extended to have additional mathematical expressions, and an optimised library of routines.

The language could be extended by a DEFINE statement and a description of the function needed. Thereafter it was treated natively. The extended features ran 30% faster than the native Autocode

Operational March 1962

Hardware:
Related languages
Pegasus AUTOCODE => Extended Autocode   Extension of

References:
  • Barrett, W and Mitchell, AJ "An extended autocode for Pegasus" view details External link: Online copy Abstract: An account is given of a program written for a Pegasus computer which will accept instructions, written in a language based on Pegasus Autocode, but which may include general algebraic expressions. A number of other features have been included in the new program; in particular, means are provided whereby the user can readily add new functions and other facilities. Extract: Introduction
    1.  Introduction
    At the Leeds University Computing Laboratory, which is equipped with a Ferranti Pegasus computer, the Pegasus Autocode, as described by Clarke and Felton (1959), has been found invaluable by many users having comparatively small problems to present to the computer. Used with discretion, it can reduce not only the time required to write programs, but also the total computer time needed, since development time is much reduced. Since Pegasus Autocode was written, various new features were incorporated into the University's computer, of which this program did not take full advantage. Late in I960, it was therefore decided to embark on the preparation of a new program, now known as Extended Autocode; this should accept any program written for Pegasus Autocode, but should have substantial additions, which it was hoped would still further simplify the preparation and development of users' programs. Some gain in speed of execution of programs was also sought. Although the language in which programs are presented to Extended Autocode is basically that of Pegasus Autocode, the Extended Autocode itself is an entirely new program having nothing in common with Pegasus Autocode except for some programming techniques used in evaluating certain functions.
    Section 2 of this paper contains a brief account of certain features of Pegasus, additional to those outlined in Clarke and Felton (1959), a knowledge of which is assumed in the following Sections. These latter contain an account of the additional facilities incorporated in Extended Autocode as they affect the user, followed by a general description of the organization of Extended Autocode, and an account of the algebraic compiling routine.
    Extract: The Extended Autocode language
    The Extended Autocode language
    The principal addition made to the original Pegasus Autocode language in writing Extended Autocode is that certain types of instruction may contain "general arithmetical expressions." These are merely extended expressions involving any number of variables, indices or explicit numbers, function titles, and symbols representing arithmetic operations, combined with brackets so as to be meaningful with the normal conventions; functions may have up to six arguments, and both variables and indices may appear in the same expression. Further extensions allow the use of repeated indices in suffices of variables and integers, and in specifying labels in jump instructions. Some examples of valid instructions follow:
    v n\ = 1 -0 + 01 X SIN (- v(n\ — 1 + w3) +
    v(-n2 + 4)))
    0(3 + /i2) = ( v(n\ + 7) - n(/il - n2 + 7))/roi3 PRINT SQRT (v2 X (nl + 5) - vl\ 3045 ----> (nl + n1\ 2-45 X EXP vlQQ + vlQl > 0.
    Other extensions incorporated in Extended Autocode do not affect the structure of the language, but provide additional facilities. Firstly, indices are stored as full-length integers, whose value may range between —238 and 238 — 1, so that full-length integer arithmetic may be carried out. The possibility of indexing integers, as already explained, is of value in this connection.

    Secondly, a system of error printing has been introduced. If an error is detected either during input of instructions or of data, or during execution of a program, a message is printed and the computer stops. A typical message, which includes the number of the label next preceding the instruction in which the error occurs:
    ERROR.    SQRT ARG NEG AFTER 3)
    will illustrate the scope of this facility; it is then possible to re-enter the program at a given labelled instruction. Thirdly, a directive
    DEFINE
    has been introduced to assist users who wish to have available new functions, additional to those appearing in the standard list. It is merely necessary
    (i) to head the autocode program with the word DEFINE, followed by the name of the function and other necessary information;
    (ii) to provide a subroutine tape, punched in ordinary machine language, of a program for the evaluation of the function.

    Several such sequences may head one program if desired. This directive was in fact used to add all functions and directives, except DEFINE itself. The standard list of directives and functions now greatly exceeds those available in Pegasus Autocode, there being over 80 such titles.

    One of these, which may be specially mentioned, is the directive SET, which enables the normal allocation of storage space for indices, variables, labels and compiled program to be changed. Extract: The organization of Extended Autocode
    The organization of Extended Autocode

    When an autocode program is presented to the computer, an input routine reads the instructions and compiles a stored program; this is subsequently interpreted by an executive routine. To this extent, Extended Autocode follows the same pattern as the original Pegasus Autocode, but there are important differences of organization, of which an account follows.
    (a) In Pegasus Autocode, both the input and executive routines are in the main store of the computer simultaneously, and indeed certain sections are common to both. In Extended Autocode, on the other hand, the input and executive routines are quite independent of one another; the latter is not in fact transferred from magnetic tape to the main store until input of the autocode program is complete. Although the input routine is much more extensive, the whole of the space it occupies is thus made available for other purposes during execution of a program. It is normally allocated to the storage of numbers, with the result that all indices, and the first 56 variables, are in the intermediate access
    * The phrase "autocode program" will be used to denote a program of instructions written in the Extended Autocode language.
    store, making a significant contribution to the speed of execution.
    (b)    The dictionary is treated as a single list, in lexicographical order, of titles of all kinds, whereas, in Pegasus Autocode, the dictionary is divided into three independent sections, each corresponding to a particular mode of occurrence in the autocode program, and each in arbitrary order.   The use of a single list simplifies the addition of new titles, while the adoption of lexicographical order enables the dictionary to be searched by a binary-chopping technique, which is much faster than a single-word search.
    (c)    The form  of the  compiled program is  entirely different from that used in Pegasus Autocode, since this latter system, in which the basic unit of storage is a block of eight words, is not sufficiently flexible for the efficient storage of groups of instructions representing general   algebraic   expressions,   or   indeed,   the   more general  system  of indices  allowed in  the  Extended Autocode language.
    In Extended Autocode, the consecutive words of the compiled program are interpreted one by one by the executive routine, and are of three types:
    (i) a positive word, causing a transfer of information to or from the main store;
    (ii) a negative word, treated as a pair of machine instructions and obeyed; it may either carry out some operation required in the execution of the program, or serve as a cue to a subroutine of the executive routine;
    (iii) any word will be treated as a number, an operand of some operation, if immediately preceded by a special word of type (ii). This latter word may be thought of as analogous to a warning character; it is necessary since the word representing a number may take an arbitrary value.
    (d)    When input of an autocode program is complete, Initial Orders are called in to read, from a special library on magnetic tape, known as Autolib, a basic executive   routine,   followed   by   subroutines   for   the evaluation of any functions which appear in the particular program.   The standard Initial Orders Assembly facilities are used to reject any subroutines not required, and also to insert the necessary cues to the accepted subroutines   into   the   compiled   program.    When   this process is complete
    (i) the space reserved for labels, (ii) the compiled program, (iii) the executive routine, (iv) subroutines for evaluation of functions,
    together occupy one continuous zone of the main store. A consequence of this system is that the space required for any particular program is reduced to a minimum, and that additions to Autolib do not affect the storage requirements of existing Autocode programs. Further amendments can be made to one subroutine without disturbing the others; for example, additional printing styles  have  recently  been  added,  which  permit  the replacement of "+" by "space."
          in The Computer Journal 6(3) October 1963 view details