Google
 

Trailing-Edge - PDP-10 Archives - AP-D471B-SB_1978 - data.bli
There are 12 other files named data.bli in the archive. Click here to see a list.
!***COPYRIGHT (C) 1974, 1975, 1976, 1977 DIGITAL EQUIPMENT CORP., MAYNARD, MASS.***
! DATA.BLI
! DEFINITIONS OF SOME COMMONLY USED VALUES
! LAST MODIFIED:  29 MAR 77  BY  CDO 

! TURNED OFF THE LISTING TO SAVE TREES
SWITCHES NOLIST;

BIND

  ! STATUS CODES RETURNED TO LIBOL

	STSGOOD = 0,		! GOOD RETURN [ALL FUNCTIONS]

	STSILLQNAME = 1,	! ILLEGAL QUEUE NAME [AC,DI,EI,DIT,EIT,RECV]
	STSMCLUNK = 1,		! UNKNOWN MESSAGE CLASS [SEND]
	STSNOTNODE = 1,		! NOT SCHEDULED DUE TO TRANSACTION [INIT]

	STSDISDST = 2,		! ONE OR MORE DESTINATIONS DISABLED [SEND]
	STSILLPSWRD = 2,	! ILLEGAL PASSWORD [DI,EI,DIT,EIT,DO,EO]
	STSNODATA = 2,		! NO DATA RETURNED [RECV]
	STSNOTMCS = 2,		! NOT STARTED BY MCS-10 [INIT]

	STSUNKDST = 3,		! ONE OR MORE DESTINATIONS UNKNOWN [SEND,DIT,EIT,DO,EO]

	STSALLDSTUNK = 4,	! ALL DESTINATIONS UNKNOWN [SEND]
	STSSRCNOTASS = 4,	! SOURCE NOT ASSOCIATED

	STSLOSTTERM = 5,	! INPUT TERMINAL HAS GONE AWAY [RECV]

  ! FOR MCS-10 DETECTED CONSISTENCY ERRORS

	STSUNKFUNCTION = -1,	! ILLEGAL FUNCTION CODE FROM THE LCM
	STSNOTINSEND = -2,	! NOT INITIAL SEND BUT NO PREVIOUS FOUND
	STSNOTINRECV = -3,	! NOT INITIAL RECEIVE BUT NO PREVIOUS FOUND
	STSPASTEGI = -4,	! TRANSACTION DONE BUT REQUESTING MORE FROM IT
	STSNEVEREPI = -5,	! ASKING FOR NEW TRANSACTION BUT NOT DONE WITH OLD YET
	STSWHORU = -6,		! NOT AN MPP KNOWN TO THE MCP (SET BY KERNEL)

  ! FOR THE DESTINATION TABLE, INDIVIDUAL ERRORS

	STSGOODDST = 0,		! DESTINATION IS GOOD
	STSBADDST = 1,		! DESTINATION IS BAD


	EPIBIT = #1000000,	!THE BIT IN THE JOB TABLE TO INDICATE IF THE JOB HAS SENT A EPI
	IDLEBIT = #2000000,	!THE BIT IN THE JOB TABLE TO INDICATE THE JOB HAS SENT AN EPI AND IS IN RECEIVE WAIT
	OPRKILLBIT= #4000000,	!THE BIT IN THE JOB TABLE TO INDICATE THE OPERATOR WANTS THIS MPP KILLED
	LOSTCARRIER= 1,		!THE BIT RETURNED BY PSTATUS TO INDICATE
				!LOST CARRIER FOR A LINE
	LOSTDEVICE= 2,		!THE BIT RETURNED BY PSTATUS TO INDICATE
				!THAT A DEVICE WAS LOST


	SENDPAGE = 1,		!VALUE RETURNED BY THE FUNCTION ACTION
				!ROUTINES TO INDICATED THE COMMAND PAGE
				!IS TO BE RETURNED TO THE SENDER
	KEEPPAGE = 0,		!DITTO SENDPAGE, EXCEPT DON'T SEND IT
				!KEEP IT
	DELETEPAGE = 2,		!DITTO SENDPAGE, EXCEPT DON'T SEND IT
				!DESTROY IT
	TRUE = 1,		!BLISS' VALUE OF TRUE
	FALSE = 0,		!BLISS' VALUE OF FALSE
	PAGESIZE = 512,		!SIZE OF A PAGE
	PAGETEXTAREA = 256,	!SIZE OF TEXT AREA IN A PAGE
	LFSTSITEMSIZE = 2,	!SIZE OF ONE ENTRY IN THE LEAF STATUS TABLE
	WORDSIZE = 36,		!WORD SIZE ON THE TEN
	!NUMBER OF ENTRIES PER WORD IN THE LEAF STATUS TABLE:
	LFITEMPERWORD = WORDSIZE/LFSTSITEMSIZE,
	L0SIZE = 5,		!LEAF TABLE ENTRY SIZE
	C0HEADSIZE = 2,		!SIZE OF CHUNK HEADER
	MAXLEVEL = 4,		!MAXIMUM NUMBER OF QUEUE LEVELS
	QS0SIZE = 3,		!SIZE OF QSEND LIST ENTRIES
	W0SIZE = 3,		!SIZE OF WAIT LIST ENTRIES
	I0SIZE = 6,		!SIZE OF IMAH'S
	PT0SIZE = 3,		!PORT TABLE ENTRY SIZE
	G0SIZE = 7,		!GROUP HEADER SIZE
	M0SIZE = 5,		!MESSAGE HEADER SIZE
	SQ0SIZE = 1,		!SENDQ ENTRY SIZE
	R0SIZE = 1,		!RECVQ ENTRY SIZE
	LEAFNAMLEN = 3,		! LENGTH OF A LEAFNAME IN WORDS
	LEAFNAMCHR = 12,	!    "            "    IN CHARACTERS
	SRCNAMLEN = 3,		! LENGTH OF A SOURCE NAME IN WORDS
	SRCNAMCHR = 12,		!    "           "    "   IN CHARACTERS
	MCLASSSIZE = 2,		! MESSAGE CLASS IS TWO WORDS (8 CHARACTERS NULL FILLED) LONG
	ENABLED = 0,		! SYMBOLIC ENABLE FLAG
	DISABLED = 1,		! SYMBOLIC DISABLE FLAG
	TERMINAL = 0,		! VALUE FOR TERMINAL IN G0TYPEOFSENDER
	LEAFTYPE = 1,		! VALUE FOR LEAF TYPE IN G0TYPEOFSENDER
	PTLSIZE = 32,		! PARTICLE SIZE
	C0SIZE = PTLSIZE,	! THE MAXIMUM CHUNK SIZE = PTLSIZE
	ASCIISIZE = 7,		! 7 BITS PER ASCII CHARACTER
	ASCIIBYTESPERWORD = 5,	! 5 ASCII CHARACTERS PER WORD
	NOTCHUNK = 0,		! FLAG FOR DELETE MACRO
	SPACECHAR = " ",	! AN ASCII SPACE
	TABCHAR = "?I",		! AN ASCII TAB

    ! COMMAND CODES
	INITC = 1,		! INIT COMMAND CODE
	RW = 2,			! READ WITH WAIT COMMAND CODE
	RNW = 3,		! READ NO WAIT COMMAND CODE
	SENDRR = 4,		! SEND AND RETURN RESPONSE
	SENDNR = 5,		! SEND WITH NO RESPONSE
	ACC = 6,		! ACCEPT COUNT COMMAND CODE
	DIC = 7,		! DISABLE INPUT COMMAND CODE
	DITC = 8,		! DISABLE INPUT TERMINAL COMMAND CODE
	DOC = 9,		! DISABLE OUTPUT COMMAND CODE
	EIC = 10,		! ENABLE INPUT COMMAND CODE
	EITC = 11,		! ENABLE INPUT TERMINAL COMMAND CODE
	EOC = 12;		! ENABLE OUTPUT COMMAND CODE


