(As used with S3FORTRAN jobs.)
The Compile Master controls the compilation phase of a job. At Aldermaston this could mean the whole of a FORTRAN job or the compilation phase of a FORGO job. On Titan, there is option corresponding to FORTRAN, due to the lack of a card punch, and the compile and go run is known as S3FORTRAN. The Compile Master, however still retains the facility for operating in the two modes, although no use is made of the second entry, and its effect is omitted from the following notes.
A subset of system directives is recognised to enable Fortran subroutines to be compiled, and ASP subroutines to be assembled, possibly from more than one input stream, and finally for the processing to be terminated and loading initiated.
To facilitate the use of paper tape, whilst still preserving an emphasis on efficient card handling, any short (i.e. less than 80 characters) records beginning with * are padded out with blanks so that they look like cards. Other symbolic records are left short. The S3 compiler and ASP assembler each perform similar padding operations.
Directives are divided into 4 types - compiler callers, input changes, processing terminators, and others. Any * card not recognised as belonging to the first three types is assumed to be long to the last. Detailed checking of directives does not take place until the loading phase.
*S3 is a call for the S3 Fortran compiler.
*ASP is a call for the ASP assembler.
These directives are not retained for the load phase. Note that when the compiler and assembler has finished, a search is made for the next * card (normally the next card). Thus omission of one of these directives results in the apparent disappearance of a routine without comment.
*INPUT with an expression in columns 9-72 will change the current input to the value of the expression. The expression may consist of any constant acceptable to the loader, but no symbol names are allowed. This directive is not retained for the load phase since its effect is immediate, but the currently selected input is remembered when compilation is terminated by *ENDCOMP.
The compile phase is ended by the directive *ENTER, *END or *ENDCOMP. More precisely, it is ended by *ENTER, (unless columns 9-15 contain PRELUDE) or *END???? where ???? represent any characters other than the sequence LIB blank so that *ENDLIB is excluded. All directives are retained for the load phase.. In addition, if the directive is *ENDCOMP. the currently selected input is superimposed on columns 9-16.
All other directives are copied together with any subsequent symbolic or binary cards until a symbolic card with a * in column 1 appears. In the copying process columns 73-80 of binary cards are ignored.
Output from the compile phase required during loading is written to output stream 64. At the end of the compilation phase the redidu of input 0 is renumbered as input 65, and output 64 is renumbered as input 0. Finally the loader is called as a private phase by the 1147 extracode, assuming that the loader begins at a fixed place relative to the compile master.
The compile master assumes that it is entered with TAPE 126 as the supervisor file, pointing at the first block of S3. Assuming that the compile master is at block 1, the relative position of documents are:
Block Document Length Position in Core 1 Compile Master 1 J0117 2 S3 Compressed Dictionary 4 J0004 3 S3 Stage 1 11 J0056 17 S3 Stage 2, 3, 4 16 J0071 33 S3 $ Declarations 11 J0033 44 S3 Simulator 1 J0116 50 ASP 7 0 57 Loader 6 J0067
The compile master begins by reading S3 to core. Subsequent reads are in response to directives, bearing in mind what already exists in core. B21 contains the return address, and B20 is used to indicate whether the jobs S3FORTRAN (one) or compile only (zero).
First the ASP assembler is marked as not present, then the *S3 directive is copied to the head of a new page on output 0, and any parts of the compiler not in core will be read from the disc. S3 may overwrite part of itself, in which case the appropriate documents are marked as not in core, so that they will be re-read when required.
First two parts of the S3 compiler are marked as not in core. Then ASP is read from the disc unless it is already in core.
When ASP is assembling a large routine it may require backing store in the form of working tape 13. This is not supplied automatically by the system, and must be provided by the programmer.
The compile phase is ended with either the 1117 (end program) in the case of a compile only job, or an 1147 (enter private phase) in an S3FORTRAN job. In either case, output stream 0 is terminated by the comment "END OF COMPILER STREAM 0".
Private Monitor is set initially so that should any monitoring occur, the effect is the same as *END in a compile only job. The S3 compiler sets its own private monitor, so the compile master resets its monitor immediately after each return from S3 or ASP.