BackbuttonMCP Compiler Interface

A Compiler is considered to be a privileged program on the MCP because it can create an Executable File.

 An Executable File has a FileKind attribute between Value (ALGOLCODE) and Value(CODEFILE) inclusive, or with the FileKind of Value(COMPILERCODEFILE). (See EXECUTABLE at 37716200 in the MCP).

A program which is marked as a Compiler also has special UserData Function privileges which allow it to assume a UserCode. 

 A program is marked as a Compiler using the ODT MP Command.

MP <program name> +COMPILER

A Compiler is declared as a Level 2 Procedure which accepts an Array with Lower Bounds.

The Algol Compiler is declared like this.

Real PROCEDURE AlgolCompiler(Sheet);
 Array Sheet[*];

The layout of some of the Sheet Array passed to the Compiler is documented in the Task Attributes Programming Reference Manual.

Compiler Sheet Array
Word Field Name Values Description
0 [47:1] CANDECalledF   TRUE if the compilation was started from CANDE.
The Compiler SETS,
   ERRLIST
   ERRCOUNT=10
   LINEINFO
   LIBRARY

It RESETS,
   SEG
   LIST
   LISTOPT
See Algol at 90410970.
8 [47:1] IPSInvokedBitF   TRUE if invoked from the Integrated Programming System (IPS). If Set the options are set as for CANDECalledF above, with MERGE also being set by default.
  [45:14] IPSIDF   IPS ID Number.
  [31:8] IPSVFF   IPS Virtual File Number.
  [9:10] CompileTypeF 0 = GoTypeV
1 = SyntaxTypeV
2 = LibraryTypeV
3 = LibraryGoTypeV
 

On earlier MCPs the Sheet Array was used to pass TASK Attributes for the program being compiled.

This has been replaced by using the WFLSUPPORT functions called HANDLEATTRIBUTES and ATTRIBUTEMESSAGE. These are documented in the Task Attributes Programming Reference manual, Section 1, Accessing Task Attributes.

A Compiler sets its  Function Result and its TASKVALUE  to 1 to indicate that there were Syntax Errors and that a CodeFile was not created.

If the Compiler compiles the Code, but is unable to complete an AutoBind, then its TASKVALUE is set to -0.