EXTERNAL			! KERNEL ROUTINES
	GMEM,
	PMEM,
	INIPC,
	OUTIPC,
	INMSG,
	OUTMSG,
	STAMP,
	INAUDV,
	INAUDW,
	OTAUDV,
	OTAUDW,
	MPPRUN,
	GETMPPSTATUS,
	SETMPPSTATUS,
	CLRMPPSTATUS,
	SETLDV,
	SCHED,
	CPAGE,
	DPAGE,
	DREAD,
	DGET,
	DWRITE,
	DSKALL,
	DSKDEA,
	DPAT,
	INFORM;

BIND				! MAKE SOME SHORT NAMES LONG
	INAUDVECTOR = INAUDV,
	INAUDWORD = INAUDW,
	OTAUDVECTOR = OTAUDV,
	OTAUDWORD = OTAUDW;

MACRO
	BIT(Z) = 35-(Z), 1$,					! USED TO DEFINE ONE BIT AS NUMBERED ON THE TEN
								! GIVES THE NUMBER OF BITS TO THE RIGHT OF IT
	BITS(A,B) = 35-(B),(B)-(A)+1$,				! LIKE BIT EXCEPT DEFINES BITS A THRU B INCLUSIVE
	COMMENT = SWITCHES NOINSPECT$,				! CAUSES BLISS TO GENERATE THE CODE FOR THE
								! PRECEEDING ROUTINES ( FOR PRETTY LISTINGS)
	REQ(A) = REQUIRE  A .BLI$,				! DOES REQUIRES, SAVES TYPING
	ZERO(A %THRU%, B) = MOVE(0, A, (B) - (A) + 1)$,		! ZAP CORE IN A THRU B INCLUSIVE
	NOTE = !$,						! USED TO PUT A CREFED NOTE IN A MODULE
	PAZ = PLIT ASCIZ$,					! OBVIOUS
	INC( A, %BY% B ) = A _ .A + B$,				! OBVIOUS
	REPEAT = WHILE TRUE DO$;				! INFINITE LOOP
