1 //  Declarations common to the entire BCPL compiler.
  2 //  Last modified on 04/02/74 at 16:01:46 by R F Mabee.
  3 //  Installed on 6180 as Version 3.4, R F Mabee.
  4 //  First installed on 645 as Version 2.7 by R F Mabee.
  5 
  6 external
  7      $(   Readch = "bcpl_machine_code_$Readch"              //  Library routines used by the compiler.
  8           Writech = "bcpl_machine_code_$Writech"
  9           WriteS = "bcpl_stream_io_$WriteS"
 10           WriteN = "bcpl_stream_io_$WriteN"
 11           Format = "bcpl_stream_io_$Format"
 12           Packstring = "bcpl_machine_code_$Packstring"
 13           Unpackstring = "bcpl_machine_code_$Unpackstring"
 14           RemoveEscapes = "bcpl_conversions_$RemoveEscapes"
 15           EqualString = "bcpl_strings_$EqualString"
 16           CompareStrings = "bcpl_strings_$CompareStrings"   //  Alphabetic comparison.
 17           Concatenate = "bcpl_strings_$Concatenate"
 18           ConvertStoN = "bcpl_conversions_$ConvertStoN"
 19           ConvertNtoS = "bcpl_conversions_$ConvertNtoS"
 20           Length = "bcpl_strings_$Length"                   //  Number of characters.
 21           LengthInWords = "bcpl_strings_$LengthInWords"     //  Length of packed string.
 22           RandomI = "bcpl_arithmetic_$RandomI"
 23 
 24           Newvec = "bcpl_utility$Newvec"                    //  Utility routines used throughout the compiler.
 25           Freevec = "bcpl_utility$Freevec"
 26           List1 = "bcpl_utility$List1"
 27           List2 = "bcpl_utility$List2"
 28           List3 = "bcpl_utility$List3"
 29           List4 = "bcpl_utility$List4"
 30           List5 = "bcpl_utility$List5"
 31           List6 = "bcpl_utility$List6"
 32           StoreString = "bcpl_utility$StoreString"
 33           PushInput = "bcpl_utility$PushInput"
 34           PopInput = "bcpl_utility$PopInput"
 35           MakeTimeString = "bcpl_utility$MakeTimeString"
 36           Nextparam = "bcpl_utility$Nextparam"
 37           FormCharconst = "bcpl_utility$FormCharconst"
 38           FormStringconst = "bcpl_utility$FormStringconst"
 39 
 40           CaeReport = "bcpl_report$CaeReport"
 41           Transreport = "bcpl_report$Transreport"
 42           CGreport = "bcpl_report$CGreport"
 43 
 44           Nextsymb = "bcpl_lex0$Nextsymb"
 45 
 46           SymbolName = "bcpl_plist$SymbolName"
 47           FindPrintName = "bcpl_plist$FindPrintName"
 48           EnterIntoCrossreference = "bcpl_plist$EnterIntoCrossreference"
 49 
 50           GetVersion = "bcpl_version$GetVersion"            //  Routines used only by the driver.
 51           UtilitiesInit = "bcpl_utility$UtilitiesInit"
 52           Cleanup = "bcpl_utility$Cleanup"
 53           GetStream = "bcpl_utility$GetStream"
 54 
 55           CAE = "bcpl_cae0$CAE"
 56           LexInit = "bcpl_lex0$LexInit"
 57 
 58           Pname = "bcpl_plist$Pname"
 59           Plist = "bcpl_plist$Plist"
 60 
 61           Trans = "bcpl_trans0$Trans"
 62           CgInit = "bcpl_cg0$CgInit"
 63           BuildObject = "bcpl_cg0$BuildObject"
 64           WriteObjectListing = "bcpl_cg0$WriteObjectListing"
 65      $)
 66 
 67 global              //  Globals are reserved in blocks as follows:
 68      $(   //    0 -  31       system
 69           //   32 -  99       library
 70           //  100 - 149       options and other common cells
 71           //  150 - 159       metering cells
 72           //  160 - 169       bcpl_utility
 73           //  170 - 199       to be assigned
 74           //  200 - 229       lexical phase
 75           //  230 - 249       syntax analyzer
 76           //  250 - 299       translator
 77           //  300 - 399       code generator
 78 
 79                     //  Cells used for communication with the library.
 80           OUTPUT              : 32
 81           INPUT               : 33
 82           MONITOR             : 34
 83           Ch                  : 36
 84 
 85                     //  Options for this compilation.
 86           Listing             : 100
 87           UpperCase           : 101
 88           PPrep               : 102
 89           Crep                : 103
 90           Symbols             : 104
 91           LineMap             : 105
 92           Optimize            : 106
 93           Machine             : 107
 94           Xref                : 108
 95           OcodeSw             : 109
 96           HaveListingFile     : 110
 97           QuietSw             : 111
 98 
 99                     //  Other information about this compilation.
100           CompilerVersionString : 120
101           CompilerVersionNumber : 121
102           CompilerDTMString   : 122
103           CompilerDTM         : 123
104           TimeNowString       : 124
105           TimeNow             : 125
106           OptionString        : 126
107           FileNames           : 127
108           FilesInfo           : 128
109           FileCount           : 129
110           ProgramName         : 130
111           UserID              : 131
112 
113                     //  Working variables needing global scope.
114           LineCount           : 140
115           Errorsw             : 141
116           NAMECHAIN           : 142
117           Symb                : 143
118           DictionaryEntry     : 144
119           Column              : 145
120      $)
121 manifest
122      $(   GlobalTemp = 199  $)          //  Number of cell available for local, temporary use.
123 
124 manifest
125      $(   Left = 18; Right = $8777777
126           Endofstreamch = $87777
127           Even = $87777777777776
128           Vmax = 511
129           LineMask = $817777; FileShift = 13      //  Breakdown of line count.
130           UnexpectedCase = 99           //  Error code for use throughout compiler.
131      $)