Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ PrefaceContentsNote on certain Supervisor features1. Presenting an Algol Program to Atlas2. Variations on Algol 603. Monitor printing and fault diagnosis4. Code procedures5. Input and Output6. Miscellaneous programming notes □ Appendices and indices □ A1. ICT 7-track punched tape codeA2. Hardware representationA3. Fault tableA4. Standard functions and system proceduresIndex to Supervisor and compiler printingsGeneral index
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureAtlas manualsAlgol :: ATLAS 1 COMPUTER ALGOL REFERENCE MANUAL
ACLLiteratureAtlas manualsAlgol :: ATLAS 1 COMPUTER ALGOL REFERENCE MANUAL
ACL ACD C&A INF CCD CISD Archives
Further reading

Preface
Contents
Note on certain Supervisor features
1. Presenting an Algol Program to Atlas
2. Variations on Algol 60
3. Monitor printing and fault diagnosis
4. Code procedures
5. Input and Output
6. Miscellaneous programming notes
Appendices and indices
A1. ICT 7-track punched tape code
A2. Hardware representation
A3. Fault table
A4. Standard functions and system procedures
Index to Supervisor and compiler printings
General index

6 Miscellaneous Programming Notes

This chapter contains miscellaneous notes which, may be of interest to users of the compiler.

6.1 Arithmetic of real and integer quantities

Numerical values of real and integer quantities are represented in Atlas by 48 bit numbers, having 40 bits of mantissa x (including sign bit) and 8 bits of octal exponent y (including sign bit). The value represented is x.8y.

Real values are represented by standardised Atlas floating point numbers, that is, such that x = 0, 1/8≤x <1 or -1≤x<-1/8. Standardised floating point zero is taken as x = 0, y = -128. The range of real values available is approximately 10-116 to 10113, with an accuracy of about 11 decimal places. Arithmetic on real quantities is performed by standardising rounding accumulator instructions. The arithmetic is performed in the accumulator over 78 digits, the result being standardised and then rounded by truncating the least significant 39 digits, forcing the least significant remaining digit to a 1 if the truncated part was non-zero, and leaving it as it was otherwise.

Integer values are represented by Atlas fixed point numbers, in which the exponent is always 12. The binary point is regarded as being between the 4th and 3rd least significant digits. The range of integer values available is -812 to 812-1 inclusive or approximately -1010 to 1010. Arithmetic on integer quantities is performed by non-standardising instructions.

6.2 Program limitations

The compiler restricts the maximum depth of textual nesting in an Algol program: the limit is approximately 60 textual levels. Any block created within a block or procedure is considered to be at a textual level one lower than that of the block or procedure within which it is enclosed; in this context a procedure declaration may be regarded as being at a textual level one lower than that of the block or procedure in which it appears.

The limit on the total number of blocks and procedure declarations in any one program is approximately 1000.

The limit on the size of an Algol program is normally about 1600 lines. Larger programs (up to 3200 lines) can be run by making use of the magnetic tape backing scheme. This is done by allocating the number 126 to a magnetic tape in the job description; if a tape has that number allocated to it, the scheme will come into play. The scheme is not recommended save when absolutely necessary.

6.3 A note on arrays

The efficiency of a compiled program handling array elements is enormously increased when the subscript expressions consist either of integer variables, integer constants or combinations of those by addition and subtraction only.

6.4 Array bound checking

As mentioned in section 2.2.1, there is normally no check that the values of subscript expressions are within range. Such a check can be incorporated into the compiled program by writing the phrase

COMPILE ARRAY BOUND CHECK;

at the head of the program. All references to subscripted variables in the program are then checked to ensure that they are within the declared bounds.

If the array bounds are exceeded the program is monitored on

ARRAY BOUND EXCEEDED

and terminated in the usual way, as described in section 3.2.

Use of this facility causes extra orders to be compiled to carry out the array bound check, so it is recommended that the check be removed on production work.

6.5 Omission of compiler monitoring

If the phrase

OMIT COMPILER MONITORING;

is written at the head of an Algol program, all printing between the name and date of the compiler and PROGRAM FAULTY or PROGRAM ENTERED will be suppressed. Newlines will still be output. This facility is primarily for results which are to be sent over a data link, but can of course be used with any production run.

6.6 The Algol processor

A processor has been written to enable the compiler to accept programs and data in other dialects of Algol.

The processor allows any combination of one of several input media with one of several sets of permanent procedures. At present available dialects are:

Input media
I.C.T. 7-hole paper tape
Elliott 5-hole paper tape
Elliott 8-hole paper tape
KDF9 8-hole paper tape
Cards (ALCOR and space dependent)
Permanent procedures
I.C.T.
Elliott
KDF9
Graph (for the Atlas Computer Laboratory graph plotter)

Full details are in Algol Paper No. 7 'Atlas Algol processor for non-standard Algol programs', published by the Atlas Computer Laboratory of the Science Research Council.

6.7 Use of store by compiler program

With the present compiler, permanent material and compiled program are in locations from *0, locations from *1 are used for program working space, and constants are compiled into locations from *14.

The compiled program uses B-lines B1 to Bn, where n is the maximum depth of textual nesting (see section 6.2) in the program and B69 and above, so B(n+1) to B68 are available for use in code procedures.

⇑ 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