MACRO
	CREATEMH(LINKKEY) = BUILD(LINKKEY,M0SIZE)$,
					!CREATE MH, LINKKEY IS THE LINKKEY FOR THE CHAIN OF MH'S
	CREATEGH(LINKKEY) = BUILD(LINKKEY,G0SIZE)$,
					!CREATE GH, LINKKEY IS THE LINKKEY OF THE GH CHAIN
	CREATEIMAH(LINKKEY) = BUILD(LINKKEY,I0SIZE)$,
					!CREATE IMAH, LINKKEY IS THE LINKKEY IN THE CHAIN
	DELETE(LINKKEY,POINTER,SIZE,FLAG) =
					!DELETE A BLOCK OF SIZE NUMBER OF WORDS LOCATED AT POINTER.
	    (IF FLAG EQL 0 THEN UNLINK(LINKKEY,POINTER);
					!IF FLAG=1, THE BLOCK TO BE DELETED IS A CHUNK,
	     RETMEM(POINTER,SIZE))$,
					!OTHERWISE, IT IS ONE OF THE THREE: MH,GH,IMAH.
	DELCHNK(WHAT) = 
		BEGIN
		    LOCAL FORMAT WORDS;

		    WORDS_WHAT;
		    DELETE(0,WHAT,C0HEADSIZE+.WORDS[C0WORDS],1)
		END$,
	DELIMAH(LINKKEY,WHAT) = DELETE(LINKKEY,WHAT,I0SIZE,0)$;


EXTERNAL 	TREE,				! DATA BASE EXTERNALS
		SRCTAB,
		PORTTAB,
		LFTAB,
		LFPTRTAB,
		TRCODE,
		SENDQ,
		RECVQ,
		WAITLST,
		S0SIZE,
		LHTSN,
		RHTSN,
		S0CNT,
		MCLASS,
		MCOUNT,
		MDEFAULT,
		CHECKPOINTING,
		ROLLING,
		ILOGGING,
		OLOGGING,
		MLOGGING,
		LFADDR,
		ERLEAF,
		PIGGYBACK,
		SDMO,

		TRCLEN,
		TRCDEL,
		TRCW,

		FILLRB,
		FILLRC,

		IBASE,
		OBASE,
		MPPTAB,
		ILGCDO;

MACRO		INLOGGING = ILOGGING$,
		OUTLOGGING = OLOGGING$,
		MPPLOGGING = MLOGGING$,
		GETMEM = GMEM$,
		RETMEM = PMEM$,
		ROLLIN = ROLIN$;

STRUCTURE	FORMAT[WD,I,J] = (..FORMAT + .WD)<.I,.J>;
MACRO
	WORD = 0,36$,
	LH = 18,18$,
	RH = 0,18$,
	RIGHT = 0$,
	LEFT = 18$,
	HALFWORD = 18$,
	AFT = 18,18$,
	FORE = 0,18$,
	POS = 30,6$,
	SIZ = 24,6$,
	N0LFNO = (.TREE)<RH>$,			!NUMBER OF LEAVES IN THE TREE
	P0TUD(I) = ((PAGESIZE-2)-I*2)$,		!TEXT UNIT DESCRIPTOR IN PAGE,

! INPUT MESSAGE ASSEMBLY HEADER (IMAH) DECLARATION
! MAP FORMAT IMAH

	I0LINK = 0,WORD$,		!LINKPTR 
	    I0FORE = 0,FORE$,		! FORWARD POINTER PART OF I0LINK
	    I0AFT = 0,AFT$,		! REVERSE POINTER PART OF I0LINK
	I0MHPTR = 1,LH$,		!PTR TO MH
	I0MODE = 1,RH$,			!MODE OF THE CHUNKS BEING ASSEMBLED
	    I0LFCNT = 1,0,12$,		!COUNT OF LEAF DESTS IN THE DESTAB
	    I0MCLSS = 1,12,1$,		!MESSAGE-CLASS:
					!   0 = IMMEDIATE
					!   1 = DEFERRED
	    !UNUSED = 1, 13, 1$,	!
	    !UNUSED = 1, 14, 1$,	!
	    !UNUSED = 1, 15, 1$,	!
	I0GHPTR = 2,LH$,		!DESTINATION GH-PTR
	I0DESTAB = 2,RH$,		!DESTINATION TABLE POINTER
	I0TSN = 3,WORD$,		!TRANSACTION SEQUENCE NUMBER
	I0TRMCNT = 4,RH$,		!NO. OF TERMINAL TYPE DESTINATIONS
	I0DSTSIZE = 4,LH$,		!NO. OF WORDS IN THE DESTAB
	I0DSKMH = 5,RH$,		!ADDRESS OF DSKMH IF DEFERRED

