Trailing-Edge
-
PDP-10 Archives
-
decuslib10-11
-
43,50530/pascmp.pas
There are 4 other files named pascmp.pas in the archive. Click here to see a list.
00100 %$L-,C-,D-,T-,V:001200000217B\
00200 program pascmp;
00300 include 'pasprm.pas'; (* set up tops10 and tops20 *)
00400 %*********************************************************
00500 * *
00600 * *
00700 * STEP-WISE DEVELOPMENT OF A PASCAL COMPILER *
00800 * ****************************************** *
00900 * *
01000 * *
01100 * STEP 5: SYNTAX ANALYSIS INCLUDING ERROR *
01200 * HANDLING; CHECKS BASED ON DECLARA- *
01300 * 15/3/73 TIONS; ADDRESS AND CODE GENERATION *
01400 * FOR A HYPOTHETICAL STACK COMPUTER *
01500 * *
01600 * *
01700 * AUTHOR: URS AMMANN *
01800 * FACHGRUPPE COMPUTERWISSENSCHAFTEN *
01900 * EIDG. TECHNISCHE HOCHSCHULE *
02000 * CH-8006 ZUERICH *
02100 * *
02200 * CODE GENERATION FOR DECSYSTEM 10 BY *
02300 * C.-O. GROSSE-LINDEMANN, F.-W. LORENZ, *
02400 * H.-H. NAGEL, P.J. STIRL *
02500 * *
02600 * MODIFICATIONS TO GENERATE RELOCATABLE OBJECT CODE *
02700 * BY E. KISICKI (DEC 74) *
02800 * *
02900 * DEBUG SYSTEM BY P. PUTFARKEN (DEC 74) *
03000 * *
03100 * INSTITUT FUER INFORMATIK, D-2 HAMBURG 13, *
03200 * SCHLUETERSTRASSE 70 / GERMANY *
03300 * *
03400 * *
03500 *********************************************************\
03600
03700
03800
03900 % HOW TO GENERATE A NEW PASCAL COMPILER
04000
04100 SOURCES:
04200 A) ASCII: PASREL.PAS
04300 RUNTIM.MAC
04400 DEBSUP.MAC
04500 DEBUG .PAS
04600 B) BINARY: PASREL.SHR
04700 PASREL.LOW
04800 PASLIB.REL (CHECK INITPROCEDURE "SEARCH LIBRARIES")
04900
05000 ! IF THE NEW COMPILER SHOULD NOT BE MADE AVAILABLE FOR GENERAL USE ON SYS,
05100 ! ENTER THE APPROPIATE DIRECTORY SPECIFICATIONS IN INITPROCEDURE "SEARCH LIBRARIES"
05200
05300
05400 STEP ACTION
05500
05600 0 SAVE ALL SOURCE FILES ON DECTAPES!!
05700 1 .COPY PASLBN.REL=PASLIB.REL
05800 2 IF THERE ARE NO CHANGES TO RUNTIM.MAC, DEBSUP.MAC, OR DEBUG.PAS
05900 THEN GOTO STEP 9
06000 3 UPDATE RUNTIM.MAC
06100 4 ASSEMBLE " --> RUNTIM.REL
06200 5 UPDATE DEBSUP.MAC
06300 6 ASSEMBLE " --> DEBSUP.REL
06400 7 UPDATE DEBUG.PAS
06500 .RUN PASREL
06600 *DEBUG.PAS --> DEBUG.REL
06700 8 .R FUDGE2
06800 *PASLBN.REL=PASLBN.REL<RUNSP>,RUNTIM.REL<RUNSP>(R)$
06900 *PASLBN.REL=PASLBN.REL<DEBSP>,DEBSUP.REL<DEBSP>(R)$
07000 *PASLBN.REL=PASLBN.REL<DEBUG>,DEBUG.REL<DEBUG>(R)$
07100 *^C
07200 --> PASLBN.REL
07300 9 UPDATE PASREL.PAS
07400 UPDATE "HEADER" IN PASREL.PAS
07500 IF THERE ARE NEW ENTRIES TO RUNSP OR DEBSP
07600 CHECK
07700 INITPROCEDURE "RUNTIME-, DEBUG-SUPPORTS", "SUPPORTS"
07800 AND
07900 PROCEDURE "SUPPORT"
08000 10 .RUN PASREL
08100 *PASREL.PAS --> PASREL.REL
08200 11 .LOAD PASREL,/SEARCH PASLBN.REL
08300 .SSAVE PASREL 36 --> PASREL.SHR
08400 PASREL.LOW
08500
08600 36 K CORE ONLY IF NO RUNTIMECHECK (C-) AND NO DEBUG OPTION (D-) , OTHERWISE MORE !
08700
08800 12 .RENAME PAS1.PAS=PASREL.PAS
08900 13 .RUN PASREL
09000 *PAS1.PAS --> PAS1.REL
09100 14 .LOAD PAS1,/SEARCH PASLBN.REL
09200 .SSAVE PAS1 36 --> PAS1.SHR
09300 PAS1.LOW
09400 14.1 .RENAME PAS2.PAS=PAS1.PAS
09500 14.2 .RUN PAS1
09600 *PAS2.PAS --> PAS2.REL
09700 14.3 .LOAD PAS2,/SEARCH PASLBN.REL
09800 .SSAVE PAS2 36 --> PAS2.SHR
09900 --> PAS2.LOW
10000 15 .R FILCOM
10100 *TTY:=PAS2.LOW,PAS1.LOW
10200 NO DIFFERENCES ENCOUNTERED
10300 *TTY:=PAS2.SHR,PAS1.SHR
10400 FILE 1) DSK:PAS2.SHR CREATED: XXX
10500 FILE 2) DSK:PAS1.SHR CREATED: XXX
10600 400005 604163 XXXXXX 604163 XXXXXX XXXXXX
10700 %FILES ARE DIFFERENT
10800
10900 16 .DELETE PASREL.*,PAS1.*,PAS2.REL,PASLIB.REL
11000 .PRINT PAS2.LST
11100 .RENAME PASREL.*=PAS2.*
11200 .RENAME PASLIB.REL=PASLBN.REL
11300
11400
11500 *******************************************************************\
11600
11700 %HINTS FOR INTERPRETING ABBREVIATED IDENTIFIERS
11800 BRACK : BRACKET "[ ]" IX : INDEX
11900 C : CURRENT L : LOCAL
12000 C : COUNTER L : LEFT
12100 CST : CONSTANT PARENT : "( )"
12200 CTP : IDENTIFIER POINTER P/PTR : POINTER
12300 EL : ELEMENT P/PROC : PROCEDURE
12400 F : FORMAL R : RIGHT
12500 F : FIRST S : STRING
12600 F : FILE SY : SYMBOL
12700 F/FUNC : FUNCTION V : VARIABLE
12800 G : GLOBAL V : VALUE
12900 ID : IDENTIFIER
13000 REL : RELATIVE REL : RELOCATION\
13100
13200 (*LOCAL CHANGE HISTORY
13300 1 CLEAN UP COMMENT SCANNING AND ALLOW /* */ BRACKETS.
13400 NOTE THAT THIS \ WOULD HAVE TERMINATED THIS COMMENT
13500 PRIOR TO FIX.
13600 2 INCREASE STACKANDHEAP, GET CORE IF NEEDED ON PROGRAM
13700 ENTRY, FIX PARAMETER PASSING BUG, LOAD PASREL FROM
13800 SYS: INSTEAD OF DSK:, GENERATE FLOAT AND FIX INLINE.
13900 (FROM HEDRICK)
14000 NB: RUNTIM has now been modified to pass all characters,
14100 including control characters as well as lower case.
14200 It no longer turns tabs into spaces. Thus it was
14300 necessary to put this file through a program that
14400 expanded tabs into spaces when they were in strings.
14500 Thus FILCOM with the old version should specify /S
14600 or lots of irrelevant differences will be found.
14700 3 MAP LOWER CASE TO UPPER EXCEPT IN STRINGS. (DOESN'T
14800 SOLVE THE PROBLEM ABOUT SETS, THOUGH.) HEDRICK.
14900 4 use SCAN for file spec's, and fix to be called by
15000 COMPIL. Hedrick.
15100 5 add /CREF switch. Hedrick.
15200 6 allow PROGRAM statement. Syntax check but ignore it.
15300 fix bug that caused lower case char. after a string to put compiler in loop
15400 allow <> for #
15500 allow LABEL declaration. Syntax check bug ignore it.
15600 with /CREF/OBJ put only 3 instructions per line (4
15700 overflow a LPT line)
15800 use standard PACK and UNPACK
15900 catch illegal characters
16000 7 add /HEAP switch for size of stack and heap
16100 treat lower case as upper in sets
16200 10 Add STRSET and STRWRITE - equivalent to RESET and
16300 REWRITE, but sets I/O into string
16400 also GETINDEX, CLOSE, ROUND, CALLI
16500 ALSO REDID RESET/REWRITE TO TAKE GOOD FILE NAMES
16600 11 Modify compiler to use new RESET/REWRITE.
16700 12 Make PASCAL programs self-expanding
16800 13 ADD DDT SYMBOL NAMES FOR ROUTINES(BLOCK-STRUCTURED)
16900 use PROGRAM name as module and entry name
17000 allow strset/write on non-TEXT files
17100 add opt. 4th arg to strset/write: limit
17200 14 allow read of string - gets rest of line
17300 add rename,dismiss,update,dumpin/out,useti/o, and xblock arg to
17400 reset and friends
17500 15 a few more arg's to some runtimes
17600 16 detect unexpected EOF
17700 17 DECUS VERSION - CHANGE DDT SYMBOLS TO BE OK FOR DEC DDT
17800 20 CMU patch: do packed struct. correctly. Did not adopt:
17900 (1) replace CAMG, etc., for text (their fix did unnecessary work for
18000 the most common cases, and didn't get all of the obscure ones)
18100 (2) use Knuth's defn of MOD (the one here is so much faster, who care about
18200 negative numbers?)
18300 (3) clean up variants in NEW (they say it is unnecessary)
18400 Also: fix ill mem ref if undef var first after READ
18500 21 allow PROGRAM <name>; (i.e. no file list)
18600 allow null field list in record (for null variant, mainly)
18700 fix MOD. Much cleaner fix than CMUs. Usually adds just one instruction
18800 fix compare of PACKED ARRAY OF CHAR. Get it all (I hope)
18900 keep new from storing tag if no id (CMU's fix)
19000 implement +,*,- as set operators
19100 22 restore MOD to be REM (Cyber does it that way)
19200 fix all my added file things to use GETFN to scan
19300 file name, so we properly handle external files, etc.
19400 fix callnonstandard to pass external files
19500 fix writewriteln so doesn't ill mem ref on undef file
19600 23 change enterbody to always zero locals. Needed to ensure
19700 that certain comparisons work, but a good thing anyway.
19800 if typechecking is on, check for following nil or 0 pointer
19900 24 do not allow comparisons except those in manual.
20000 means we don't have to zero locals on proc entry, ever.
20100 add LOC(<proc>) that returns address of proc or ftn
20200 add S:<integer> and H:<integer> comments, to set starting
20300 addr of stack and heap respectively
20400 change starting code to not disturb %rndev, etc. on restart
20500 25 add /ZERO (and $z) to control whether locals initialized
20600 to zero. Useful mostly to help find uninit.'ed pointers.
20700 26 allow record as extended lookup block
20800 add error message's for ext. lookup block
20900 don't check file pointers as if they were pointers!
21000 use getfn instead of getfilename in break,breakin,
21100 and close, to allow non-ascii files
21200 27 add NEWZ that does what NEW used to (zeros what it gets)
21300 30 fix NEW with : syntax, per Nagel.
21400 31 FIX ILL MEM REF IN READREADLN
21500 ADD ERR MSG FOR ASSIGN TO FTN NAME OUTSIDE BODY
21600 32 add APPEND
21700 33 full implementation of PROGRAM statement
21800 version numbering of output files and program
21900 allow proc and func as parameters
22000 remove LOC (subsumed by above)
22100 add $V directive for version number
22200 34 allow list of entry points in PROGRAM statement
22300 35 fix error recovery in BLOCK, especially for /NOMAIN
22400 36 ALLOW DEBUGGING MULTIPLE FILES
22500 remove T- option
22600 NB: I have not removed the variables for T-, and also
22700 supports exist for indeb. and exdeb., though they
22800 are no longer used in PASCMP.
22900 37 fix bug in static link for level one proc's
23000 40 use RESDEV as external name for DISMISS
23100 by default put request for PASLIB before FORLIB
23200 improve format of /OBJECT listing
23300 fix arg's to predefined functions
23400 fix comparison of unpacked strings
23500 41 make it restartable
23600 change kludge for file OUTPUT
23700 42 allow variable records for GET,PUT,and DUMPx
23800 Currently DUMPx implemented in kludgey way.
23900 43 add 5 locations to file block for new runtimes
24000 add PUTX
24100 add optional arg to useti
24200 allow 12 digit octal number
24300 44 Add SETPOS and CURPOS to compiler
24400 45 Add NEXTBLOCK to compiler and make check for
24500 AC overlap with APPEND,UPDATE
24600 46 Repair CALLI to use 1 for true, and accept all
24700 possible argument formats.
24800 47 Add some more functions
24900 Repair calculations for NEW with packed arrays
25000 50 Generate correct code for 400000,,0
25100 Reinitialize file ctl blocks at start
25200 Don't open INPUT or OUTPUT unless asked
25300 51 Allow mismatch of byte size for SETSTRING
25400 Fix GETLINENR
25500 52 Fixes from CMU:
25600 To CALLNONSTANDARD: when depositing directly into
25700 display, moved 2 ac's for all arg's of size 2,
25800 without checking to see if VAR. Assumed AC was
25900 unchanged by BLT.
26000 To SIMPLEEXPRESSION: optimization sometimes negated
26100 a real constant. If had been declared by CONST,
26200 future ref's were to the negated quantity!
26300 53 Problems with dynamic memory expansion:
26400 Arbitrarily asked for 40b more locations above
26500 end of stack (for runtimes). But some odd
26600 procedure calls use more. Need to figure out
26700 how much memory is used.
26800 CORERR just allocated memory up to (P). Should
26900 be 40(P), or however much is really needed.
27000 So add STKOFFMAX, to keep track of how much
27100 really needed. CORALLOC is addr of the test for
27200 sufficient memory, fixed up.
27300 54 More dynamic memory: Need to accumulate offsets
27400 above top of stack, in case of
27500 x(1,2,3,4,5,f(1,2,3,4,5,6)), etc., though an
27600 actual problem seems a bit unlikely.
27700 55 Add require source file feature
27800 56 Clean up syntax for require file
27900 57 add tops20 version
28000 60 make tops20 strings work more like tops10
28100 61 add jsys pseudo-runtime
28200 add tops20 runtimes and restrict runtimes that work only on one system
28300 add +*@ after file name to control gtfjn in tops20
28400 62 make sure there is never data above the stack pointer
28500 63 convert time, runtime, setuwp for tops20
28600 64 input:/ for tops-20
28700 empty entry in record
28800 non-local goto's
28900 fix procedure param's if not in ac's
29000 65 allow extra semicolon in case
29100 remove references to exit labels
29200 66 speed up non-local goto's
29300 67 fix external proc's as proc param's
29400 70 fix ill mem ref if certain errors in type decl
29500 71 make file name in fcb be 7 bit for tops20
29600 72 make two fixup chains for 2 word constants, to
29700 prevent giving LINK an ill mem ref
29800 73 make new use getfn for file names, to get EXTERN files
29900 74 allow new init. so tops10 version can work with emulator
30000 75 fix non-loc goto's - typo made goto chain bad
30100 76 allow a set in reset/rewrite to specify bits.
30200 allow break char set in read/readln
30300 77 fix jsys and reset set arguments
30400 100 fix ac usage in readreadln from strings
30500 101 fix fltr and fix code generation
30600 102 Add klcpu - put improved packed array code under it
30700 103 Fix pointer to global symbol table in case that level
30800 has already been output by some inner procedure
30900 104 Check stack overflow
31000 Check to be sure structures aren't too big
31100 Range check subranges in for loop and value parameters
31200 105 Use tables instead of -40B to convert from lower case
31300 106 Make subranges of reals illegal
31400 107 Abort creation of .REL file on all errors
31500 110 Allow [x..y] set construct
31600 111 Allow STRING and POINTER parameters to EXTERN proc's
31700 112 Clrbfi when error detected. Bounds check sets [a..b]
31800 113 Make real number reader handle exact things exactly
31900 Don't demand foward type ref's resolved at end of require file
32000 114 Write local fixups even if only non-loc gotos
32100 Make CREF not say .FIELDID. for local gotos
32200 maxint = 377777777777B
32300 115 Make tops10=false, kl=false work (tenex)
32400 116 IDRECSIZE entries for param, labelt type
32500 Make NEXT NIL instead of 0 when not used, for COPYCTP
32600 117 Fix enumerated type in record
32700 120 Make initialization routine use JSP, for T20/Tenex so
32800 don't have ill mem ref if emulator present
32900 121 Initialize CODEARRAY: fix bollixed INITPROC's
33000 122 KA's. This includes fixing COPYSTP so it doesn't
33100 try to follow NIL pointers. Harmless if 377777 is a
33200 legal address, but it isn't for KA's.
33300 123 Do POPF when can't find included file, so close gets done.
33400 124 Limit initprocedures to top level.
33500 Initialize CREF off
33600 125 Do POPF when expected eof inside included file.
33700 126 Detect procedures not beginning with BEGIN
33800 127 INit CREF to FALSE, fix [const..var] set construct
33900 130 Fix KA bug wherein random word in core image is garbage
34000 131 Move cixmax to pasprm.pas so tops20 can use big value
34100 132 Replace KA10 with KACPU for op codes and NOVM for old
34200 memory allocation.
34300 133 Fix JSYS to allow functions within it. Garbaged stack.
34400 134 Allow DELETE in Tops-10, too.
34500 135 Fix LOG2 for big numbers. Prevent ill mem ref's in
34600 PACK and UNPACK with syntax errors.
34700 136 Add header line at top of each page with pg. number
34800 137 Reset line no. to 1 at start of page.
34900 Fix bug in set constructors for CHAR
35000 140 Chnage order of SETMAP to closer to ASCII collating seq.
35100 141 Fix problem where REGC gets messed up by array subscript
35200 calculations when ONFIXEDREGC is in effect.
35300 Detect overflow in number scanning with JFCL.
35400 142 Make real number scanner scan anything legitimate
35500 143 Redo I/O to string in Tops-10 for new runtimes and fix
35600 onfixedregc code for packed arrays
35700 144 Allow :/ in program and :@ in reset for Tops-10
35800 145 Change external name of GET to GET. for Wharton
35900 146 Reinit count in putrelcode to avoid garbage in .REL file
36000 147 Lines start with 2 on new pages.
36100 150 Fix bug in forward type references,
36200 error recovery in fieldlist if garbage case type
36300 symbol table in forward proc's for debugger
36400 151 Fix reversed args in I,J:INTEGER in procedure decl.
36500 152 Add DISPOSE
36600 153 Fix some reg usage problems with DISPOSE
36700 154 More reg usage problems with DISPOSE
36800 155 Source file name in DEBUG block
36900 156 Detect FTNNAME^.field := value. Only bare ftn name
37000 allowed on LHS of assignment.
37100 157 Add $A- to turn off arith check
37200 160 Add compiler switch /ARITHCHECK
37300 161 fix STRINg and POINTER
37400 162 fix REGSIZE
37500 163 fix TIME for Tops-20
37600 164 use Polish fixups in CASE
37700 165 in type decl, make sure ^THING gets local defn of THING,
37800 even if it happens later and there is a higher level defn.
37900 (This requires treating ^THING as forward always.)
38000 166 make assignment to func id from inner func work
38100 initialize frecvar in fieldlist, to prevent ill mem ref
38200 with null record decl.
38300 167 improvements to edit 165
38400 170 more improvements to 165 (this time to error handling)
38500 171 allow read into packed objects
38600 allow read and write of binary files
38700 make sure default file names don't use user-declared INPUT,
38800 and OUTPUT
38900 fix NEW of pointer that is part of packed array
39000 172 option string as third arg of RESET, etc.
39100 evaluate upper bound of FOR statement only once
39200 173 allow files in any context; internal files
39300 174 fix to initprocedures from Hisgen
39400 175 make getfn take a param telling runtime validity check
39500 needed. SETSTRING, etc., do not
39600 176 better unterminated-comment error messages
39700 177 fix AC allocation in GETFILENAME
39800 200 fix addressing problem in loading file pointers
39900 201 make most manipulation of zero size objects be no-op.
40000 Previously one might stomp on the next variable.
40100 202 insufficient initialization before RESET(TTY), etc.
40200 fix POINTER passed by ref
40300 203 fix glitch in edit 202
40400 204 don't validity check the FCB for CLOSE, RCLOSE, and DISMISS
40500 205 fix AC in RENAME
40600 206 allow constants in WRITE statements for FILE OF INTEGER, etc.
40700 207 fix AC in GETFILENAME (again...)
40800 210 Allow 9 digit HEX numbers
40900 211 Fix output of string constants in .REL file
41000 212 Better error message if INPUT or OUTPUT redefined
41100 213 Fix procedure exit code if there is local variable
41200 214 Make debugger see locals of forward declared proc's
41300 215 Fix loop in CALLNONSTANDARD when args omitted in defn.
41400 216 Add $P: to set start of highseg (pure code)
41500 217 LASTFILE can be NIL even when current expr is a file, if it
41600 was gotten by indexing, etc. Replace it with a field in
41700 the ATTR, which is going to be more general.
41800 Fix FIELDLIST to set up SIZE of the TAGWITHOUTID. Did it
41900 only with TAGWITHID
42000 *)
42100
42200 CONST
42300 HEADER = 'PASCAL %12(217)';
42400
42500 DISPLIMIT = 20; MAXLEVEL = 8;
42600 STRGLGTH = 120; BITMAX = 36;
42700 (* 43 - longer file block for new runtimes *)
42800 SIZEOFFILEBLOCK=43B ; {plus size of component}
42900 OFFSET=40B; %FUER SETVERARBEITUNG DER ASCIICHARACTER\
43000 CHCNTMAX = 132; %MAXIMUM OF CHARACTERS IN ONE LINE\
43100 LEFT = 2;RIGHT = 1;BOTH = 3;NO = 0;
43200
43300 %KONSTANTEN VON BODY: \
43400 %*********************\
43500
43600 (* move cixmax to param file *)
43700 HWCSTMAX = 377777B; LABMAX = 20;
43800 (* 2 - increase default stack space *)
43900 (* 7 - stackandheap now set by switch *)
44000 (* 137 - fix set constructor for CHAR *)
44100 MAXERR = 4; BASEMAX = 71; CHARMAX = 177B;
44200
44300 %ADDRESSES:
44400 **********\
44500
44600 HAC=0; %HILFSREGISTER\
44700 TAC=1; %HILFSREGISTER AUCH FUER BYTEPOINTER\
44800 REGIN=1; %INITIALISE REGC\
44900 PARREGCMAX=6; %HIGHEST REGISTER USED FOR PARAMETERS\
45000 WITHIN=12; %FIRST REGISTER FOR WITHSTACK\
45100 NEWREG=13; %LAST PLACE OF NEW-STACK\
45200 BASIS=14; %BASIS ADDRESS STACK\
45300 TOPP=15; %FIRST FREE PLACE IN DATASTACK\
45400 PROGRST = 145B; %LOC 140B..144B RESERVED FOR DEBUG-PROGR.\
45500 (* 216 - HIGHSTART is now variable *)
45600 MAXADDR=777777B;
45700
45800
45900
46000
46100
46200 TYPE
46300 %DESCRIBING:\
46400 %***********\
46500
46600
46700 %BASIC SYMBOLS\
46800 %*************\
46900
47000 SYMBOL = (IDENT,INTCONST,REALCONST,STRINGCONST,NOTSY,MULOP,ADDOP,RELOP,
47100 LPARENT,RPARENT,LBRACK,RBRACK,COMMA,SEMICOLON,PERIOD,ARROW,
47200 COLON,BECOMES,LABELSY,CONSTSY,TYPESY,VARSY,VALUESY,FUNCTIONSY,
47300 (* 6 - add PROGRAM statement *)
47400 (* 56 - ADD INCLUDE *)
47500 PROCEDURESY,SETSY,PACKEDSY,ARRAYSY,RECORDSY,FILESY,FORWARDSY,PROGRAMSY,INCLUDESY,
47600 BEGINSY,IFSY,CASESY,REPEATSY,WHILESY,FORSY,WITHSY,LOOPSY,
47700 GOTOSY,EXITSY,ENDSY,ELSESY,UNTILSY,OFSY,DOSY,TOSY,DOWNTOSY,
47800 EXTERNSY,PASCALSY,FORTRANSY,ALGOLSY,COBOLSY,
47900 THENSY,OTHERSY,INITPROCSY,OTHERSSY);
48000
48100 OPERATOR = (MUL,RDIV,ANDOP,IDIV,IMOD,PLUS,MINUS,OROP,LTOP,LEOP,GEOP,GTOP,
48200 NEOP,EQOP,INOP,NOOP);
48300
48400 SETOFSYS = SET OF SYMBOL;
48500
48600 (* 23 - check for bad pointer *)
48700 (* 24 - ONLY CLEAR NEW WHEN TYPECHECKING *)
48800 (* 104 - new tops10 stackoverflow *)
48900 (* 152 - DISPOSE *)
49000 SUPPORTS = (FIRSTSUPPORT,STACKOVERFLOW,DEBSTACK,BADPOINT,ALLOCATE,CLEARALLOC,DEALLOCATE,
49100 (* 173 - internal files *)
49200 WITHFILEDEALLOCATE,
49300 (* 43 - add PUTX *)
49400 (* 64 - non-loc goto *)
49500 EXITGOTO,EXITPROGRAM,GETLINE,GETFILE,PUTLINE,PUTFILE,PUTXFILE,
49600 (* 57 - Add strset and strwrite external routines *)
49700 RESETFILE,REWRITEFILE,RESETSTRING,REWRITESTRING,GETCHARACTER,PUTPAGE,ERRORINASSIGNMENT,
49800 (* 173 - internal files *)
49900 FILEUNINITIALIZED,INITFILEBLOCK,
50000 WRITEPACKEDSTRING,WRITESTRING,WRITEBOOLEAN,READCHARACTER,READINTEGER,READREAL,
50100 (* 171 - RECORD READ/WRITE *)
50200 (* 206 - extend for constants *)
50300 READRECORD,WRITERECORD,WRITESCALAR,
50400 BREAKOUTPUT,OPENTTY,INITIALIZEDEBUG,ENTERDEBUG,INDEXERROR,WRITEOCTAL,WRITEINTEGER,WRITEREAL,
50500 (* 10 add CLOSE *)
50600 WRITEHEXADECIMAL,WRITECHARACTER,CONVERTINTEGERTOREAL,
50700 (* 14 and lots more *)
50800 (* 33 - PROGRAM statement *)
50900 CONVERTREALTOINTEGER,CLOSEFILE,READSTRING,READPACKEDSTRING,READFILENAME,
51000 NAMEFILE,DISFILE,UPFILE,APFILE,READDUMP,WRITEDUMP,SETIN,SETOUT,BREAKINPUT,
51100 (* 74 - tops20 routines *)
51200 SETPOSF,CURPOSF,NEXTBLOCKF,SPACELEFTF,GETXF,DELFILE,RELFILE,INITMEM,INITFILES,
51300 (* 163 - tops20 TIME function *)
51400 GETDAYTIME,LASTSUPPORT);
51500
51600 %CONSTANTS\
51700 %*********\
51800
51900 CSTCLASS = (INT,REEL,PSET,STRD,STRG);
52000 CSP = ^ CONSTNT;
52100 (* 55 - add require files *)
52200 STRGARR = PACKED ARRAY[1..STRGLGTH] OF CHAR;
52300 CONSTNT = RECORD
52400 SELFCSP: CSP; NOCODE: BOOLEAN;
52500 CASE CCLASS: CSTCLASS OF
52600 INT : (INTVAL: INTEGER; INTVAL1:INTEGER %TO ACCESS SECOND WORD OF PVAL\ );
52700 REEL: (RVAL: REAL);
52800 PSET: (PVAL: SET OF 0..71);
52900 STRD,
53000 STRG: (SLGTH: 0..STRGLGTH;
53100 SVAL: PACKED ARRAY [1..STRGLGTH] OF CHAR)
53200 END;
53300
53400 VALU = RECORD
53500 CASE BOOLEAN OF
53600 TRUE: (IVAL: INTEGER);
53700 FALSE: (VALP: CSP)
53800 END;
53900
54000 %DATA STRUCTURES\
54100 %***************\
54200
54300 LEVRANGE = 0..MAXLEVEL; ADDRRANGE = 0..MAXADDR; INSTRANGE = 0..677B ;
54400 RADIXRANGE = 0..37777777777B; FLAGRANGE = 0..17B;
54500 BITRANGE = 0..BITMAX; ACRANGE = 0..15; IBRANGE = 0..1; CODERANGE = 0..CIXMAX ;
54600 (* 173 - internal files *)
54700 BITS5 = 0..37B; BITS6 = 0..77B; BITS7 = 0..177B;
54800 STRUCTFORM = (SCALAR,SUBRANGE,POINTER,POWER,ARRAYS,RECORDS,FILES,TAGFWITHID,TAGFWITHOUTID,VARIANT);
54900 DECLKIND = (STANDARD,DECLARED);
55000 STP = ^ STRUCTURE; CTP = ^ IDENTIFIER; BTP = ^BYTEPOINT;
55100 FTP = ^FILBLCK;
55200 GTP = ^GLOBPTR ;
55300
55400 {A STRUCTURE is used whenever it is necessary to say what something is.
55500 I.e. each variable entry in the symbol table points to a STRUCTURE to
55600 say what kind of thing it is, and expressions and other structured
55700 objects use a STRUCTURE to say what kind of object is involved.
55800 SELFSTP is used for dumping out the symbol table into the object file
55900 for PASDDT.}
56000
56100 STRUCTURE = PACKED RECORD
56200 SELFSTP: STP; SIZE: ADDRRANGE;
56300 NOCODE: BOOLEAN; BITSIZE: BITRANGE;
56400 (* 173 - internal files *)
56500 HASFILE: BOOLEAN;
56600 CASE FORM: STRUCTFORM OF
56700 SCALAR: (CASE SCALKIND: DECLKIND OF
56800 DECLARED: (DB0: BITS5; FCONST: CTP));
56900 SUBRANGE: (DB1: BITS6; RANGETYPE: STP; MIN,MAX: VALU);
57000 POINTER: (DB2: BITS6; ELTYPE: STP);
57100 POWER: (DB3: BITS6; ELSET: STP);
57200 ARRAYS: (ARRAYPF: BOOLEAN; DB4: BITS5; ARRAYBPADDR: ADDRRANGE;
57300 AELTYPE,INXTYPE: STP);
57400 RECORDS: (RECORDPF: BOOLEAN; DB5: BITS5;
57500 FSTFLD: CTP; RECVAR: STP);
57600 FILES: (DB6: BITS5; FILEPF: BOOLEAN;FILTYPE: STP);
57700 TAGFWITHID,
57800 TAGFWITHOUTID: (DB7: BITS6; FSTVAR: STP;
57900 CASE BOOLEAN OF
58000 TRUE : (TAGFIELDP: CTP);
58100 FALSE : (TAGFIELDTYPE: STP));
58200 VARIANT: (DB9: BITS6; NXTVAR,SUBVAR: STP; FIRSTFIELD: CTP; VARVAL: VALU; QXLYPRTWRR: BOOLEAN)
58300 END;
58400
58500 BPOINTER = PACKED RECORD
58600 SBITS,PBITS: BITRANGE;
58700 IBIT,DUMMYBIT: IBRANGE;
58800 IREG: ACRANGE;
58900 RELADDR: ADDRRANGE
59000 END;
59100
59200 BPKIND = (RECORDD,ARRAYY);
59300
59400 BYTEPOINT = PACKED RECORD
59500 BYTE: BPOINTER;
59600 LAST :BTP;
59700 CASE BKIND:BPKIND OF
59800 RECORDD: (FIELDCP: CTP);
59900 ARRAYY : (ARRAYSP: STP)
60000 END;
60100 GLOBPTR = RECORD
60200 NEXTGLOBPTR: GTP ;
60300 FIRSTGLOB,
60400 LASTGLOB : ADDRRANGE ;
60500 FCIX : CODERANGE
60600 END ;
60700
60800 FILBLCK = PACKED RECORD
60900 NEXTFTP : FTP ;
61000 FILEIDENT : CTP
61100 END ;
61200
61300 %NAMES\
61400 %*****\
61500
61600 (* 64 - non-loc goto *)
61700 (* 111 - STRING, POINTER *)
61800 (* PARAMS is a special kind of TYPES. It is used only for
61900 predeclared identifiers describing kludgey types that are
62000 valid only in procedure parameter lists. *)
62100 IDCLASS = (TYPES,KONST,VARS,FIELD,PROC,FUNC,LABELT,PARAMS);
62200 SETOFIDS = SET OF IDCLASS;
62300 IDKIND = (ACTUAL,FORMAL);
62400 PACKKIND = (NOTPACK,PACKK,HWORDR,HWORDL);
62500 CHARWORD = PACKED ARRAY [1..5] OF CHAR;
62600 %ALFA = PACKED ARRAY [1..ALFALENG] OF CHAR;\
62700
62800 {An IDENTIFIER record is the permanent symbol table record for a
62900 simple identifier. It doesn't specify what kind of object the
63000 identifier is. (IDTYPE points to a STRUCTURE, which does that.)
63100 However it does have the address, in VADDR. The symbol table is
63200 a binary tree. LLINK and RLINK point to subtrees that are
63300 alphabetically less than or greater than this symbol. NEXT is
63400 used in constructing linked lists of identifiers, such as args
63500 to procedures, or fields in a record. SELFCTP is used for
63600 dumping out the symbol table into the object file for PASDDT.}
63700
63800 IDENTIFIER = PACKED RECORD
63900 NAME: ALFA;
64000 LLINK, RLINK: CTP;
64100 IDTYPE: STP; NEXT: CTP;
64200 SELFCTP: CTP; NOCODE: BOOLEAN;
64300 CASE KLASS: IDCLASS OF
64400 KONST: (VALUES: VALU);
64500 VARS: (VKIND: IDKIND; VLEV: LEVRANGE;
64600 CHANNEL: ACRANGE; VDUMMY: 0..31; VADDR: ADDRRANGE);
64700 FIELD: (PACKF: PACKKIND; FDUMMY: 0..7777B;
64800 FLDADDR: ADDRRANGE);
64900 %IF PACKF=PACKK THEN FLDADDR CONTAINS THE
65000 ABSOLUTE ADDRESS OF THE CORRESPONDING BYTEPOINTER
65100 -----> ENTERBODY\
65200 PROC,
65300 FUNC: (PFCHAIN: CTP; CASE PFDECKIND: DECLKIND OF
65400 STANDARD: (KEY: 1..44);
65500 DECLARED: (PFLEV: LEVRANGE; PFADDR: ADDRRANGE;
65600 CASE PFKIND: IDKIND OF
65700 ACTUAL: (FORWDECL: BOOLEAN; TESTFWDPTR: CTP;
65800 EXTERNDECL: BOOLEAN; LANGUAGE: SYMBOL;
65900 EXTERNALNAME: ALFA;
66000 LINKCHAIN: PACKED ARRAY[LEVRANGE] OF ADDRRANGE;
66100 (* 62 - clean of stack offsets *)
66200 POFFSET:ADDRRANGE)));
66300 (* 66 - non-local goto's *)
66400 LABELT: (SCOPE:LEVRANGE;NONLOCGOTO:BOOLEAN;
66500 GOTOCHAIN:ADDRRANGE;LABELADDRESS:ADDRRANGE)
66600 END;
66700
66800
66900 DISPRANGE = 0..DISPLIMIT;
67000 WHERE = (BLCK,CREC);
67100 (* 61 - new type to separate tops10 and tops20 ftns *)
67200 machine = (okname,t10name,t20name);
67300
67400 %RELOCATION\
67500 %**********\
67600
67700 RELBYTE = 0..3B %(NO,RIGHT,LEFT,BOTH)\;
67800
67900 RELWORD = PACKED ARRAY[0..17] OF RELBYTE;
68000
68100 %EXPRESSIONS\
68200 %***********\
68300
68400 ATTRKIND = (CST,VARBL,EXPR);
68500
68600 {An ATTR contains the current status of an object that is being used by
68700 the code generator. I.e. its lexical level, where it currently is
68800 (can be the permanent location, or an AC), etc. This differs from
68900 an identifier record both because it exists for things other than
69000 identifiers, e.g. constants and expressions, and because it is current
69100 state in code generation, rather than permanent symbol table value.
69200 The non-obvious fields are:
69300 DPLMT - displacement, i.e. address, possibly indexed by INDEXR,
69400 or modified by byte pointer fields, etc.
69500 EXTERNCTP - this is non-NIL only for if the expression represented
69600 is a reference to an external variable. External variables
69700 are the only case where we have to have a handle on the
69800 identifier record in the symbol table. We need this because
69900 the way externals are referred to involves changing the
70000 address for them in the symbol table every time they are
70100 refered to. Currently the only external variables allowed
70200 are files. You should be able to test EXTERNCTP <> NIL to
70300 see whether a file is external.}
70400
70500 ATTR = RECORD
70600 TYPTR: STP;
70700 CASE KIND: ATTRKIND OF
70800 CST: (CVAL: VALU);
70900 VARBL: (PACKFG: PACKKIND; INDEXR: ACRANGE; INDBIT: IBRANGE;
71000 VLEVEL: LEVRANGE; BPADDR,DPLMT: ADDRRANGE;
71100 (* 217 - add EXTERNCTP *)
71200 VRELBYTE: RELBYTE; SUBKIND: STP; EXTERNCTP: CTP);
71300 EXPR: (REG:ACRANGE)
71400 END;
71500
71600 TESTP = ^ TESTPOINTER;
71700 TESTPOINTER = PACKED RECORD
71800 ELT1,ELT2: STP;
71900 LASTTESTP: TESTP
72000 END;
72100
72200 (* 65 - remove exit labels *)
72300
72400 %TYPES FROM BODY \
72500 %****************\
72600
72700 (* 13 - ADD WRITEBLOCK FOR DDT SYMBOLS *)
72800 WRITEFORM = (WRITEENTRY,WRITENAME,WRITEHISEG,WRITEGLOBALS,WRITECODE,WRITEINTERNALS,
72900 (* 164 - add Polish fixups *)
73000 WRITEPOLISH,WRITELIBRARY,
73100 (* 173 - remove writefileblock *)
73200 WRITESYMBOLS,WRITEBLK,WRITESTART,WRITEEND);
73300
73400 UPDATEFORM = (C,D);
73500 ETP = ^ ERRORUPDATE;
73600 ERRORUPDATE = PACKED RECORD
73700 NUMBER: INTEGER;
73800 NEXT: ETP;
73900 CASE FORM: UPDATEFORM OF
74000 C: (STRING: ALFA);
74100 D: (INTVAL: INTEGER)
74200 END;
74300
74400 KSP = ^ KONSTREC;
74500 KONSTREC = PACKED RECORD
74600 (* 72 - two fixup chains for 2 word consts *)
74700 ADDR, ADDR1, KADDR: ADDRRANGE;
74800 CONSTPTR: CSP;
74900 NEXTKONST: KSP
75000 END;
75100 (* 164 - Polish fixups for CASE *)
75200 POLPT = ^ POLREC;
75300 {This record indicates a Polish fixup to be done at address WHERE in
75400 the code. The RH of WHERE is to get the BASE (assumed relocatable),
75500 adjusted by OFFSET (a constant). This is needed because the loader
75600 assumes that any address < 400000B is in the lowseg. So to get the
75700 virtual start of the CASE statement branch table we need to use
75800 this to adjust the physical start of the table by the first case
75900 index}
76000 POLREC = PACKED RECORD
76100 WHERE: ADDRRANGE;
76200 BASE: ADDRRANGE;
76300 OFFSET: INTEGER;
76400 NEXTPOL: POLPT
76500 END;
76600
76700 PDP10INSTR = PACKED RECORD
76800 INSTR : INSTRANGE ;
76900 AC : ACRANGE;
77000 INDBIT : IBRANGE;
77100 INXREG : ACRANGE;
77200 ADDRESS : ADDRRANGE
77300 END ;
77400
77500 HALFS = PACKED RECORD
77600 LEFTHALF: ADDRRANGE;
77700 RIGHTHALF: ADDRRANGE
77800 END;
77900
78000 PAGEELEM = PACKED RECORD
78100 WORD1: PDP10INSTR;
78200 LHALF: ADDRRANGE; RHALF: ADDRRANGE
78300 END;
78400 DEBENTRY = RECORD
78500 (* 36 - ALLOW MULTIPLE MODULES *)
78600 NEXTDEB: INTEGER; %WILL BE PTR TO NEXT ENTRY\
78700 LASTPAGEELEM: PAGEELEM;
78800 (* 103 - fix global id tree *)
78900 GLOBALIDTREE: CTP;
79000 STANDARDIDTREE: CTP;
79100 INTPOINT: STP;
79200 REALPOINT: STP;
79300 CHARPOINT: STP;
79400 MODNAME: ALFA;
79500 (* 155 - add source information *)
79600 SOURCE: PACKED ARRAY[1..167]OF CHAR;
79700 END;
79800
79900 (* 4 - add data structure for SCAN to return *)
80000 (* 11 - modify structure and add type for the REL file *)
80100 INTFILE = FILE OF INTEGER;
80200 RPGDATA = RECORD
80300 (* 7 - add /HEAP switch *)
80400 RELNAME:ALFA;
80500 (* 24 - allow user to set first loc of stack and heap *)
80600 STACKVAL:INTEGER;
80700 HEAPVAL:INTEGER;
80800 (* 33 - version no. *)
80900 VERVAL:INTEGER;
81000 (* 25 - add /ZERO *)
81100 (* 160 - add /ARITHCHECK *)
81200 ASW,ZSW,LSW,TSW,MSW,CSW,DSW,CRSW,RPGSW:BOOLEAN
81300 END;
81400 RPGPT = ^ RPGDATA;
81500 (* 33 - PROGRAM statement *)
81600 (* 61 - allow +* in tops20 *)
81700 PROGFILE = PACKED RECORD
81800 FILID:ALFA;
81900 NEXT:^PROGFILE;
82000 (* 64 - INPUT:/ *)
82100 wild,newgen,oldfile,interact,seeeol:Boolean
82200 END;
82300 (* 157 - See if we need INITTTY *)
82400 PROGFILEPT = ^ PROGFILE;
82500
82600 %------------------------------------------------------------------------------\
82700
82800
82900 VAR
83000 %RETURNED BY SOURCE PROGRAM SCANNER INSYMBOL:\
83100 %********************************************\
83200
83300 SY: SYMBOL; %LAST SYMBOL\
83400 OP: OPERATOR; %CLASSIFICATION OF LAST SYMBOL\
83500 VAL: VALU; %VALUE OF LAST CONSTANT\
83600 LGTH: INTEGER; %LENGTH OF LAST STRING CONSTANT\
83700 ID: ALFA; %LAST IDENTIFIER (POSSIBLY TRUNCATED)\
83800 CH: CHAR; %LAST CHARACTER\
83900
84000
84100 %COUNTERS:\
84200 %*********\
84300
84400 RTIME,
84500 I: INTEGER;
84600 SUPPORTIX: SUPPORTS;
84700 LANGUAGEIX: SYMBOL;
84800 CHCNT: 0..132; %CHARACTER COUNTER\
84900 (* 216 - variable high segment start *)
85000 HIGHSTART, %START OF HIGH SEGMENT\
85100 CODEEND, %FIRST LOCATION NOT USED FOR INSTRUCTIONS\
85200 LCMAIN,
85300 (* 5 - some new variables for CREF *)
85400 LC,IC,BEGLC,BEGIC: ADDRRANGE; %DATA LOCATION AND INSTRUCTION COUNTER\
85500 (* 176 - new vars for unterminated comment *)
85600 comment_page, comment_line: integer;
85700
85800 %SWITCHES:\
85900 %*********\
86000
86100 (* 25 - ADD /ZERO *)
86200 ZERO, %ON TO INITIALIZE LOCAL VAR'S\
86300 (* 4 - variable for COMPIL linkage *)
86400 RPGENTRY, %ON IF CALLED CALLED BY COMPIL\
86500 (* 5 - new variables for CREF *)
86600 CREF, %ON IF CREF LISTING BEING MADE\
86700 DP,BEGDP, %DECLARATION PART\
86800 RESETFLAG, %TO IGNORE SWITCHES WHICH MUST NOT BE RESET\
86900 PRTERR, %TO ALLOW FORWARD REFERENCES IN POINTER TYPE
87000 DECLARATION BY SUPPRESSING ERROR MESSAGE\
87100 MAIN, %IF FALSE COMPILER PRODUCES EXTERNAL PROCEDURE OR FUNCTION\
87200 doinitTTY, %TTYOPEN needed\
87300 TTYINUSE, %no longer used ?\
87400 TTYSEEEOL, %TTY:# in program state\
87500 DEBUG, %ENABLE DEBUGGING\
87600 DEBUGSWITCH, %INSERT DEBUGINFORMATION\
87700 LISTCODE, %LIST MACRO CODE\
87800 INITGLOBALS, %INITIALIZE GLOBAL VARIABLES\
87900 LOADNOPTR, %TRUE IF NO POINTERVARIABLE SHALL BE LOADED\
88000 (* 157 - separate control for arith overflow *)
88100 ARITHCHECK, %SWITCH FOR DETECTING ARITH ERRORS\
88200 RUNTMCHECK: BOOLEAN; %SWITCH FOR RUNTIME-TESTS\
88300 (* 24 - ALLOW USER TO SET FIRST LOC OF STACK AND HEAP *)
88400 STACK,HEAP: ADDRRANGE; %FIRST ADDR OF STACK AND HEAP\
88500 (* 12 - stackandheap no longer needed *)
88600 (* 33 - VERSION NO. *)
88700 version:packed record %version no. for output\
88800 case boolean of
88900 true:(word:integer);
89000 false:(who:0..7B;major:0..777B;minor:0..77B;edit:0..777777B)
89100 end;
89200
89300
89400 %POINTERS:\
89500 %*********\
89600
89700 LOCALPFPTR, EXTERNPFPTR: CTP; %PTRS TO LOCAL/EXTERNAL PROC/FUNC-CHAIN\
89800 (* 111 - STRING, POINTER *)
89900 (* 202 - POINTER by ref *)
90000 INTPTR,REALPTR,CHARPTR,ANYFILEPTR,STRINGPTR,POINTERPTR,POINTERREF,
90100 BOOLPTR,NILPTR,TEXTPTR: STP; %POINTERS TO ENTRIES OF STANDARD IDS\
90200 (* 135 - ill mem ref in PACK, UNPACK *)
90300 UARRTYP:STP;
90400 UTYPPTR,UCSTPTR,UVARPTR,
90500 UFLDPTR,UPRCPTR,UFCTPTR, %POINTERS TO ENTRIES FOR UNDECLARED IDS\
90600 (* 64 - non-loc goto *)
90700 ulblptr,
90800 FWPTR: CTP; %HEAD OF CHAIN OF FORW DECL TYPE IDS\
90900 ERRMPTR,ERRMPTR1: ETP; %TO CHAIN ERROR-UPDATES\
91000 (* 65 - remove exit labels *)
91100 LASTBTP: BTP; %HEAD OF BYTEPOINTERTABLE\
91200 SFILEPTR,
91300 FILEPTR: FTP;
91400 FIRSTKONST: KSP;
91500 (* 164 - Polish fixups for CASE *)
91600 FIRSTPOL: POLPT;
91700 ALFAPTR, DATEPTR: STP;
91800 FGLOBPTR,CGLOBPTR : GTP ; %POINTER TO FIRST AND CURRENT GLOBAL INITIALISATION RECORD\
91900 GLOBTESTP : TESTP ; %POINTER TO LAST PAIR OF POINTERTYPES\
92000 (* 4 - Here is the main structure for the SCAN linkage *)
92100 SCANDATA : RPGPT ; %DATA FROM SCAN OF FILE NAMES\
92200 (* 33 - PROGRAM STATEMENT *)
92300 NPROGFILE, %NEW FILE NAME\
92400 LPROGFILE, %LAST FILE NAME IN LIST\
92500 FPROGFILE:PROGFILEPT; %FIRST FILE NAME IN LIST\
92600 (* 64 - non-loc goto *)
92700 lastlabel:ctp;
92800 (* 171 - treat file names as special *)
92900 infile,outfile,ttyfile,ttyoutfile:ctp; {Pointers to ID's for
93000 INPUT, OUTPUT, TTY, TTYOUT}
93100
93200 %BOOKKEEPING OF DECLARATION LEVELS:\
93300 %**********************************\
93400
93500 (* 5 - new variable for CREF *)
93600 LEVEL,BEGLEVEL: LEVRANGE; %CURRENT STATIC LEVEL\
93700 DISX, %LEVEL OF LAST ID SEARCHED BY SEARCHID\
93800 TOP: DISPRANGE; %TOP OF DISPLAY\
93900
94000 DISPLAY: %WHERE: MEANS:\
94100 ARRAY[DISPRANGE] OF
94200 PACKED RECORD
94300 %=BLCK: ID IS VARIABLE ID\
94400 (* 5 - new variable for CREF *)
94500 BLKNAME: ALFA; %NAME OF BLOCK\
94600 FNAME: CTP; %=CREC: ID IS FIELD ID IN RECORD WITH\
94700 CASE OCCUR: WHERE OF % CONSTANT ADDRESS\
94800 CREC: (CLEV: LEVRANGE; %=VREC: ID IS FIELD ID IN RECORD WITH\
94900 CINDR: ACRANGE; % VARIABLE ADDRESS\
95000 CINDB: IBRANGE;
95100 CRELBYTE: RELBYTE;
95200 CDSPL,
95300 CLC : ADDRRANGE)
95400 END;
95500
95600