Trailing-Edge
-
PDP-10 Archives
-
ap-c800d-sb
-
tables.mac
There are 21 other files named tables.mac in the archive. Click here to see a list.
; UPD ID= 1744 on 3/6/79 at 4:20 PM by N:<NIXON>
UNIVERSAL TABLES FOR COBOL AND LIBOL
SUBTTL TABLE DEFINITIONS /ACK
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1974, 1979 BY DIGITAL EQUIPMENT CORPORATION
;EDITS
;NAME DATE COMMENTS
;DMN 6-MAR-79 [651] ADD SYMBOL RW.RST WHICH IS BOTH RW.RSF AND RW.RSI
;V10***************
;ACK 12-APR-75 CREATION
;******************
COMMENT \
THIS FILE CONTAINS THE DEFINITIONS OF THE FIELDS OF THE TABLES
USED BY THE COBOL COMPILER AND OTHER PARTS OF THE COBOL SYSTEM. EACH
TABLE IS DEFINED AS ONE OR MORE MACROS AND EACH FIELD IN THE TABLE IS
DEFINED AS A MACRO CALL. ALSO DEFINED IN THIS FILE IS A MACRO, LODSTR,
WHICH WILL DEFINE TWO MACROS, LOAD AND STORE, WHICH WHEN CALLED WILL
GENERATE AN INSTRUCTION TO LOAD AN AC WITH THE CONTENTS OF SOME FIELD
OF A TBALE OR STORE THE CONTENTS OF AN AC INTO SOME FIELD OF A TABLE.
TABLE MACROS:
THE FIRST TWO CHARACTERS OF THE MACRO NAME IDENTIFY THE TABLE.
EG. FI IS THE FILE TABLE, DA IS DATAB, ETC. THE THIRD THROUGH FIFTH
CHARACTERS ARE EITHER "TB." OR "TB%". THE SIXTH CHARACTER IDENTIFIES
WHERE THE TABLE OCCURS.
TABLE MACRO NAMES WHOSE THIRD THROUGH FIFTH CHARACTERS ARE
"TB%" XLIST THE TABLE AND THOSE WHOSE THIRD THROUGH FIFTH CHARACTERS
ARE "TB." DO NOT. TABLE MACRO NAMES WHOSE SIXTH CHARACTER IS "A", "B"
OR "C" ARE COMPILER TABLES, THOSE WHOSE SIXTH CHARACTER IS "R" ARE
TABLES IN THE REL FILE AND THOSE WHOSE SIXTH CHARACTER IS "O" ARE
OBJECT TIME TABLES. EG. FITB.C DESCRIBES THE FILE TABLE DURING
COMPILATION, FITB.R DESCRIBES THE FILE TABLE IN THE REL FILE AND FITB.O
DESCRIBES THE OBJECT TIME FILE TABLE.
EACH TABLE CONSISTS OF A SERIES OF MACRO CALLS TO MACROS WHICH
ARE ALSO DEFINED IN THIS MODULE. THESE MAY BE REDEFINED IN THE MODULES
WHICH USE THIS MODULE IF NECESSARY.
THE MACROS USED IN THE TABLE MACROS ARE DESCRIBED BELOW:
I. D.PNTR <TABLE NAME>,<TABLE ID>
WHERE <TABLE NAME> IS A TABLE NAME (FOR DOCUMENTATION ONLY) AND
<TABLE ID> IS A TWO CHARACTER TABLE ID.
THIS MACRO IS USED TO DEFINE THE FOLLOWING THREE MACROS:
II. <TABLE ID>.ITM <FIELD ID>,<WORD NO>,<FIRST BIT>,<LAST BIT>
WHERE <FIELD ID> IS A THREE CHARACTER FIELD NAME, <WORD NO> IS
THE WORD IN WHICH THE FIELD OCCURS (1 ORIGN INDEXING IN DECIMAL),
<FIRST BIT> IS THE FIRST BIT OF THE FIELD (DECIMAL) AND <LAST BIT>
IS THE LAST BIT OF THE FIELD (DECIMAL).
THIS MACRO WILL GENERATE A BYTE POINTER, INDEXED BY TA, AT
(GLOBAL) LOCATION <TABLE ID>.<FIELD ID>.
III. <TABLE ID>.FLG <FIELD ID>,<WORD NO>,<BIT NO>
WHERE <BIT NO> IS THE BIT IN WHICH THE FLAG OCCURS.
THIS MACRO WILL GENERATE A BYTE POINTER, INDEXED BY TA, AT
(GLOBAL) LOACTION <TABLE ID>.<FIELD ID>.
IV. <TABLE ID>.SME <FIELD 1>,<FIELD 2>
WHERE <FIELD 1> AND <FIELD 2> ARE FIELD OR FLAG NAMES.
THIS MACRO EQUATES <FIELD 2> TO <FIELD 1>.
NOTES:
1. <FIELD 1> MUST BE DEFINED BEFORE BEING USED IN THE
MACRO <TABLE ID>.SME.
2. IF YOU CHANGE A FIELD MAKE SURE IT IS NOT USED AS
<FIELD 2> IN THE MACRO <TABLE ID>.SME, OTHEWISE
YOU MAY BE CHANGING SOME OTHER FIELD ALSO.
EXAMPLES:
1. D.PNTR FILTAB,FI;
DEFINES THE MACROS:
FI.ITM ARG1,ARG2,ARG3,ARG4
FI.FLG ARG1,ARG2,ARG3
FI.SME ARG1,ARG2
2. FI.ITM BLF,18,6,17;
GENERATES:
FI.BLF:: POINT 12,17(TA),17
3. FI.FLG ENT,16,8
GENERATES:
FI.ENT:: POINT 1,15(TA),8
4. FI.SME SPT,RTC;
GENERATES:
FI.SPT==:FI.RTC
THE MACROS LODSTR, LOAD AND STORE ARE DESCRIBED BELOW.
I. LODSTR ARG1
WHERE ARG1 IS THE DEFAULT AC WHICH CONTAINS THE ADDRESS OF
THE TABLE ENTRY.
THIS MACRO GENERATES THE LOAD AND STORE MACROS.
II. LOAD AC,<FIELD>,IR;
WHERE AC IS AN ACCUMULATOR, <FIELD> IS A FIELD WHOSE NAME IS
<TABLE ID>%<FIELD ID>, AND IR IS THE AC (NOT ZERO) CONTAINING
THE ADDRESS OF THE TABLE ENTRY.
THIS MACRO WILL GENERATE AN INSTRUCTION TO LOAD AC WITH THE
CONTENTS OF <FIELD>.
III. STORE AC,<FIELD>,IR;
THIS MACRO WILL GENERATE AN INSTRUCTION TO STORE THE CONTENTS
OF AC INTO <FIELD>.
NOTES:
1. IF IR IS OMITTED FROM A LOAD OR STORE CALL THE ARG1 AS
SPECIFIED IN THE CALL TO LODSTR IS USED.
EXAMPLES:
LODSTR TA;
DEFINE THE LOAD AND STORE MACROS.
LOAD TC,DA%BRO;
GENERATE CODE TO LOAD TC WITTH THE BROTHER LINK FROM THE DATAB
ENTRY WHICH STARTS AT THE LOCATION IN TA.
STORE TC,DA%SON,TB;
GENERATE CODE TO STORE TC INTO THE SON LINK FIELD OF THE DATAB
ENTRY WHOSE ADDRESS IS IN TB.
RANDOM NOTES:
THIS MODULE DEFINES, FOR EVERY TABLE DEFINED IN TI, SYMBOLS
OF THE FORM <TABLE ID>%<FIELD ID> WHERE <TABLE ID> IS A TWO CHARACTER
TABLE ID AND <FIELD ID> IS A THREE CHARACTER FIELD ID. THEREFORE, DO
NOT DEFINE SYMBOLS WHOSE THIRD CHARACTER IS %.
WHEN ADDING A TABLE TO THIS MODULE DEFINE IT AS A MACRO WHOSE
NAME IS OF THE FORM ??TB.? AND INCLUDE IT IN THE PARAMETER LIST TO
THE MACRO GEN AND A CALL OF THE FORM <??TB,?> TO TH PARAMETER LIST TO
THE MACRO NOLIST.
\
SUBTTL FILTAB
;COMPILER'S FILTAB DEFINITIONS
DEFINE FITB.C <
RADIX 10
D.PNTR FILTAB,FI
FI.ITM NAM,1,3,17;; ;NAMTAB LINK
FI.FLG MLT,2,0;; ;MULTIPLE UNIT/REEL
FI.ITM RCT,2,2,17;; ;RE-RUN COUNT
FI.ITM OFT,2,18,35;; ;OBJECT-TIME FILE TABLE LOCATION
FI.ITM FBS,3,0,15;; ;FILE BUFFER SIZE
FI.ITM LN,3,16,28;; ;LINE NO. OF SELECT CLAUSE
FI.ITM LNC,3,16,35;; ;LN, CP COMBINED
FI.ITM CP,3,29,35;; ;CHARACTER POSITION
FI.ITM LRS,4,0,11;; ;NON-STANDARD LABEL SIZE
FI.ITM NDV,4,12,17;; ;NUMBER OF DEVICES
FI.ITM VAL,4,18,35;; ;LINK TO VALTAB DEVICE ENTRY
FI.ITM NFL,5,0,4;; ;NUMBER OF FILE-LIMITS [ANS68]
FI.ITM FAM,5,3,4;; ;[74] FILE ACCESS MODE
FI.ITM ERM,5,5,7;; ;EXTERNAL RECORDING MODE
FI.ITM IRM,5,8,10;; ;INTERNAL RECORDING MODE
FI.ITM POS,5,12,17;; ;POSITION ON MULTIPLE-FILE TAPE
FI.ITM NXT,5,18,35;; ;LINK TO NEXT FILTAB ENTRY
FI.ITM LBL,6,2,3;; ;TYPE OF LABELS
FI.FLG INO,6,4;; ;INPUT OPENS IN PD
FI.FLG OUO,6,5;; ;OUTPUT OPENS IN PD
FI.FLG IOO,6,6;; ;I-O OPENS IN PD
FI.FLG ADV,6,7;; ;WRITE ADVANCING FLAG
FI.FLG DSD,6,8;; ;DEFINED IN SD
FI.FLG VLR,6,9;; ;VARIABLE LENGTH RECORDS
FI.FLG RER,6,10;; ;RE-RUN ON END OF REEL
FI.FLG RRC,6,11;; ;RE-RUN ON COUNT
FI.FLG FDD,6,12;; ;FD DEFINED
FI.FLG OPT,6,13;; ;FILE IS OPTIONAL
FI.FLG RMS,6,15;; ;USE RMS
FI.FLG PSN,6,14;; ;WRITE POSITIONING FLAG
FI.ITM ACC,6,16,17;; ;ACCESS MODE [ANS68]
FI.ITM ORG,6,16,17;; ;ORGANIZATION [ANS74]
FI.ITM ACK,6,18,35;; ;ACTUAL KEY LINK
FI.ITM NBF,7,0,5;; ;NUMBER OF BUFFERS
FI.ITM MRS,7,6,17;; ;MAX. DATA REC. SIZE
FI.ITM DRL,7,18,35;; ;DATA RECORD LINK
FI.ITM SDL,8,18,35;; ;SAME DEVICE LINK
FI.ITM VID,9,0,17;; ;VALUE-OF-ID LINK
FI.ITM VDW,9,18,35;; ;VALUE-OF-DW LINK
FI.ITM SAL,10,0,17;; ;SAME AREA LINK
FI.SME SBA,SAL;; ;SAME BUFFER AREA LINK
FI.ITM ERR,10,18,35;; ;ERROR USE
;;[68] THESE DEFINITIONS FOR COBOL-68
FI.ITM BBR,11,0,17;; ;BEFORE BEGIN. REEL
FI.ITM BBF,11,18,35;; ;BEFORE BEGIN. FILE
FI.ITM ABR,12,0,17;; ;AFTER BEGIN. REEL
FI.ITM ABF,12,18,35;; ;AFTER BEGIN. FILE
FI.ITM BER,13,0,17;; ;BEFORE END REEL
FI.ITM BEF,13,18,35;; ;BEFORE END FILE
FI.ITM AER,14,0,17;; ;AFTER END REEL
FI.ITM AEF,14,18,35;; ;AFTER END FILE
;;[74] THESE DEFINITIONS FOR COBOL-74
FI.ITM LCP,11,18,35;; ;LINAGE-COUNTER POINTER
FI.ITM LPP,12,0,17;; ;LINES PER PAGE
FI.ITM WFA,12,18,35;; ;WITH FOOTING AT
FI.ITM LAT,13,0,17;; ;LINES AT TOP
FI.ITM LAB,13,18,35;; ;LINES AT BOTTOM
FI.ITM LCI,14,18,35;; ;LINAGE-COUNTER INITIALIZATION ROUTINE
FI.ITM SRA,15,0,17;; ;SAME RECORD AREA
FI.ITM LRL,15,18,35;; ;LABEL RECORD LINK
FI.FLG DRC,16,0;; ;DATA RECORDS CLAUSE PRESENT
FI.FLG ADR,16,1;; ;RECORD AREA ADDRESS SET
FI.FLG RM2,16,2;; ;RECORDING MODE DECLARATION
FI.ITM RD,16,3,5;; ;RECORDING DENSITY
FI.ITM RP,16,6,7;; ;RECORDING PARITY
FI.FLG ENT,16,8;; ;ERROR PROCEDURE ON FILE OPEN
FI.FLG DFR,16,9;; ;DEFERRED OUTPUT ISAM
FI.FLG BM,16,10;; ;BYTE MODE (MTA ONLY)
FI.FLG CKP,16,11;; ;CHECKPOINT ISAM FILE
FI.ITM LOC,16,18,35;; ;LOCATION OF RECORD AREA
FI.ITM SKY,17,0,17;; ;SYMBOLIC KEY
FI.ITM RKY,17,18,35;; ;RECORD KEY
FI.ITM BLF,18,6,17;; ;BLOCKING FACTOR
FI.ITM VPP,19,0,17;; ;VALUE OF PROJ-PROG
FI.ITM RPG,19,18,35;; ;RPGTAB LINK
FI.ITM OWA,20,0,8;; ;OWNER ACCESS BITS.
FI.ITM OTA,20,9,17;; ;OTHER ACCESS BITS.
FI.ITM RTC,20,18,35;; ;COUNT OF RECORDS RETAINED.
FI.SME SPT,RTC;; ;ILDB TYPE POINTER TO FILE STATUS ENTRIES.
FI.ITM PFS,21,0,17;; ;FILE STATUS LINK
FI.ITM PEN,21,18,35;; ;ERROR NUMBER LINK.
FI.ITM PAC,22,0,17;; ;ACTION CODE LINK.
FI.ITM PIV,22,18,35;; ;VALUE OF ID LINK.
FI.ITM PBN,23,0,17;; ;BLOCK NUMBER LINK.
FI.ITM PRN,23,18,35;; ;RECORD NUMBER LINK.
FI.ITM PFN,24,0,17;; ;FILE NAME LINK.
FI.ITM PFT,24,18,35;; ;FILE TABLE LINK.
FI.ITM CKB,25,0,17;; ;CONVERT RELATIVE KEY BEFORE
FI.ITM CKA,25,18,35;; ;CONVERT RELATIVE KEY AFTER
RADIX 8
> ;END OF DEFINE FITB.C
SUBTTL DATAB
;COMPILER'S DATAB DEFINITIONS
DEFINE DATB.C <
RADIX 10
D.PNTR DATTAB,DA
DA.ITM NAM,1,3,17;; ;NAMTAB LINK
DA.ITM SNL,1,18,35;; ;ITEM WITH SAME NAME
DA.ITM VAL,2,0,17;; ;VALUE LINK
DA.SME ARG,VAL;; ;ADDRESS OF LINKAGE PTR
DA.ITM LOC,2,18,35;; ;RUN-TIME LOCATION
DA.ITM POP,3,0,17;; ;LINK TO FATHER
DA.SME BRO,POP;; ;LINK TO BROTHER
DA.ITM SON,3,18,35;; ;LINK TO SON
DA.ITM LVL,4,0,5;; ;LEVEL
DA.ITM RES,4,6,11;; ;BYTE RESIDUE
DA.FLG LPC,4,12;; ;ITEM IS LINE-COUNTER OR PAGE-COUNTER
DA.FLG RBE,4,13;; ;ITEM IS REFERENCED BY AN ENTRY OR PD USING
DA.ITM USG,4,14,17;; ;USAGE
DA.ITM RPW,4,18,35;; ;LINK TO RPWTAB
DA.ITM CLA,5,0,1;; ;CLASS
DA.FLG SYL,5,2;; ;SYNC LEFT
DA.FLG SYR,5,3;; ;SYNC RIGHT
DA.FLG SGN,5,4;; ;SIGNED
DA.FLG BWZ,5,5;; ;BLANK WHEN ZERO
DA.FLG SUB,5,6;; ;SUBSCRIPTED
DA.FLG EDT,5,7;; ;EDITED
DA.FLG FAL,5,8;; ;FATHER/BROTHER LINK
DA.FLG DEF,5,9;; ;DEFINED
DA.FLG RBS,5,10;; ;REFERENCED BY 'SUM'
DA.FLG FAK,5,11;; ;ITEM HAS A FAKE NAME
DA.FLG RDS,5,12;; ;REFERENCED BY 'SOURCE' IN DETAIL
DA.FLG SCT,5,13;; ;ITEM IS A SUM COUNTER
DA.FLG JST,5,14;; ;JUSTIFIED
DA.FLG SSC,5,15;; ;SEPARATE SIGN CHARACTER
DA.FLG LSC,5,16;; ;LEADING SIGN CHARACTER
DA.ITM SCF,5,15,16;; ;SIGN CHARACTER FLAGS
DA.FLG DLL,5,17;; ;DEPENDING AT LOWER LEVEL
DA.FLG ERR,5,18;; ;DD ERROR
DA.FLG IDX,5,19;; ;INDEX
DA.FLG RDF,5,20;; ;REDEFINES
DA.FLG PIC,5,21;; ;PICTURE SEEN
DA.FLG DFS,5,22;; ;DEFINED IN FILE SECTION
DA.FLG DRC,5,23;; ;APPEARS IN DATA RECORDS CLAUSE
DA.FLG LRC,5,24;; ;APPEARS IN LABEL RECORDS CLAUSE
DA.FLG SLL,5,25;; ;SYNC CLAUSE AT LOWER LEVEL
DA.FLG PWA,5,26;; ;PICTURE WORDS ALLOCATED
DA.FLG VHL,5,27;; ;VALUE AT HIGHER LEVEL
DA.FLG RDH,5,28;; ;REDEFINES AT HIGHER LEVEL
DA.FLG LKS,5,29;; ;LINKAGE SECTION
DA.FLG DPR,5,30;; ;DECIMAL POINT TO RIGHT OF ITEM
DA.ITM NDP,5,31,35;; ;NUMBER OF DECIMAL PLACES
DA.ITM EXS,6,0,17;; ;EXTERNAL SIZE
DA.ITM INS,6,18,35;; ;INTERNAL SIZE
DA.ITM NOC,7,0,14;; ;NO. OF OCCURENCES OF THIS ITEM
DA.FLG OCC,7,15;; ;OCCURS CLAUSE FOR THIS ITEM
DA.ITM LN,7,16,28;; ;LINE NUMBER
DA.ITM LNC,7,16,35;; ;LN, CP
DA.ITM CP,7,29,35;; ;CHARACTER POSITION
DA.ITM OCH,8,0,17;; ;HIGHER LEVEL OCCURS
DA.ITM DEP,8,18,35;; ;LINK TO DEPENDING ITEM
DA.ITM DCR,9,0,8;; ;DEPENDING CONVERSION ROUTINE
DA.ITM KEY,9,9,17;; ;NUMBER OF KEYS FOR OCCURS
DA.ITM XBY,9,18,35;; ;FIRST 'INDEXED BY' ITEM
DA.ITM FSC,10,6,11;; ;FLOAT OR SUPPRESSION CHAR.
RADIX 8
> ;END OF DEFINE DATB.C
SUBTTL EXTAB
;COMPILER'S EXTAB DEFINITIONS
DEFINE EXTB.C <
RADIX 10
D.PNTR EXTTAB,EX
EX.ITM NAM,1,3,17;; ;NAMTAB LINK
EX.FLG NRS,2,0;; ;USED BY NON-RESIDENT SEGMENT
EX.FLG IND,2,1;; ;REFERENCE NEEDS INDIRECT (@) BIT
EX.FLG PID,2,2;; ;PROGRAM-ID ENTRY
EX.FLG ENT,2,3;; ;ENTRY ENTRY
EX.FLG CAL,2,4;; ;REFERENCED BY A CALL
EX.ITM CNT,2,15,17;; ;COUNT OF EXTRA WORDS ALLOCATED
EX.ITM HLD,2,18,35;; ;MISC USES (INCL HLDTAB LNK FOR CANCEL)
RADIX 8
> ;END OF DEFINE EXTB.C
SUBTTL LITAB AND CONTAB
;COMPILER'S LITAB DEFINITIONS
DEFINE LITB.C <
RADIX 10
D.PNTR LITTAB,LI
LI.FLG PUR,1,6;; ;PURE ASCII CHARACTERS
LI.FLG ALL,1,7;; ;ALL
LI.FLG NLT,1,8;; ;NUMERIC LITERAL
LI.FLG FGC,1,9;; ;FIGURATIVE CONSTANT
LI.FLG INT,1,10;; ;DECIMAL POINT
LI.ITM NCH,1,11,17;; ;NUMBER OF CHARACTERS
LI.ITM FCC,1,18,35;; ;FIGURATIVE CONSTANT CODE
RADIX 8
> ;END OF DEFINE LITB.C
;COMPILER'S CONTAB DEFINITIONS
DEFINE COTB.C <
RADIX 10
D.PNTR CONTAB,CO
CO.ITM NAM,1,3,17;; ;NAMTAB POINTER
CO.ITM DAT,2,0,17;; ;DATTAB LINK
CO.ITM NVL,2,18,35;; ;NUMBER OF VALUES
RADIX 8
> ;END OF DEFINE COTB.C
SUBTTL HLDTAB AND USETAB
;COMPILER'S HLDTAB DEFINITIONS
DEFINE HLTB.C <
RADIX 10
D.PNTR HLDTAB,HL
HL.ITM NAM,1,1,15;; ;NAMTAB LINK
HL.ITM LNC,1,16,35;; ;LN&CP
HL.ITM LN,1,16,28;; ;LINE NUMBER
HL.ITM CP,1,29,35;; ;CHARACTER POSITION
HL.ITM RD,1,1,17 ; [415] RD LINK FOR TYPE 14
HL.ITM CID,1,18,35 ; [415] CID LEVEL FOR TYPE 14
HL.ITM COD,2,0,8;; ;CODE
HL.ITM QAL,2,9,17;; ;NUMBER OF QUALIFIERS
HL.ITM LNK,2,18,35;; ;LINK TO A TABLE
HL.ITM FCD,2,0,8; ;FULL CODE
RADIX 8
> ;END OF DEFINE HLTB.C
;COMPILER'S USETAB DEFINITIONS
DEFINE USTB.C <
RADIX 10
D.PNTR USETAB,US
US.ITM TYP,1,3,11;; ;ENTRY TYPE
US.FLG XTR,1,17;; ;EXTRA WORDS FOLLOW
US.ITM PRO,1,18,35;; ;PROTAB LINK TO ASSOCIATED SECTION
US.ITM CNT,2,6,17;; ;COUNT OF EXTRA WORDS
RADIX 8
> ;END OF DEFINE USTB.C
SUBTTL FLOTAB
;COMPILER'S FLOTAB DEFINITIONS
DEFINE FLTB.C <
RADIX 10
D.PNTR FLOTAB,FL
FL.FLG PND,1,0;; ;PROCEDURE-NAME DEFINITION
FL.FLG SPF,1,1;; ;SUBJECT OF PERFORM
FL.FLG OPF,1,2;; ;OBJECT OF PERFORM
FL.FLG SAL,1,3;; ;SUBJECT OF ALTER
FL.FLG OAL,1,4;; ;OBJECT OF ALTER
FL.FLG OGO,1,5;; ;OBJECT OF GO
FL.FLG OEN,1,6;; ;OBJECT OF ENTER
FL.FLG QUA,1,16;; ;QUALIFIED ENTRY
FL.FLG RDC,1,17;; ;REFERENCED IN DECLARATIVES
FL.ITM PRO,1,18,35;; ;PROTAB LINK
FL.ITM NAM,2,1,15;; ;NAMTAB POINTER
FL.ITM NLC,2,1,35;; ;NAMTAB POINTER, LN, CP
FL.ITM LN,2,16,28;; ;LINE NUMBER
FL.ITM LNC,2,16,35;; ;LN, CP
FL.ITM CP,2,29,35;; ;CHARACTER POSITION
FL.SME POS,CP;; ;CHARACTER POSITION
RADIX 8
> ;END OF DEFINE FLTB.C
SUBTTL PROTAB AND CDTAB
;COMPILER'S PROTAB DEFINITIONS
DEFINE PRTB.C <
RADIX 10
D.PNTR PROTAB,PR
PR.ITM LSC,2,0,17;; ;LINK TO SECTION
PR.ITM GNW,2,0,17;; ;GENWRD FOR NEXT SECTION
PR.ITM PRF,2,18,35;; ;ADDRESS OF USE PERFORM
PR.SME AFI,PRF;; ;ADDRESS OF FIRST INSTRUCTION
PR.ITM AOB,3,0,17;; ;AOBTAB LINK
PR.ITM PRI,3,18,24;; ;PRIORITY
PR.FLG SEC,3,25;; ;SECTION/PARAGRAPH
PR.FLG EXR,3,26;; ;EXIT REQUIRED
PR.FLG DEF,3,27;; ;ITEM DEFINED
PR.FLG ALT,3,28;; ;ALTERABLE
PR.FLG ARS,3,29;; ;ALTER TO SAME OR RESIDENT SEG
PR.FLG ANR,3,30;; ;ALTER TO NON-RESIDENT SEG
PR.FLG RFD,3,31;; ;REFERENCED IN DECLARATIVES
PR.FLG DFD,3,32;; ;DEFINED IN DECLARATIVES
PR.FLG MDF,3,33;; ;MULTIPLY DEFINED PROCEDURE
PR.FLG TUT,3,34;; ;TERMINATED WITH UNCONDITIONAL TRANSFER
PR.ITM XTW,4,0,17;; ;EXIT WORD ADDRESS
PR.ITM FLO,4,18,35;; ;FLOTAB LINK
PR.ITM SFI,5,18,35;; ;SYMBOLIC FIRST ADDRESS (NOT SAME AS AFI)
RADIX 8
> ;END OF DEFINE PRTB.C
;COMPILER'S CDTAB DEFINITIONS
DEFINE CDTB.C <
RADIX 10
D.PNTR CDTAB,CD
CD.ITM NAM,1,3,17
CD.FLG OUT,2,0
CD.ITM INT,2,0,1
CD.ITM LIN,2,16,28
CD.ITM DC,6,0,17;; ;DESTINATION COUNT
RADIX 8
> ;END OF DEFINE CDTB.C
SUBTTL RPWTAB
;COMPILER'S RPWTAB DEFINITIONS
;THIS PART IS USED IN PHASES A THROUGH E.
DEFINE RWTB.A <
RADIX 10
D.PNTR RPWTAB,RW
;;THE FOLLOWING PERTAIN TO 'RD' ENTRIES
RW.ITM NAM,1,3,17; NAMTAB LINK
RADIX 8
> ;END OF DEFINE RWTB.A
;THIS PART IS USED IN PHASES C THROUGH E.
DEFINE RWTB.B <
RADIX 10
D.PNTR RPWTAB,RW
RW.ITM SAM,1,18,35;; ;SAME-NAME LINK
RW.ITM BRO,2,0,15;; ;BROTHER LINK
RW.ITM LN,2,16,28;; ;LINE NUMBER
RW.ITM CP,2,29,35;; ;CHAR POSITION
RW.ITM LNC,2,16,35;; ;LN,CP
RW.ITM FIL,3,0,17;; ;FILTAB LINK
RW.ITM FGP,3,18,35;; ;FIRST GROUP
RW.ITM LC,4,0,17;; ;LINE-COUNTER
RW.ITM PC,4,18,35;; ;PAGE-COUNTER
RW.ITM PHL,5,0,8;; ;HEADING LINE
RW.ITM CFL,5,9,17;; ;FOOTING LINE
RW.ITM FDE,5,18,26;; ;FIRST DETAIL
RW.ITM LDE,5,27,35;; ;LAST DETAIL
RW.ITM PAG,6,0,8;; ;PAGE LIMIT
RW.ITM RWT,6,18,35;; ;OBJECT RPWTAB ENTRY
RW.ITM RHR,7,0,17;; ;TAG OF RH ROUTINE
RW.ITM RFR,7,18,35;; ;TAG OF RF ROUTINE
RW.ITM PHR,8,0,17;; ;TAG OF PH ROUTINE
RW.ITM PFR,8,18,35;; ;TAG OF PF ROUTINE
RW.ITM GIR,9,0,17;; ;TAG OF GROUP-INDICATE ROUTINE
RW.ITM COD,9,18,35;; ;MNEMONIC LINK OF CODE
RW.ITM CID,10,0,17;; ;LINK TO FIRST CONTROL ID
RW.ITM NCI,10,18,35;; ;NUMBER OF CONTROL ID'S
RW.ITM BKT,11,0,17;; ;TAG OF 'BREAK TEST' ROUTINE
RW.ITM FBT,11,18,35;; ;TAG OF 'FINAL BREAK' ROUTINE
;;THE FOLLOWING ARE FOR THE GROUP ITEMS IN RPWTAB.
RW.ITM RDL,1,3,17;; ;LINK TO RD
RW.SME DAT,SAM;; ;LINK TO DATAB
RW.ITM LCD,2,0,1;; ;LINE CODE
RW.ITM NLC,2,2,3;; ;NEXT LINE CODE
RW.ITM SCD,2,4,5;; ;SOURCE CODE
RW.ITM TYP,2,6,8;; ;TYPE CODE
RW.ITM NSI,2,18,35;; ;NUMBER OF SUM ID'S
RW.ITM LIN,3,0,8;; ;LINE NUMBER
RW.ITM COL,3,9,17;; ;COLUMN NUMBER
RW.ITM NXT,3,18,26;; ;NEXT LINE NUMBER
RW.SME RES,LC;; ;DATAB LINK TO 'RESET'
RW.SME SLK,PC;; ;SOURCE, SUM OR VALUE LINK
RW.ITM UPN,5,0,17;; ;'UPON' LINK
RW.ITM USE,5,18,35;; ;'USE' PROCEDURE
;;RPWTAB CONTROL ENTRY POINTERS
RW.ITM DCI,1,0,17;; ;DATAB LINK FOR CONTROL
RW.SME SAV,SAM;; ;%PARAM AREA FOR SAVING VALUE
RW.ITM CHG,2,0,17;; ;LINK TO CH GROUP
RW.FLG RSF,2,9;; ;RESET ON FINAL
RW.FLG RSI,2,10;; ;RESET ON IDENTIFIER
RW.ITM RST,2,9,10;; ;[651] BOTH RESET FLAGS
RW.FLG GPI,2,11;; ;GROUP INDICATE
RW.FLG GEN,2,12;; ;GENERATE EXISTS FOR THIS GROUP
RW.FLG FNC,2,13;; ;FINAL CONTROL
RW.FLG RSU,2,16;; ;REFERENCED BY 'SUM UPON'
RW.SME CFG,NSI;; ;LINK TO CF GROUP
RW.SME REE,FIL;; ;TAG OF RESET ROUTINE
RADIX 8
> ;END OF DEFINE RWTB.B
;USE THIS TO DEFINE THE WHOLE TABLE.
DEFINE RWTB.C <
RWTB.A
RWTB.B
> ;END OF DEFINE RWTB.C
SUBTTL DEFINE THE SYMBOLS
;CALL THE MACROS ONCE SO THAT WE GET THE SYMBOLS IN THE CREF LISTING.
DEFINE D.PNTR (TBLNAM,TBLID),<
XLIST
DEFINE TBLID'.ITM (ITMID,WRDNO,LFTBIT,RTBIT)< TBLID'%'ITMID==<POINT RTBIT-LFTBIT+1,WRDNO-1,RTBIT>>
DEFINE TBLID'.FLG (ITMID,WRDNO,BITNO)< TBLID'%'ITMID==<POINT 1,WRDNO-1,BITNO>>
DEFINE TBLID'.SME (ITM1,ITM2)< TBLID'%'ITM1==TBLID'%'ITM2>
LIST
>
DEFINE GEN (TABLE)<
IRP TABLE,<
PAGE
SUBTTL TABLE
TABLE
> ;END OF IRP TABLE
> ;END OF DEFINE GEN.
LALL
GEN <FITB.C,DATB.C,EXTB.C,LITB.C,COTB.C,HLTB.C,USTB.C,
FLTB.C,PRTB.C,CDTB.C,RWTB.C>
PURGE GEN
XALL
SUBTTL PREVENT LISTING ELSEWHERE.
DEFINE NOLIST (TABLE)<
IRP TABLE,<NLIST0 TABLE>
> ;END OF DEFINE NOLIST.
DEFINE NLIST0 (A)<NLIST1 A>
DEFINE NLIST1 (NAM,TPE)<
DEFINE NAM'%'TPE<
XLIST
NAM'.'TPE
LIST
> ;END OF DEFINE NAM'%'TPE.
> ;END OF DEFINE NLIST1
NOLIST <<FITB,C>,<DATB,C>,<EXTB,C>,<LITB,C>,<COTB,C>,<HLTB,C>,<USTB,C>,
<FLTB,C>,<PRTB,C>,<CDTB,C>,<RWTB,A>,<RWTB,B>,<RWTB,C>>
PURGE NOLIST
SUBTTL MACROS TO GENERATE CODE.
;MACRO TO GENERATE THE LOAD AND STORE MACROS.
DEFINE LODSTR (DFLTIR)<
DEFINE STORE (AC,FIELD,IR,%P,%S,%FLG)<
.XCREF
%P=<FIELD>B65 ;;NO. OF BITS REMAINING.
%S=<<FIELD>B59>&77 ;;SIZE OF BYTE.
%FLG=0
IFE %P+%S-^D36,<%FLG=1> ;;START IN BIT 0?
IFE %P+%S-^D18,<%FLG=2> ;;START IN BIT 18?
IFE %P-^D18,<%FLG=%FLG+2> ;;END IN BIT 18?
IFE %P,<%FLG=%FLG+4> ;;END IN BIT 35?
IFE %FLG-4,<%FLG=0> ;;START AND END IN THE SAME PLACE?
%P=IR
IFB <IR>,<%P=DFLTIR>
%S=FIELD&777777
IFLE %FLG-2,<DPB AC, [EXP FIELD+<<%P>B17>]>
IFE %FLG-3,<HRLM AC, %S(%P)>
IFE %FLG-5,<MOVEM AC, %S(%P)>
IFE %FLG-6,<HRRM AC, %S(%P)>
PURGE %P,%S,%FLG
.CREF
> ;;END OF DEFINE STORE.
DEFINE LOAD (AC,FIELD,IR,%P,%S,%FLG)<
.XCREF
%P=<FIELD>B65 ;;NO. OF BITS REMAINING.
%S=<<FIELD>B59>&77 ;;SIZE OF BYTE.
%FLG=0
IFE %P+%S-^D36,<%FLG=1> ;;START IN BIT 0?
IFE %P+%S-^D18,<%FLG=2> ;;START IN BIT 18?
IFE %P-^D18,<%FLG=%FLG+2> ;;END IN BIT 18?
IFE %P,<%FLG=%FLG+4> ;;END IN BIT 35?
IFE %FLG-4,<%FLG=0> ;;START AND END IN THE SAME PLACE?
%P=IR
IFB <IR>,<%P=DFLTIR>
%S=FIELD&777777
IFLE %FLG-2,<LDB AC, [EXP FIELD+<<%P>B17>]>
IFE %FLG-3,<HLRZ AC, %S(%P)>
IFE %FLG-5,<MOVE AC, %S(%P)>
IFE %FLG-6,<HRRZ AC, %S(%P)>
PURGE %P,%S,%FLG
.CREF
> ;;END OF DEFINE LOAD.
> ;END OF DEFINE LODSTR.
;REDEFINE THE MACROS TO GENERATE BYTE POINTERS INSTEAD OF SYMBOLS.
DEFINE D.PNTR (TBLNAM,TBLID),<
XLIST
DEFINE TBLID'.ITM (ITMID,WRDNO,LFTBIT,RTBIT),<
XLIST
TBLID'.'ITMID:: TBLID'%'ITMID+<TA>B17
LIST
> ;;END OF DEFINE TBLID'.ITM
DEFINE TBLID'.FLG (FLGID,WRDNO,BITNO),<
XLIST
TBLID'.ITM FLGID,WRDNO,BITNO,BITNO
LIST
> ;;END OF DEFINE TBLID'FLG
DEFINE TBLID'.SME (ID1,ID2)<
XLIST
TBLID'.'ID1==:TBLID'.'ID2
LIST
> ;;END OF DEFINE TBLID'.SME
LIST
> ;END OF DEFINE D.PNTR
END