! PORT TABLE (PORTTAB) DECLARATION
! MAP FORMAT PORTTAB
!
	PT0NAME = 0, 36, 6$,		! PORT NAME (SIXBIT)
	PT0NAMEW = 0, WORD$,		! PORT NAME (WORD)
	PT0SRCPTR = 1, RH$,		!SOURCE PTR (POINTS TO A SRCTAB 
					!ENTRY) = 0 IF NOT SIGNED ON
	PT0TMPSRCPTR = 1, LH$,		!OTHER SOURCE POINTER FOR NOT SIGNED ON PORTS
	PT0UDX = 2,RH$,			!UDX NUMBER OF THE PORT
	PT0FLAGS = 2,LH$,		!FLAG HALF WORD
	  PT0CARRIER = 2,18,1$,		!  TRUE IF CARRIER ON

!
! SOURCE TABLE (SRCTAB) DECLARATION
! MAP FORMAT SRCTAB
!
	S0ID = 0,36,7$,				!NAME OF TERMINAL KNOWN TO MCS
	S0IDW = 0,WORD$,			!NAME OF TERMINAL ( AS A WORD)
	S0PORTPTR = SRCNAMLEN,LH$,		!PORT ASSOCIATED WITH THIS TTY
						! NOTE - S0PORTPTR ACTUALLY CONTAINS
						!	THE UDX OF THE PORT, NOT
						!	A POINTER TO THE PORT
	S0TSN = SRCNAMLEN,RH$,			!TRANSACTION SEQUENCE NUMBER
						!BEING PROCESSED BY THIS TTY
	S0IGHS = SRCNAMLEN+1,WORD$,		!PTR TO IMMEDIATE GH'S:
	    S0FIGHPTR = SRCNAMLEN+1,FORE$,	!PTR TO FIRST IMMEDIATE GH
	    S0LIGHPTR = SRCNAMLEN+1,AFT$,	!PTR TO LAST IMMEDIATE GH
	S0SOT = SRCNAMLEN+2,LH$,		!NUMBER OF CHARACTERS TO SKIP
	S0DFGCNT = SRCNAMLEN+2,RH$,		!COUNT OF DEF. MESSAGE GROUPS
	S0DGHS = SRCNAMLEN+3,WORD$,		!PTR TO DEFFERED GH'S:
	    S0FDGHPTR = SRCNAMLEN+3,FORE$,	!PTR TO FIRST DEFFERED GH
	    S0LDGHPTR = SRCNAMLEN+3,AFT$,	!PTR TO LAST DEFFERED GH
	S0CHUNKS = SRCNAMLEN+4,WORD$,		!CHUNK POINTERS-REDEFINED BY S0LCHNK & S0FCHNK
	    S0FCHNK = SRCNAMLEN+4,FORE$,	!PTR TO FIRST INPUT CHUNK
	    S0LCHNK = SRCNAMLEN+4,AFT$,		!PTR TO LAST INPUT CHUNK
	S0GHPTR = SRCNAMLEN+5,LH$,		!CURRENT OPEN GROUP HEADER PTR
	S0STATUS = SRCNAMLEN+5,RH$,		!STATUS BITS AS FOLLOWS:
	    S0DITINI = SRCNAMLEN+5,BITS(34,35)$, !INITIAL DIT FOR RESET
	    S0ED = SRCNAMLEN+5,BIT( 33 )$,	!ENABLE/DISABLE STATUS:
						!     0 = ENABLED
						!     1 = DISABLED OUTPUT
	    S0PURGE = SRCNAMLEN+5,BIT( 32 )$,	!PURGING FLAG
	    S0DIT = SRCNAMLEN+5,BITS( 30, 31 )$,!DISABLE INPUT TERMINAL FLAG
						!    00 = EIT ALL
						!    10 = DIT SOME
						!    11 = DIT ALL
	    S0DEFSENDING = SRCNAMLEN+5,BIT( 29 )$, !IF TRUE THEN DON'T UNDEFER ANY MORE
	    S0SELF = SRCNAMLEN+5,BIT( 28 )$,	!SELF FLAG
						!   1 = USE SELF
						!   0 = USE ALTERNATE POINTED TO BY S0ALTPTR
	    S0RIGHTALT = SRCNAMLEN+5,BIT( 27 )$, !WHICH PART OF THE ALTERNATE TABLE TO USE FLAG
						!   1 = USE RIGHT HALF OF ALTERNATE TABLE
						!   0 = USE LEFT HALT OF ALTERNATE TABLE
	    S0EDINI = SRCNAMLEN+5,BIT(26)$,	!INITITAL ED FOR RESET

	S0ALTPTR = SRCNAMLEN+6, LH$,		!POINTER TO THE ALTERNATE TERMINAL LIST (0 IF NONE)
	S0LSTINI = SRCNAMLEN+6, RH$,		!POINTER TO LEAF STATUS TABLE
						! INITIAL COPY
	S0OPCHAIN = SRCNAMLEN+7,WORD$,		!OUTPUT CHAIN FOR TERMINALS
	    S0OPPREV = SRCNAMLEN+7,LH$,		! POINTER TO PREVIOUS
	    S0OPNEXT = SRCNAMLEN+7,RH$,		! POINTER TO NEXT

	S0LFSTTAB = SRCNAMLEN+8,WORD$,		!LEAF STATUS LIST:TWO BITS FOR
	S0LFSTS(I,J) = SRCNAMLEN+8+(I/LFITEMPERWORD),(WORDSIZE-((I MOD LFITEMPERWORD)+1)*LFSTSITEMSIZE),J$,
						!EACH LEAF IN THE TREE STRUCTURE:
						!    00 = ACCESSABLE & ENABLED
						!    01 = ACCESSABLE BUT DISABLED
						!    1X = INACCESSABLE
