Trailing-Edge
-
PDP-10 Archives
-
AP-D471B-SB_1978
-
common.bli
There are no other files named common.bli in the archive.
!***COPYRIGHT (C) 1974, 1975, 1976, 1977 DIGITAL EQUIPMENT CORP., MAYNARD, MASS.***
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% COMMON BINDS, MACROS, STRUCTURES, AND %
% EXTERNAL DECLARATIONS %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! LAST MODIFIED ON 30 AUG 74 BY JG.
BIND
! MISC. BINDS
NULL = 0, ! NULL POINTER
OK = 1, ! GOOD RETURN FROM I/O ROUTINES
TRUE = 1, ! TRUTH VALUE
FALSE = 0, ! TRUTH VALUE
LANGTH = 0, ! FOR REFERENCING VARYING STRINGS
STRING = 1, ! FOR REFERENCING VARYING STRINGS
NEW = 0, ! ASK GETREP FOR NEW REPORT BLOCK
OLD = 1, ! ASK GETREP FOR OLD REPORT BLOCK
! DEFINE COMMAND KEYWORD NUMBERS. THESE BINDS MUST BE IN THE SAME
! ORDER AS THE GLOBAL PLIT KEYWRD AND THE TRANSFERVECTOR IN THE MAIN MODULE.
NUMKEYWORDS = 24,
XBY = 1,
XGO = 2,
XALL = 3,
XAND = 4,
XBOTH = 5,
XEXIT = 6,
XMPPS = 7,
XSORT = 8,
XAFTER = 9,
XCODES = 10,
XDATES = 11,
XINPUT = 12,
XPRINT = 13,
XTALLY = 14,
XTEXTS = 15,
XTIMES = 16,
XBEFORE = 17,
XOUTPUT = 18,
XREPORT = 19,
XBETWEEN = 20,
XCLASSES = 21,
XSOURCES = 22,
XSEQUENCE = 23,
XDESTINATIONS = 24,
! DEFINE ALLOCATION AREA FIELDS
COREINCR = 512, ! AMOUNT OF CORE IN EACH ALLOCATION AREA
NEXTAREA = 0, ! PTR TO NEXT ALLOCATION AREA
HIGHADDR = 1, ! HIGHEST USABLE ADDRESS
LASTUSED = 2, ! LAST USED ADDRESS
! DEFINE REPORT BLOCK FIELDS
REPORTBLKSIZ = 28, ! REPORT BLOCK IS 28 WORDS LONG
NEXTREPORT = 0, ! POINTER TO NEXT REPORT
NAMECOUNT = 1, ! LENGTH OF REPORT NAME
REPORTNAME = 2, ! NAME OF REPORT
PAGEHEADPTR = 5, ! POINTER TO PAGE HEADER BLOCK
TALLYPTR = 6, ! POINTER TO TALLY BLOCK
SORTPTR = 7, ! POINTER TO SORT BLOCK
SEQSEL = 8, ! SEQUENCE PRINT SELECT FLAG
SEQPTR = 9, ! POINTER TO SEQUENCE CONSTRAINT BLOCK
TIMSEL = 10, ! TIME PRINT SELECT FLAG
TIMPTR = 11, ! POINTER TO TIME CONSTRAINT BLOCK
DATSEL = 12, ! DATE PRINT SELECT FLAG
DATPTR = 13, ! POINTER TO DATE CONSTRAINT BLOCK
SORSEL = 14, ! SOURCE TERMINAL PRINT SELECT FLAG
SORPTR = 15, ! POINTER TO SOURCE TERMINAL CONSTRAINT BLOCK
MPPSEL = 16, ! MPP PRINT SELECT FLAG
MPPPTR = 17, ! POINTER TO MPP CONSTRINAT BLOCK
DSTSEL = 18, ! DESTINATION PRINT SELECT FLAG
DSTPTR = 19, ! POINTER TO DESTINATION CONSTRAINT BLOCK
CLSSEL = 20, ! MESSAGE CLASS PRINT SELECT FLAG
CLSPTR = 21, ! POINTER TO MESSAGE CLASS CONSTRAINT BLOCK
CODSEL = 22, ! MESSAGE CODE PRINT SELECT FLAG
CODPTR = 23, ! MESSAGE CODE CONSTRAINT BLOCK
TXTSEL = 24, ! MESSAGE TEXT PRINT SELECT FLAG
ALLSEL = 25, ! ALL FIELDS PRINT SELECT FLAG
IOBSEL = 26, ! INPUT, OUTPUT, OR BOTH PRINT SELECT FLAG
PRTSEL = 27, ! CURRENT JOURNAL RECORD PRINT FLAG
! DEFINE I/O AND FILE BLOCK FIELDS
INFILE = 0, ! INPUT FILE TYPE
OUTFILE = 1, ! OUTPUT FILE TYPE
SAVE = 1, ! CLOSE FILE BUT DON'T RELEASE CHANNEL
NOSAVE = 0, ! CLOSE FILE AND RELEASE CHANNEL
IOIBN = #13, ! IMAGE BINARY IO MODE (USED FOR ALL BUT ASCII FILES)
IOASC = #0, ! ASCII IO MODE
FILEBLKSIZ = 10, ! FILE BLOCK IS 10 WORDS LONG
STATUS = 0, ! (OPEN BLOCK) FILE STATUS
DEVICE = 1, ! (OPEN BLOCK) DEVICE NAME (SIXBIT)
OTBUFPTR = 2, ! (OPEN BLOCK) OUTPUT BUFFER HEADER POINTER
INBUFPTR = 3, ! (OPEN BLOCK) INPUT BUFFER HEADER POINTER
BYTPTR = 4, ! (BUFFER HEADER) BYTE POINTER
BYTCNT = 5, ! (BUFFER HEADER) BYTE COUNT
FILENAME = 6, ! (LOOKUP/ENTER BLOCK) FILE NAME (SIXBIT)
EXTENSION = 7, ! (LOOKUP/ENTER BLOCK) EXTENSION (SIXBIT)
PPNUM = 8, ! (LOOKUP/ENTER BLOCK) PPN
LOKENTERR = 9, ! (LOOKUP/ENTER BLOCK) ERROR CODE
BUFHDR = 10, ! BUFFER HEADER
! DEFINE PRINTLINE FIELDS
PRINTSIZE = 30, ! PRINTLINE BLOCK IS 30 WORDS LONG
LINEBP = 0, ! CURRENT BYTE POINTER INTO LINE
LINECT = 1, ! NUMBER OF CHARACTERS IN LINE
LINEPO = 2, ! CHARACTER POSITION IN THE LINE (DIFFERENT FROM LINECT - TABS!)
LINEST = 3, ! THE STRING ITSELF
LINESIZE = 132, ! PRINTER LINESIZE
PAGESIZE = 59, ! PRINTER PAGESIZE
CLEAR = 1, ! PRINT LINE AND RESET BUFFER
NOCLEAR = 0, ! PRINT LINE AND SAVE BUFFER
! DEFINE PAGE HEADER FIELDS
HEADERSIZE = 6, ! REPORT HEADER BLOCK IS 6 WORDS
PAGENO = 0, ! CURRENT PAGE NUMBER
LINENO = 1, ! CURRENT LINE NUMBER
LINEP1 = 2, ! POINTER TO FIRST HEADER LINE
LINEP2 = 3, ! POINTER TO SECOND HEADER LINE
LINEP3 = 4, ! POINTER TO THIRD HEADER LINE
LINEOT = 5, ! POINTER TO REPORT OUTPUT LINE
! DEFINE JOURNAL RECORD AND CHUNK FIELDS
%BLOCK SIZES%
CHUNKSIZ = 32, ! MAX SIZE FOR CHUNKS
JRNRECSIZ = 44, ! SIZE OF JOURNAL RECORD WITH FIRST 10 DESTINATIONS
DSTBLKSIZ = 30, ! SIZE OF DESTINATION BLOCKS
%CHUNK THINGS%
PROBYT = 0, ! PROTOTYPE BYTE POINTER IN CHUNK
ENDIND = 1, ! CHUNK END INDICATOR
MSGLNW = 2, ! CHUNK TEXT LENGTH IN WORDS
MSGLNC = 3, ! CHUNK TEXT LENGTH IN CHARACTERS
MESAGE = 4, ! START OF TEXT
% FIELDS IN BOTH RECORD TYPES %
CHKCNT = 0, ! NUMBER OF CHUNKS
SEQNUM = 1, ! TRANSACTION SEQUENCE NUMBER
DATBIN = 2, ! DATE IN BINARY FORM, FROM DATE UUO
TIMBIN = 3, ! TIME IN BINARY FORM, FROM MSTIME UUO
% FIELDS IN INPUT RECORDS ONLY %
SORNAM = 4, ! SOURCE TERMINAL NAME
TCDSIZ = 5, ! TRANSACTION CODE LENGTH
TCDSTR = 6, ! TRANSACTION CODE
% FIELDS IN OUTPUT RECORDS ONLY %
MSGCLS = 7, ! MESSAGE CLASS
MPPDEV = 8, ! DEVICE PART OF MPP FILE SPEC
MPPFIL = 9, ! FILE PART OF MPP FILE SPEC
MPPPPN = 10, ! PPN PART OF MPP FILE SPEC
DSTCNT = 11, ! NUMBER OF DESTINATIONS
DESPTR = 12, ! POINTER TO FIRST DESTINATION BLOCK
DSTNEX = 0; ! POINTER TO NEXT DESTINATION BLOCK (USED IN DESTBLK)
MACRO
COMMENT(PROGRAM) = SWITCHES MLIST; UNDECLARE PROGRAM$,
NOTE = !$, ! MAKES NEATO COMMENTS !!
REPEAT = WHILE TRUE DO$, ! USED FOR INFINITE LOOPS
WORD = 0,36$, ! FORMS A WORD BYTE PTR
WORDINCR = 36,36$, ! FORMS INCREMENT TYPE WORD BYTE PTR
ADDR = 0,0$, ! FORCES CREATION OF AN ADDRESS INSTEAD OF A BYTE POINTER
LH = 18,18$, ! FORMS A BYTE PTR TO LEFT HALF OF WORD
RH = 0,18$, ! FORMS A BYTE PTR TO RIGHT HALF OF WORD
FIRSTCHAR = 29,7$, ! FORMS A BYTE PTR TO FIRST ASCII CHAR IN WORD
SECCHAR = 22,7$, ! FORMS A BYTE PTR TO SECOND ASCII CHAR IN WORD
FIRSTINCR = 36,7$, ! FORMS A BYTE PTR TO FISRT ASCII CHAR FOR AN ILDB OR IDPB
LASTCHAR = 1,7$, ! FORMS A BYTE PTR TO LAST ASCII CHAR IN WORD
ONLYCHAR = 0,7$, ! FORMS A BYTE PTR TO RIGHT JUSTIFIED CHAR
P = 30,6$, ! FOR FONDLING BYTE POINTERS
S = 24,6$, ! LIKEWISE
IS = EQL$, ! SYNTACTIC SUGAR
ISNOT = NEQ$; ! DITTO
EXTERNAL
KEYWRD, ! PLIT OF KEYWORD STRINGS
FIRFRE, ! POINTER TO FIRST ALLOCATION AREA
CURFRE, ! POINTER TO CURRENT ALLOCATION AREA
FIRREP, ! POINTER TO FIRST REPORT BLOCK
CURREP, ! POINTER TO CURRENT REPORT BLOCK
?.JBFF, ! FIRST FREE LOCATION IN LOW SEG
INCHNL, ! INPUT I/O CHANNEL #
OTCHNL, ! OUTPUT I/O CHANNEL #
CHANLS[16], ! LIST OF CHANNEL ASSIGNMENTS
CHRDAT[3], ! TODAY'S DATE
CHRTIM[2], ! NOW'S TIME
USRPPN, ! USER'S PPN
USRJBN; ! USER'S JOB #
% STRUCTURES %
!NOTE THAT IN GENERAL, STRUCTURES ARE MAPPED ONTO POINTERS TO DATA ITEMS.
! ========
! A VARYING CHARACTER STRING IS A STRING PRECEEDED BY A LENGTH.
! THE CHARACTERS ARE LEFT JUSTIFIED AND THAT LAST WORD, IF NOT FILLED,
! IS PADDED WITH NULLS.
STRUCTURE VARYINGCHAR[FIELD] = CASE .FIELD OF
SET
%LANGTH% ..VARYINGCHAR;
%STRING% ..VARYINGCHAR+1;
TES;
! ALL ALLOCATIONS ARE DONE ON A PIECE BY PIECE BASIS BUT
! THE FREES ARE DONE ALL AT ONCE; AS A RESULT, THE ALLOCATION
! AREA FORMAT IS QUITE SIMPLE.
STRUCTURE AREA[FIELD] = CASE .FIELD OF
SET
%NEXT AREA% ..AREA;
%HIGH ADDR% ..AREA+1;
%LAST USED% ..AREA+2;
TES;
! REPORT BLOCK STRUCTURE FORMAT
STRUCTURE REPBLK[FIELD] = CASE .FIELD OF
SET
%NEXTREPORT% ..REPBLK;
%NAMECOUNT% ..REPBLK+1;
%REPORTNAME% ..REPBLK+2;
%FILL% 0;
%FILL% 0;
%PAGEHEADPTR% ..REPBLK+5;
%TALLYPTR% ..REPBLK+6;
%SORTPTR% ..REPBLK+7;
%SEQSEL% ..REPBLK+8;
%SEQPTR% ..REPBLK+9;
%TIMSEL% ..REPBLK+10;
%TIMPTR% ..REPBLK+11;
%DATSEL% ..REPBLK+12;
%DATPTR% ..REPBLK+13;
%SORSEL% ..REPBLK+14;
%SORPTR% ..REPBLK+15;
%MPPSEL% ..REPBLK+16;
%MPPPTR% ..REPBLK+17;
%DSTSEL% ..REPBLK+18;
%DSTPTR% ..REPBLK+19;
%CLSSEL% ..REPBLK+20;
%CLSPTR% ..REPBLK+21;
%CODSEL% ..REPBLK+22;
%CODPTR% ..REPBLK+23;
%TXTSEL% ..REPBLK+24;
%ALLSEL% ..REPBLK+25;
%IOBSEL% ..REPBLK+26;
%PRTSEL% ..REPBLK+27;
TES;
! FILE BLOCK STRUCTURE FORMAT
STRUCTURE FILBLK[FIELD] = CASE .FIELD OF
SET
%STATUS% ..FILBLK;
%DEVICE% ..FILBLK+1;
%OTBUFPTR% (..FILBLK+2)<LH>;
%INBUFPTR% (..FILBLK+2)<RH>;
%BYTPTR% ..FILBLK+4;
%BYTCNT% ..FILBLK+5;
%FILENAME% ..FILBLK+6;
%EXTENSION% (..FILBLK+7)<LH>;
%PPNUM% ..FILBLK+9;
%LOKENTERR% (..FILBLK+7)<RH>;
%BUFHDR% ..FILBLK+3;
TES;
! STRUCTURE WHERE OUTPUT LINES ARE ASSEMBLED.
STRUCTURE PRINTLINE[FIELD] = CASE .FIELD OF
SET
%LINEBP% ..PRINTLINE;
%LINECT% ..PRINTLINE+1;
%LINEPO% ..PRINTLINE+2;
%LINEST% ..PRINTLINE+3;
TES;
! STRUCTURE FOR REPORT HEADER BLOCK
STRUCTURE HEADER[FIELD] = CASE .FIELD OF
SET
%PAGENO% ..HEADER;
%LINENO% ..HEADER+1;
%LINEP1% ..HEADER+2;
%LINEP2% ..HEADER+3;
%LINEP3% ..HEADER+4;
%LINEOT% ..HEADER+5;
TES;
! STRUCTURE FOR CHUNKS
STRUCTURE CHUNK[FIELD] = CASE .FIELD OF
SET
%PROBYT% (..CHUNK)<24,12>;
%ENDIND% (..CHUNK)<18,6>;
%MSGLNW% (..CHUNK+1)<LH>;
%MSGLNC% (..CHUNK+1)<RH>;
%MESAGE% ..CHUNK+2;
TES;
! STRUCTURE OF JOURNAL RECORDS
STRUCTURE JOURNALREC[FIELD] = CASE .FIELD OF
SET
%FOR BOTH RECORD TYPES%
%CHKCNT% ..JOURNALREC;
%SEQNUM% ..JOURNALREC+1;
%DATBIN% ..JOURNALREC+2;
%TIMBIN% ..JOURNALREC+3;
%FOR INPUT RECORDS ONLY%
%SORNAM% ..JOURNALREC+4;
%TCDSIZ% ..JOURNALREC+7;
%TCDSTR% ..JOURNALREC+8;
%FOR OUTPUT RECORDS ONLY%
%MSGCLS% ..JOURNALREC+4;
%MPPDEV% ..JOURNALREC+6;
%MPPFIL% ..JOURNALREC+8;
%MPPPPN% ..JOURNALREC+10;
%DSTCNT% ..JOURNALREC+11;
%DSTPTR% ..JOURNALREC+12;
TES;
! STRUCTURE FOR DESTINATION BLOCK
STRUCTURE DESTBLOCK[FIELD] = IF .FIELD IS 0
THEN ..DESTBLOCK ! POINTER TO NEXT BLOCK
ELSE ..DESTBLOCK+.FIELD*3-2; ! DESTINATION[I]
%%%%%%%%%%% END OF COMMON BINDS, MACROS, AND STRUCTURES %%%%%%%%%%%