!
! GROUP HEADER (GH) DECLARATION
! MAP FORMAT GH
!
	G0LINK = 0,WORD$,		!LINKPTR
	    G0FORE = 0,FORE$,		!FORWORD LINK PART OF G0LINK
	    G0AFT = 0,AFT$,		!REVERSE LINK PART OF G0LINK
	G0MHS = 1,WORD$,		! PTR TO MHS OF THE GROUP:
	    G0FMHPTR = 1,FORE$,		!PTR TO FIRST MH OF THE GROUP
	    G0LMHPTR = 1,AFT$,		!PTR TO LAST INPUT MH 
	G0SENDER = 2,LH$,		!PTR TO ENTRY IN SRCTAB FOR
					!   INPUT SIDE
	G0FLAGS = 2,RH$,		!FLAGS, REDEFINED BELOW
	    G0SENDING = 2,BIT( 18 )$,	!OUTPUT BEING SENT FLAG
	    G0ONDSK = 2,BIT( 19 )$,		!WHERE ARE MESSAGES TO BE STORED
					!IN CORE = FALSE(0)
					!ON DISK = TRUE(1)
					!  WHEN CHECKPOINTING, ONDSK
					!  MEANS ON DISK ONLY WHEN TRUE
					!		 ====
	    G0EMPTY = 2,BIT( 20 )$,		!NOTHING LEFT FOR OUTPUT FLAG
					! TRUE IF NOTHING LEFT
					! FALSE OTHERWISE
	    G0ENDI = 2,BIT( 21 )$,		!ENDI OF THE LAST CHUNK IN GROUP.
					! 1 = EGI OR EPI HAS BEEN ENCOUNTERED.
					! 0 = OTHERWISE.
	    G0FINISHED = 2, BIT( 22 )$,		!IS THIS GROUP FINISHED
					! TRUE IF IT IS
					! FALSE IF IT ISN'T
	    G0LOSTTERM = 2, BIT( 23 )$,	! TRUE IF GROUP IS BEING FINISHED
					! FAST DUE TO LOST TERMINAL
	    G0PURGING = 2, BIT( 25 )$,	! THIS BIT IS USED ONLY WHEN THE
					! DESTINATION OF A SEND IS A
					! LEAF AND THE RECEIVER OF THIS
					! GROUP HAS ISSUED AN EPI BEFORE
					! THE SENDER HAS FINISHED
					! IF TRUE(1) THEN PURGING
	    G0TYPEOFSENDER = 2, BIT( 26 )$,	! IF FALSE(0) THEN TERMINAL TYPE
					!	SENDER
					! IF TRUE(1) THEN MPP TYPE
					!	SENDER
	    G0CHKPNT = 2, BIT( 27 )$,	! IF TRUE(1) THEN WE ARE CHECKPOINTING THIS GROUP
					! THIS IS TO AVOID RACE CONDITIONS WITH THE CHECKPOINT FLAG
	    G0RECEIVING = 2, BIT( 28 )$,	! IF TRUE, THEN THIS GROUP
						! IS BEING RECEIVED, SO DON'T
						! DUMP IT ON DISK AND ERASE THE
						! CORE IMAGE
	G0LFPTR = 3,LH$,		!PTR TO LEAF THE GROUP BELONGS 
					!OR PREVIOUSLY BELONGED TO
	G0OUTMH = 3,RH$,		!PTR TO NEXT OUTPUT MH
					! G0OUTMH = 0 IF NOTHING REMAINING
					!	TO OUTPUT
					! G0OUTMH = PAGEADDRESS & JSN
					!	IF RECEIVER WAITING
	    G0PADDR = 3,9,9$,		! ADDRESS OF PAGE WAITING TO RECEIVE
	    G0JSN = 3,0,9$,		! JOB SLOT NUMBER OF WAITING RECEIVER
	G0TSN = 4,WORD$,		!TRANSACTION SEQUENCE NUMBER
	    G0RHTSN = 4,RH$,		! RIGHT HALF OF THE TSN
	    G0LHTSN = 4,LH$,		! LEFT HALF OF TSN
	G0DSKGHADDR = 5,WORD$,		! DISK ADDR FOR GROUP HEADER INFO
	G0DSTCNT = 6,LH$,		!DESTINATION COUNT ON OUTPUT SIDE
	!UNUSED = 6,RH$,		! UNUSED
!
! MESSAGE HEADER (MH) DECLARATION
! MAP FORMAT MH
!
	M0LINK = 0,WORD$,		!LINKPTR
	    M0FORE = 0,FORE$,		!FORWARD POINTER PART OF M0LINK
	    M0AFT = 0,AFT$,		!REVERSE POINTER PART OF M0LINK
	M0CHNKS = 1,WORD$,		!PTR TO CHUNKS
	    M0INCHNK = 1,FORE$,		!PTR TO FIRST INPUT CHUNK
					! 0 IF ON DISK ONLY
	    M0OUTCHNK = 1,AFT$,		!PTR TO NEXT OUTPUT CHUNK
					! 0 IF ON DISK ONLY
	M0DSKADDR = 2, RH$,		! DISK ADDRESS OF THE MESSAGE
	M0SOT = 2, LH$,			! COUNT OF CHARACTERS TO BE SKIPPED

	! FOR OUTPUT MESSAGES ONLY
	M0DSCNT = 3,LH$,		!DEST. COUNT FOR THIS MESSAGE
	M0MODE = 3,RH$,			!MODE OF THIS MESSAGE
					! THE NEXT WORD IS NOT USED FOR
					! OUTPUT MESSAGES

	! FOR INPUT MESSAGES ONLY:
	M0DATE = 3,WORD$,		! DATE OF MESSAGE
	M0TIME = 4,WORD$,		! TIME OF MESSAGE
!
! NODE DECLARATION
! MAP FORMAT NODE
!
	N0NAME = 0,36,7$,		!NAME OF NODE KNOWN TO MCS USER (ASCIZ)
	N0PARENT = LEAFNAMLEN,LH$,		!PTR TO PARENT NODE OF THIS NODE
					!IN THE TREE STRUCTURE
	N0TSCNT = LEAFNAMLEN,RH$,		!COUNT OF TRANSACTIONS BELOW THIS NODE
	N0MPP = LEAFNAMLEN+1,LH$,		!PTR TO MPP TO START
	N0THRESH = LEAFNAMLEN+1,RH$,	!THRESHHOLDS FOR THIS NODE
	N0NXTND = LEAFNAMLEN+2,LH$,		!PTR TO NODE IN THE NEXT LEVEL
	N0SAMND = LEAFNAMLEN+2,RH$,		!PTR TO NODE IN THE SAME LEVEL
	N0QUOTA = LEAFNAMLEN+3,LH$,		!QUOTA FOR THIS LEAF
	N0LLFNO = LEAFNAMLEN+3,0,14$,	!LOGICAL LEAF NUMBER (FOR LEAF ONLY)
	N0CHKPNT = LEAFNAMLEN+3,14,1$,	! ON IF CHECKPOINTED (LEAF ONLY)
	N0LEVEL = LEAFNAMLEN+3,15,2$,	!LEVEL WHERE THIS NODE BELONGS TO
	N0ED = LEAFNAMLEN+3,17,1$,		!STATUS OF THIS LEAF:
					!     0 = ENABLED
					!     1 = DISABLED
	N0GHS = LEAFNAMLEN+4,WORD$,		! PTR TO GHS:
	    N0FGH = LEAFNAMLEN+4,FORE$,	!PTR TO FIRST GH (FOR LEAF ONLY)
	    N0LGH = LEAFNAMLEN+4,AFT$,	!PTR TO LAST GH (FOR LEAF ONLY)
	N0TSCORE = LEAFNAMLEN+5,LH$,	!COUNT OF TRANSACTIONS IN CORE(LEAF ONLY)
!
! CHUNK DECLARACTION
! MAP FORMAT CHUNK
!
	C00ENDI = 18, 6$,		! SUB FIELD END INDICATOR POSITION
	C00WORDS = LH$,			! DITTO FOR WORD COUNT
	C00BCNT = RH$,			! DITTO FOR BYTE COUNT

	C0BPOS = 0,POS$,		!BYTE PTR TO THE FIRST GOOD
	C0BSIZ = 0,SIZ$,		!CHARACTER IN DATA
	C0ENDI = 0,C00ENDI$,		!END INDICATOR OF THE DATA STORED HERE
	C0LINK = 0,FORE$,		!LINK TO NEXT CHUNK
	C0WORDS = 1,C00WORDS$,		!NUMBER OF WORDS ATORED IN DATA AREA
	C0BCNT = 1,C00BCNT$,		!COUNT OF BYTES STORED HERE
	C0DATA = 2,WORD$,		!DATA STARTS HERE
!
! LEAF TABLE (LFTAB) DECLARATION
! MAP FORMAT LFTAB
!
	L0DST(I) = I,36,7$,		!DESTINATION NAME (ASCIZ)
	L0DSTW(I) = I,WORD$,		!DESTINATION NAME (WORD)
	L0LFPTR(I) = I+3,LH$,		!LEAF POINTER
	L0ED(I) = I+3,17,1$,		!ENABLE/DISABLE FLAG
	L0TSCNT(I) = I+3,0,17$,		!COUNT OF TRANSACTIONS IN LFTAB ENTRY
	L0GHS(I) = I+4,WORD$,		!PTR TO GHS
	    L0FGH(I) = I+4,FORE$,		!PTR TO GH IF DISABLED
	    L0LGH(I) = I+4,AFT$,		!PTR TO LAST GH IF DISABLED
!
! TRANSACTION CODE AND LEAF ADDRESS (TRCODE) DECLARACTION
! MAP FORMAT TRCODE
!
	T0TRCODE(I) = I,LH$,		!TRANSACTION CODE
	T0LFPTR(I) = I,RH$,		!PTR TO THE CORRESPONDING LEAF

! WAITLIST (WAITLST) DECLARATION
! MAP FORMAT WAILST

	W0LINK = 0,WORD$,		!LINK PTR
	    W0FORE = 0,FORE$,		!FORWARD POINTER PART OF W0LINK
	    W0AFT = 0,AFT$,		!REVERSE POINTER PART OF W0LINK
	W0JSN = 1,LH$,			!JOB SLOT NUMBER
	W0PAGE = 1,RH$,			!PTR TO THE PAGE OF THIS MPP
	W0NODE = 2,LH$,			!PTR TO THE NODE THIS MPP IS WAITING FOR

! QSENDLIST (QSENDLST) DECLARATION
! MAP FORMAT QSENDBLK

	QS0LINK = 0,WORD$,		!LINK PTR
	    QS0FORE = 0,FORE$,		!FORWARD POINTER PART OF QS0LINK
	    QS0AFT = 0,AFT$,		!REVERSE POINTER PART OF QS0LINK
	QS0LEAF = 1,LH$,		!THE LEAF BEING SENT TO
	QS0GH = 1,RH$,			!THE GROUP HEADER OF THE GROUP
					! BEING SENT
	QS0MH = 2,LH$,			!THE MH OF THE LAST INCOMPLETE MESSAGE
	QS0FLAGS = 2,RH$,		!FLAGS
	    QS0SENT = 2, BIT(18)$,	! GROUP HAS BEEN ATTACHED TO A LEAF IF TRUE

! SEND QUEUE (SENDQ) DECLARATION
! MAP FORMAT SENDQ

	SQ0IMAHS(I) = I,WORD$,
	    SQ0FIMAH(I) = I,FORE$,	!PTR TO FIRST IMAH FOR THIS MPP
	    SQ0LIMAH(I) = I,AFT$,	!PTR TO LAST IMAH FOR THIS MPP

! RECV QUEUE (RECVQ) DECLARATION
! MAP FORMAT RECVQ

	R0GHS(I) = I,WORD$,
	    R0FGH(I) = I,FORE$,		!PTR TO FIRST GH BEING RECEIVED
	    R0LGH(I) = I,AFT$;		!PTR TO LAST GH BEING RECEIVED

BIND
!
! PAGE FORMAT DECLARATION
!
	P0FCN = 0,			!FUNCTION CODE
	P0STATUS = 1,			!STATUS CODE
	P0TSN = 2,			!TRANSACTION NUMBER
	P0PSWORD = 3,			!PASSWORD
	P0PRIM = 5,			!PRIMARY QUEUE NAME
	P0SUB1 = 8,			!SUB-QUEUE-1 NAME
	P0SUB2 = 11,			!SUB-QUEUE-2 NAME
	P0SUB3 = 14,			!SUB-QUEUE-2 NAME
	P0SRCE = 17,			!SOURCE
	P0DATE = 20,			!MESSAGE DATE
	P0TIME = 21,			!MESSAGE TIME
	P0TUC = 22,			!TEXT UNIT COUNT
	P0MGC = 23,			!MESSAGE GROUP COUNT
	P0MCLS = 24,			!MESSAGE CLASS
	P0DSCNT = 26,			!DESTINATION/ERROR COUNT
	P0CKSUM = 27,			!CHECKSUM
	P0DTAB = 106,			!DESTINATION TABLE,
					! (3 WORDS/ENTRY )
!
! DEFINATIONS OF END INDICATORS
!
	UNFINISHED = 0,
	ESI = 1,
	EMI = 2,
	EGI = 3,
	EPI = 4;

BIND	FIRSTRI = 6,
	LASTRI = PTLSIZE - 1 - FIRSTRI;

MACRO
	DM0NEXTMH = 0, RH$,
	DM0DATE = 1, WORD$,
	DM0TIME = 2, WORD$,
	DM0DSKGHADDR = 3, WORD$,
	DM0TSN = 4, WORD$,
	DM0SOT = 5, LH$,
	DM0ENDI = 5, RH$,			! NOTE ONLY 3 BITS NEEDED BY ENDI

	DM0RI(I) = FIRSTRI + I, WORD$,
	    DM0RICOUNT(I) = FIRSTRI + I, LH$,
	    DM0RIPTL(I) = FIRSTRI + I, RH$;



	COMMENT;
	! DISK GROUP HEADER HANDLERS
	! DATA STRUCTURE:

	MACRO
		DG0LINKS = 0, WORD$,		! LINKS TO
		    DG0NEXT = 0, FORE$,		!   NEXT AND
		    DG0PREV = 0, AFT$,		!   PREVIOUS PARTICLES
						!   IN THE DSKGHTABLE
		DG0LEAF = 1,RH$,		! THE LEAF THIS DSKGHTABLE PARTICLE BELONGS TO
		! UNUSED = 1, LH$,
		! UNUSED = 2, WORD$,
		! UNUSED = 3, WORD$,
		DG0ENTRY(I) = I * 4, WORD$,	! DSKGH ENTRIES IN THIS PARTICLE
						! NOTE: I STARTS WITH 1
		    DG0MH(I) = I * 4, RH$,	! POINTER TO THE FIRST MESSAGE HEADER OF A GROUP
		    ! UNUSED = I * 4, LH$,
		    DG0TSN(I) = I * 4 + 1, WORD$,	! TRANSACTION SEQUENCE NUMBER OF THIS GROUP
		    DG0SENDER(I) = I * 4 + 2, WORD$;	! SENDER OF THIS TRANSACTION
		    ! UNUSED = I * 4 + 3, WORD$;

	BIND
		DG0SIZE = 4,			! SIZE OF A DSKGHTAB ENTRY
		DG0MAX = PTLSIZE / DG0SIZE - 1;	! MAXIMUM INDEX TO A DSKGHTAB ENTRY

	! LEAF POINTER TABLE STRUCTURE:
	MACRO	DD0LEAF(I) = (I)/2, IF (I) THEN 0 ELSE 18, 18$;
	BIND	LEAFPERPTL = PTLSIZE * 2;

	BIND	NM0ENTRYSIZE = 2,
		NM0SIZE = 32;

	MACRO
		NM0GHADDR = 0, WORD$,
		NM0FIRST = 0, WORD$,
		NM0THIS = 0, WORD$,
		NM0NEXTMH = 1, RH$,
		NM0END0 = NM0SIZE - NM0ENTRYSIZE, WORD$,
		NM0END1 = NM0SIZE - NM0ENTRYSIZE + 1, WORD$;



! TRIM AND UNTRIM MACROS:
MACRO	TRIM(PTR) = XTRIM(PTR,1)$,
	UNTRIM(PTR) = XTRIM(PTR,0)$;




SWITCHES LIST;	!BACK ON FOR THE MODULE REQUIRING THIS

! END OF DATA.BLI