Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_1_19910112 - 7/ft3/monitor/stanford/gtdom.dif
There is 1 other file named gtdom.dif in the archive. Click here to see a list.

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 1



LINE 1, PAGE 1
1)	;[MACBETH.STANFORD.EDU]SRC:<7.FT3.MONITOR.STANFORD>GTDOM.MAC.158, 20-Aug-88 15:08:34, SRA
1)	; Change CALLX's in GETPAG and GIVPAG back to two-arg syntax, for some
1)	; reason the calls to ASGPGS and RELPGS don't get expanded to 30 bit
1)	; addresses.
1)	;XX:<CHIVES.BETA.SOURCE>GTDOM.MAC.157,  7-Aug-88 21:08:13, Edit by SRA
LINE 1, PAGE 1
2)	;[SRI-NIC]SRC:<6-1-MONITOR>GTDOM.MAC.91, 21-Sep-88 20:08:06, Edit by MKL
2)	; parse [a.b.c.d] format for .GTHSN
2)	
2)	;XX:<CHIVES.V1.SOURCE>GTDOM.MAC.165, 14-Sep-88 19:10:04, Edit by SRA
2)	; Update copyright notice and table of contents.
2)	;XX:<CHIVES.V1.SOURCE>GTDOM.MAC.164, 14-Sep-88 18:12:22, Edit by SRA
2)	; Mark Crispin requests that we don't depend on MSEC1 being set to
2)	; zero in non-extended monitor, so change CALLXX to handle that.
2)	;XX:<CHIVES.V1.SOURCE>GTDOM.MAC.163, 14-Sep-88 18:02:56, Edit by SRA
2)	; Comment out the REL6 conditionals so that we can stop fixing
2)	; this silliness.  Ten extra words of XSWAPCD doesn't matter.
2)	;XX:<CHIVES.WORK>GTDOM.MAC.162,  4-Sep-88 14:53:03, Edit by SRA
2)	; Add GTDX15 (version mismatch), add GTDX6 and GTDX15 to errors that
2)	; GD%STA translates to .GTDXT, since we hope they are temporary.
2)	; Clean up error handling: we no longer transmute temporary IPCF errors
2)	; into GTDX4, instead we assume that anybody who wants status uses
2)	; GD%STA and there we translate them to .GTDXT status code.
2)	;XX:<CHIVES.BETA.SOURCEC>GTDOM.MAC.161,  3-Sep-88 17:56:03, Edit by SRA
2)	; Add .GTDOS (Get OPSYS string from HINFO RR).  This is primarily
2)	; intended for the Stanford user FTP program, which likes to be clever
2)	; about setting defaults for several known operating system types.
2)	;XX:<CHIVES.BETA.SOURCE>GTDOM.MAC.160,  3-Sep-88 14:09:33, Edit by SRA
2)	; Add UE_ADM (authorization failure), not that we ever expect to see
2)	; it as part of a normal query.  Change 5.4/6.1/7.0 compatability
2)	; conditionals slightly so that the worst thing that will happen is
2)	; that GTDOM will end up in SWAPCD instead of XSWAPCD if compiled under
2)	; rel-5 and linked into a later version.
2)	;XX:<CHIVES.BETA.SOURCE>GTDOM.MAC.159,  2-Sep-88 00:23:53, Edit by SRA
2)	; Replace all uses of CALLX with a new macro, CALLXX, which does random
2)	; arithmetic to force LINK to do the right thing via polish fixup.
2)	;XX:<CHIVES.BETA.SOURCE>GTDOM.MAC.158,  1-Sep-88 22:32:16, Edit by SRA
2)	; Change CALLX's in GETPAG and GIVPAG back to two-arg syntax, LINK didn't
2)	; resolve these to 30-bit addresses. We may have to change all instances
2)	; of CALLX back and use an expicit switch for rel-7, depending on how
2)	; well the one-arg syntax works under rel-5 and rel-6.
2)	;XX:<CHIVES.BETA.SOURCE>GTDOM.MAC.157,  7-Aug-88 21:08:13, Edit by SRA

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 2



LINE 10, PAGE 2
1)	;  6.   Invoke resolver............................................... 13
1)	;  7.   Scheduler stuff............................................... 14
1)	;  8.   Address selection functions................................... 15
1)	;  9.   I/O routines.................................................. 16
1)	;  10.  Support routines.............................................. 20
1)	;  11.  IP Address desirability evaluation............................ 24
1)	;  12.  Class dependent stuff......................................... 25
1)	;
LINE 10, PAGE 2
2)	;  6.   Invoke resolver............................................... 14
2)	;  7.   Scheduler stuff............................................... 15
2)	;  8.   Address selection functions................................... 16
2)	;  9.   I/O routines.................................................. 18
2)	;  10.  Support routines.............................................. 23
2)	;  11.  IP Address desirability evaluation............................ 27
2)	;  12.  Class dependent stuff......................................... 28
2)	;


LINE 5, PAGE 3
1)	; Copyright (c) 1987 Massachusetts Institute of Technology.
1)	;
LINE 5, PAGE 3
2)	; Copyright (c) 1987,1988 Massachusetts Institute of Technology.
2)	;


LINE 22, PAGE 4
1)	; 5.4/6.1 compatability
1)	IFNDEF	XSWAPCD,<DEFINE XSWAPCD <SWAPCD>>
1)	IFNDEF	XNENT,<DEFINE XNENT(NAME,G) <
1)		NAME:
1)		IFNB <G>,<INTERN NAME>
1)	>>
1)	IFNDEF	CALLX,<DEFINE CALLX(FOO,BAR) <
1)		CALL BAR
1)	>>
1)	
1)	; Make this as swappable as we can.  Not exactly part of the core
1)	; of the operating system, after all.
1)		XSWAPCD
1)	
1)	; Use default host address prioritizing routine by default
1)	IFNDEF DHPRSW,<DHPRSW==-1>
LINE 22, PAGE 4
2)	; 5.4/6.1/7.0 compatability.  Use SWAPCD if we haven't heard of XSWAPCD.
2)	IFNDEF XSWAPCD,<		;; If we don't know about XSWAPCD,
2)		DEFINE XSWAPCD <SWAPCD>	;;  use regular SWAPCD

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 3


2)		DEFINE XNENT(NAME,G) <	;;  and do SWAPCD entry points.
2)			SWAPCD
2)			NAME:
2)			IFNB <G>,<INTERN NAME>
2)		>
2)	>;IFNDEF XSWAPCD
2)	
2)	; CALLXX is like CALLX but hairier because we want to generate .REL
2)	; files that can be linked with any version of the monitor.
2)	;
2)	; NB: CALLXX depends on LINK evaluating the expression <0/0> as zero.
2)	DEFINE CALLXX(FOO) <		;; Polish to add section number to local addrs
2)		MOVE CX,[FOO!<<1-<<FOO&<-1,,0>>/<FOO&<-1,,0>>>>*<MSEC1,,0>>]
2)		CALL (CX)		;; Index instead of indirect
2)	>;DEFINE CALLXX
2)	
2)	; Make this as swappable as we can.  Not exactly part of the core
2)	; of the operating system, after all.
2)		XSWAPCD
2)	
2)	; Use default host address prioritizing routine by default.
2)	IFNDEF DHPRSW,<DHPRSW==-1>


LINE 37, PAGE 5
1)		    XCTU [HRRZM T3,1]	; Yes, put status code in user AC1
1)		    HRRZM T1,LSTERR	; Put error where user can find it
1)		  ENDDO.		; T3 <> 0 iff want skip return
LINE 37, PAGE 5
2)		    HRRZM T1,LSTERR	; Yes, put error where user can find it
2)		    XCTU [HRRZM T3,1]	; And put status code in user AC1
2)		  ENDDO.		; T3 <> 0 iff want skip return


LINE 36, PAGE 6
1)	GTDMAX:!DEPHASE			; Number of functions in table
LINE 36, PAGE 6
2)	T	 GTDOS			; (23) Get opsys name
2)	GTDMAX:!DEPHASE			; Number of functions in table


LINE 46, PAGE 6
1)	; Table of errors that are converted to success and status code
1)	; by calls with GD%STA turned on.  Table is sorted by likelyhood.
1)	
1)	GTDSTA:	XWD	GTDX4,  .GTDXT	; Timeout, any flavor
1)		XWD	GTDX2,  .GTDXN	; Bad name
LINE 47, PAGE 6
2)	; Table of errors that are converted to success and status code by
2)	; calls with GD%STA turned on.  Table is sorted by likelyhood.
2)	; Includes IPCF errors that we consider temporary, ie, indications

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 4


2)	; that the resolver is just out to lunch.  List terminated with a zero
2)	; word.
2)	
2)	GTDSTA:	XWD	GTDX4,  .GTDXT	; Timeout
2)		XWD	GTDX2,  .GTDXN	; Bad name


LINE 55, PAGE 6
1)		0			; End of list
LINE 59, PAGE 6
2)		XWD	IPCF27,	.GTDXT	; Resolver's pid is not defined
2)		XWD	IPCFX4,	.GTDXT	; Receiver's PID invalid
2)		XWD	IPCFX5,	.GTDXT	; Receiver's PID disabled
2)		XWD	IPCFX6,	.GTDXT	; Sender's quota exceeded
2)		XWD	IPCFX7,	.GTDXT	; Receiver's quota exceeded
2)		XWD	IPCFX8,	.GTDXT	; IPCF free space exhausted
2)		XWD	IPCF12,	.GTDXT	; No free PIDs available
2)		XWD	IPCF13,	.GTDXT	; PID quota exceeded
2)		XWD	IPCF14,	.GTDXT	; No PIDs available to this job
2)		XWD	IPCF15,	.GTDXT	; No PIDs available to this proccess
2)		XWD	GTDX6,	.GTDXT	; Internal error in GTDOM% or resolver
2)		XWD	GTDX15,	.GTDXT	; Bad version, special case of internal error
2)		0			; End of list


LINE 4, PAGE 8
1)		 RETBAD (GTDX4)		; No resolver, data not available
1)		CALL GETPAG		; Get a JSB page for IPCF
LINE 4, PAGE 8
2)		 RETBAD (IPCF27)	; No resolver, data not available
2)		CALL GETPAG		; Get a JSB page for IPCF


LINE 6, PAGE 9
1)		 RETBAD (GTDX4)		; Nope, data not available
1)		CALL GETPAG		; Get a JSB page for IPCF
LINE 6, PAGE 9
2)		 RETBAD (IPCF27)	; Nope, data not available
2)		CALL GETPAG		; Get a JSB page for IPCF


LINE 21, PAGE 9
1)		MOVE T1,P3		; QCLASS = whatever
LINE 21, PAGE 9
2)	IFN NICSW,<
2)		HRRZ T2,P1		; Get function code
2)		CAIE T2,.GTHSN		; Want normal string to number?
2)		IFSKP.
2)		 MOVX T1,<POINT KCCBSZ,U.PHSIZ+U.DHSIZ(MSG)>
2)		 ILDB T2,T1		;get first label count
2)		 ILDB T2,T1		;get first char of first label

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 5


2)		 CAIE T2,"["		;open bracket for [a.b.c.d] format?
2)		 IFSKP.
2)		  CALL PRSINM		;yes, go parse it then
2)		  IFSKP.
2)		   MOVE P3,T4		;if won, save address to return
2)		   MOVE T1,T4		;for gsbits
2)		   CALL GSBITS		;get host status bits
2)		   RETSKP		;and win
2)		  ENDIF.
2)		 ENDIF.
2)		ENDIF.	
2)	>;IFN NICSW
2)		MOVE T1,P3		; QCLASS = whatever


LINE 1, PAGE 10
1)	; Function .GTHMX(15), Look up mail agent forwarding info.
LINE 1, PAGE 10
2)	IFN NICSW,<
2)	;parse a number in internet format [a.b.c.d].
2)	;opening bracket already read.  string in compressed format.
2)	;pointer to string in ac1.  
2)	;retskp's on success with host number in ac4.
2)	PRSINM:	MOVEI T3,^D10		;decimal
2)		NIN%			;1st byte
2)		 ERJMP R
2)		SETZ T4,		;accumulate host number here
2)		DPB T2,[POINT 8,T4,11]
2)		LDB T2,T1		;get terminator
2)		CAILE T2,3		;next label can only be 3 digits
2)		 RET			;no, fail
2)		NIN%			;2nd byte
2)		 ERJMP R
2)		DPB T2,[POINT 8,T4,19]
2)		LDB T2,T1		;get terminator
2)		CAILE T2,3		;next label can only be 3 digits
2)		 RET			;no, fail
2)		NIN%			;3rd byte
2)		 ERJMP R
2)		DPB T2,[POINT 8,T4,27]
2)		LDB T2,T1		;get terminator
2)		CAILE T2,4		;next label can only be 3 digits (plus bracket)
2)		 RET			;no, fail
2)		NIN%			;4th byte
2)		 ERJMP R
2)		DPB T2,[POINT 8,T4,35]
2)		LDB T2,T1		;get terminator
2)		CAIE T2,"]"		;end bracket?  
2)		 RET			;no, fail
2)		ILDB T2,T1		;get null terminator
2)		SKIPE T2		;was it?

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 6


2)		 RET			;no, fail
2)		RETSKP
2)	>;IFN NICSW
   {Skipped 1 page and 1 line}
2)	; Function .GTHMX(15), Look up mail agent forwarding info.


LINE 18, PAGE 10
1)		 RETBAD (GTDX4)		; Nope, data not available
1)		CALL GETPAG		; Get a JSB page for IPCF
LINE 19, PAGE 11
2)		 RETBAD (IPCF27)	; Nope, data not available
2)		CALL GETPAG		; Get a JSB page for IPCF


LINE 4, PAGE 11
1)		 RETBAD (GTDX4)		; Nope, data not available
1)		CALL GETPAG		; Get a JSB page for IPCF
LINE 4, PAGE 12
2)		 RETBAD (IPCF27)	; Nope, data not available
2)		CALL GETPAG		; Get a JSB page for IPCF


LINE 4, PAGE 12
1)		 RETBAD (GTDX4)		; Nope, data not available
1)		CALL GETPAG		; Get a JSB page for IPCF
LINE 4, PAGE 13
2)		 RETBAD (IPCF27)	; Nope, data not available
2)		CALL GETPAG		; Get a JSB page for IPCF


LINE 1, PAGE 13
1)	^L	SUBTTL Invoke resolver
LINE 1, PAGE 14
2)	; Function .GTDOS(23), Get operating system from HINFO for host (for FTP)
2)	
2)	$GTDOS:	SKIPN .SPRSV+SPIDTB	; Have PID for resolver?
2)		 RETBAD (IPCF27)	; Nope, data not available
2)		CALL GETPAG		; Get a JSB page for IPCF
2)		 RETBAD (IOX7)		; Can't, pass failure up
2)		MOVE F,P4		; Get QCLASS
2)		TXNN P1,GD%QCL		; QCLASS specified?
2)		 MOVX F,QC.IN		; No, use Internet
2)		TLC P2,-1		; Fix up HRROI style pointer
2)		TLCN P2,-1
2)		 HRLI P2,(POINT 7,)
2)		MOVE T1,P2		; Read in name user specified
2)		MOVX T2,<POINT KCCBSZ,U.PHSIZ+U.DHSIZ(MSG)>
2)		MOVX T3,<<PAGSIZ-U.PHSIZ-U.DHSIZ>*KCCBPW>
2)		MOVE T4,[XCTBU [ILDB T2,T1]]
2)		CALL ATOD

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 7


2)		 RETBAD ()		; Lost, pass error back up
2)		MOVE P2,T1		; Restore updated pointer
2)		MOVE T1,F		; QCLASS = whatever
2)		MOVX T2,QT.HINFO	; QTYPE = Host INFOrmation
2)		MOVX T3,0		; Flags
2)		SKIPE T4		; Did name end with a dot?
2)		 TXO T3,UF.EMO		; Yes, exact match required
2)		CALL RESOLV		; Go ask the resolver
2)		 RETBAD ()		; Lost, punt
2)		XMOVEI Q1,U.PHSIZ+U.DHSIZ(MSG)	; Point at first RR
2)		SETZ Q2,			; No good data seen yet
2)		LOAD Q3,COUNT,+U.PHSIZ(MSG)	; Count of RRs
2)		DO.			; Look at all addresses
2)		  SOJL Q3,ENDLP.	; Exit if no RRs left
2)		  XMOVEI T1,PAGSIZ(MSG)	; Make sure this RR doesn't fall
2)		  OPSTR <SUB T1,>,LENGTH,(Q1)	; off the message page
2)		  CAMG T1,Q1		; If it does, exit loop
2)		   EXIT.
2)		  LOAD T1,CLASS,(Q1)	; Get RR class
2)		  LOAD T2,TYPE,(Q1)	; and type
2)		  CAMN T1,F		; Must be type HINFO and right class
2)		  CAIE T2,QT.HINFO
2)		  IFSKP.		; It is
2)		    SKIPE Q2		; More than one HINFO for this name?
2)		     RETBAD (GTDX7)	; Yes, "received data inconsistant"
2)		    XMOVEI Q2,U.RHSIZ(Q1)
2)		  ENDIF.		; Otherwise remember address of RDATA
2)		  OPSTR <ADD Q1,>,LENGTH,(Q1)
2)		  LOOP.			; Next RR
2)		ENDDO.
2)		SKIPN Q2		; Did we find anything?
2)		 RETBAD (GTDX6)		; No, resolver is losing
2)		TLC P3,-1		; Fix up HRROI style pointer
2)		TLCN P3,-1
2)		 HRLI P3,(POINT 7,)
2)		MOVE T1,P3		; Write out opsys string
2)		MOVX T2,<POINT KCCBSZ,(MSG)>
2)		ADD T2,HINF.OS(Q2)
2)		MOVX T3,<PAGSIZ*KCCBPW>
2)		SUB T3,HINF.OS(Q2)
2)		MOVE T4,[XCTBU [IDPB T2,T1]]
2)		CALL STOA
2)		 RETBAD ()		; Lost, pass error back up
2)		MOVE P3,T1		; Restore updated pointer
2)		RETSKP			; Return win
2)	
2)	^L	SUBTTL Invoke resolver

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 8



LINE 68, PAGE 14
1)		 RETBAD (GTDX4)		; Error, data not available
1)		MOVEM T1,.IPCFR+PDB
LINE 68, PAGE 15
2)		 RETBAD (IPCF27)	; Error, data not available
2)		MOVEM T1,.IPCFR+PDB


LINE 81, PAGE 14
1)		ELSE.			; MSEND% lost, check error code
1)		  SETZ T2,		; Loop index
1)		  DO.			; Check list of temporary errors
1)		    SKIPN T3,GDETMP(T2)	; Get an error code
1)		     EXIT.		; End of list, done
1)		    CAME T1,T3		; Does this error match a temporary error?
1)		     AOJA T2,TOP.	; No, loop for next
1)		    MOVX T1,GTDX4	; Match, fake "data not available" instead
1)		  ENDDO.
1)		ENDIF.
LINE 81, PAGE 15
2)		ENDIF.


LINE 103, PAGE 14
1)		  CALLX (,PDWTCK)	; See if it's ok to hang on it
1)		  IFSKP.		; It is, we are committed to dismiss
1)		    MOVE T1,FORKX	; Our fork index
1)	IFE REL6,<			; Rel 5 workaround
1)		    MOVE T2,FKSTA2(T1)	; Get current contents
1)		    MOVEM T2,OFKSTA	; Save it since TOPS-20 doesn't
1)	>;IFE REL6
1)		    MOVE T2,MYTMO	; Our timeout
LINE 94, PAGE 15
2)		  CALLXX PDWTCK		; See if it's ok to hang on it
2)		  IFSKP.		; It is, we are committed to dismiss
2)		    MOVE T1,FORKX	; Our fork index
2)	;IFE REL6,<			; Rel 5 workaround
2)		    MOVE T2,FKSTA2(T1)	; Get current contents
2)		    MOVEM T2,OFKSTA	; Save it since TOPS-20 doesn't
2)	;>;IFE REL6
2)		    MOVE T2,MYTMO	; Our timeout

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 9



LINE 114, PAGE 14
1)		    CALLX (,PDWTCL)	; Clear PIDFW
1)	IFE REL6,<			; Rel 5 workaround
1)		    MOVE T1,FORKX	; Our fork index
1)		    MOVE T2,OFKSTA	; Get stuff TOPS-20 should have saved
1)		    MOVEM T2,FKSTA2(T1)	; Put it back where TCP code expects it
1)	>;IFE REL6
1)		  ELSE.			; Couldn't hang on our PID, look at reason
LINE 105, PAGE 15
2)		    CALLXX PDWTCL	; Clear PIDFW
2)	;IFE REL6,<			; Rel 5 workaround
2)		    MOVE T1,FORKX	; Our fork index
2)		    MOVE T2,OFKSTA	; Get stuff TOPS-20 should have saved
2)		    MOVEM T2,FKSTA2(T1)	; Put it back where TCP code expects it
2)	;>;IFE REL6
2)		  ELSE.			; Couldn't hang on our PID, look at reason


LINE 134, PAGE 14
1)		   RETBAD (GTDX4)	; in case it got blown away
1)		  MRECV%		; Receive a message
LINE 125, PAGE 15
2)		   RETBAD (IPCF27)	; in case it got blown away
2)		  MRECV%		; Receive a message


LINE 144, PAGE 14
1)		   RETBAD (GTDX4)	; Paranoia
1)		  CAME T1,.IPCFS+PDB	; Ignore message if it wasn't
LINE 135, PAGE 15
2)		   RETBAD (IPCF27)	; Paranoia
2)		  CAME T1,.IPCFS+PDB	; Ignore message if it wasn't


LINE 153, PAGE 14
1)		 RETBAD (GTDX6)		; We're not, give up
1)		LOAD T1,STATE,(MSG)	; Check what kind of message this is
LINE 144, PAGE 15
2)		 RETBAD (GTDX15)	; We're not, give up
2)		LOAD T1,STATE,(MSG)	; Check what kind of message this is

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 10



LINE 169, PAGE 14
1)		CAIL T1,GDEMIN		; Less than min?
1)		CAIL T1,GDEMAX		; In range of known errors?
1)		 SETZ T1,		; No, use default error code
1)		MOVE T1,GDETAB(T1)	; Get TOPS-20 error code for it
1)		RET			; Losing return
1)		ENDSV.			; Close scope of STKVAR
1)	
1)	; IPCF errors that we consider temporary, ie, indications that the
1)	; resolver is just out to lunch.  List terminated with a zero word.
1)	GDETMP:	EXP IPCFX4,IPCFX5,IPCFX7,IPCF12,IPCF13,IPCF14,IPCF15,0
1)	
1)	; Resolver "user" protocol errors, see USRDEF.D for error codes.
1)	
1)	; Macro to define an error entry
1)	DEFINE	DEFERR(JCODE,UCODE) <
1)		IFN <.-UCODE>,<
1)			PRINTX ? GDETAB out of order at JCODE, UCODE
1)		>
1)		JCODE
1)	>
1)	
1)	GDETAB:	PHASE 0			; Check positions of errors
1)		DEFERR(GTDX6, 0)	; Unknown error code from resolver!
1)	GDEMIN:!			; Minimum resolver error
1)		DEFERR(GTDX2, UE.NAM)	; Name does not exist (authoritative answer)
1)		DEFERR(GTDX3, UE.NRR)	; No RRs match name (authoritative answer)
1)		DEFERR(GTDX6, UE.SYS)	; System error.
1)		DEFERR(GTDX6, UE.NIY)	; Not Implemented Yet.
1)		DEFERR(GTDX4, UE.TMO)	; Timeout while resolving query.
1)		DEFERR(GTDX4, UE.RBK)	; Resolving in background.
1)		DEFERR(GTDX10,UE.TMC)	; Too Many CNAMEs.
1)		DEFERR(GTDX6, UE.ACK)	; ACKnowledgement (CTL messages only).
1)		DEFERR(GTDX6, UE.ARG)	; Arguments invalid.
1)		DEFERR(GTDX4, UE.DNA)	; Data Not Available.
1)		DEFERR(GTDX6, UE.NOP)	; An error the resolver ignores (internal use only).
1)	GDEMAX:!DEPHASE			; Max error returned by resolver
1)		PURGE	DEFERR		; Clean up
   {Skipped 1 page and 1 line}
1)	SUBTTL	Scheduler stuff
LINE 160, PAGE 15
2)		SKIPL T1		; In range of known errors?
2)		CAILE T1,UE.MAX
2)		 SETZ T1,		; No, use default error code
2)		MOVE T1,UE$TAB(T1)	; Get TOPS-20 error code for it
2)		RET			; Losing return
2)		ENDSV.			; Close scope of STKVAR
2)	
2)	; Resolver "user" protocol errors, see USRDEF.D for error codes.

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 11


2)	
2)	; Macro to define an error entry
2)	DEFINE	DEF$UE(JCODE,UCODE) <
2)		IFN <.-UCODE>,<
2)			PRINTX ? UE$TAB out of order at JCODE, UCODE
2)		>
2)		JCODE
2)	>
2)	
2)	UE$TAB:	PHASE 0			; Check positions of errors
2)		DEF$UE(GTDX6, 0)	; Unknown error code from resolver!
2)		DEF$UE(GTDX2, UE.NAM)	; Name does not exist (authoritative answer)
2)		DEF$UE(GTDX3, UE.NRR)	; No RRs match name (authoritative answer)
2)		DEF$UE(GTDX6, UE.SYS)	; System error.
2)		DEF$UE(GTDX6, UE.NIY)	; Not Implemented Yet.
2)		DEF$UE(GTDX4, UE.TMO)	; Timeout while resolving query.
2)		DEF$UE(GTDX4, UE.RBK)	; Resolving in background.
2)		DEF$UE(GTDX10,UE.TMC)	; Too Many CNAMEs.
2)		DEF$UE(GTDX6, UE.ACK)	; ACKnowledgement (CTL messages only).
2)		DEF$UE(GTDX6, UE.ARG)	; Arguments invalid.
2)		DEF$UE(GTDX4, UE.DNA)	; Data Not Available.
2)		DEF$UE(GTDX6, UE.NOP)	; "No-op" error (internal resolver use only).
2)		DEF$UE(GTDX6, UE.ADM)	; Administrative (authorization) error
2)	IFN <.-UE.MAX-1>,<PRINTX ? UE$TAB length error
2)	>
2)		DEPHASE			; End of table
2)		PURGE DEF$UE		; Clean up
   {Skipped 1 page and 1 line}
2)	SUBTTL	Scheduler stuff


LINE 31, PAGE 15
1)		CALLX (,PDWTCK)		; Set up PDFKTB, ok for us to dismiss?
1)		IFNSK.			; No, we don't want to dismiss...
LINE 31, PAGE 16
2)		CALLXX PDWTCK		; Set up PDFKTB, ok for us to dismiss?
2)		IFNSK.			; No, we don't want to dismiss...


LINE 37, PAGE 15
1)	IFE REL6,<			; Rel 5 workaround
1)		PUSH P,FKSTA2(T1)	; Preserve in case we're running at PSI level
1)	>;IFE REL6
1)		ADD P3,TODCLK		; Compute wakeup time
LINE 37, PAGE 16
2)	;IFE REL6,<			; Rel 5 workaround
2)		PUSH P,FKSTA2(T1)	; Preserve in case we're running at PSI level
2)	;>;IFE REL6
2)		ADD P3,TODCLK		; Compute wakeup time

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 12



LINE 50, PAGE 15
1)		CALLX (,PDWTCL)		; Clear PIDFW
1)	IFE REL6,<			; Rel 5 workaround
1)		MOVE T1,FORKX		; Restore in case we are running at PSI level
1)		POP P,FKSTA2(T1)	; with a TCP scheduler dismiss at MP level
1)	>;IFE REL6
1)		RETSKP			; Return success always
LINE 50, PAGE 16
2)		CALLXX PDWTCL		; Clear PIDFW
2)	;IFE REL6,<			; Rel 5 workaround
2)		MOVE T1,FORKX		; Restore in case we are running at PSI level
2)		POP P,FKSTA2(T1)	; with a TCP scheduler dismiss at MP level
2)	;>;IFE REL6
2)		RETSKP			; Return success always


LINE 1, PAGE 22
1)	SUBTTL	Support routines
LINE 1, PAGE 23
2)	; STOA -- convert domain format string to asciz string.
2)	;
2)	; Accepts:
2)	;  T2/ Source byte pointer
2)	;  T3/ Size of destination buffer in bytes
2)	;  T4/ Instruction which will store a byte from T2
2)	;
2)	; Returns:
2)	; +1 on error
2)	;  T1/ Error code
2)	; +2 on success
2)	;  T2/ Updated pointer
2)	;  T3/ Updated count
2)	;
2)	; Does not use T1, P, or Q registers, so store instruction can reference these.
2)	; If opcode of store instruction is not JSYS, will write a null byte after end
2)	; of string, preserving T1 across this write operation, so T1 is the right 
2)	; place to put a byte pointer if you want it preserved this way.
2)	
2)	STOA:	STKVAR <SRCBP,CNT,STORE>
2)		MOVEM T2,SRCBP		; Save arguments
2)		MOVEM T3,CNT
2)		MOVEM T4,STORE
2)		ILDB T3,SRCBP		; Get length of string
2)		DO.
2)		  SOJL T3,ENDLP.	; Exit loop if end of source string
2)		  ILDB T2,SRCBP		; Get one char
2)		  SOSG CNT		; Check for room
2)		   RETBAD (GTDX8)	; Overflow, punt
2)		  XCT STORE		; Write it

; GTDOM.MAC.158 & <MONITOR>GTDOM.MAC.1 24-Feb-89 1718	PAGE 13


2)		   ERJMP UWIOX
2)		  LOOP.
2)		ENDDO.			; End of string
2)		HLRZ T3,STORE		; Get store instruction opcode
2)		CAIN T3,(JSYS)		; Is it a JSYS?
2)		IFSKP.			; Nope, have to write null byte	
2)		  SOSG CNT		; Check for room
2)		   RETBAD (GTDX8)	; Drat and double drat
2)		  MOVE T3,T1		; Save T1 across null byte output
2)		  SETZ T2,		; A null byte
2)		  XCT STORE		; Write it
2)		   ERJMP UWIOX		; Gack
2)		  MOVE T1,T3		; Put T1 back
2)		ENDIF.			; Done with null byte
2)		MOVE T2,SRCBP		; Get return values
2)		MOVE T3,CNT
2)		RETSKP			; Return success
2)		ENDSV.			; Close scope of STKVAR
   {Skipped 1 page and 1 line}
2)	SUBTTL	Support routines


LINE 14, PAGE 22
1)		CALLX (MSEC1,ASGPGS)	; Assign page from free space
1)		IFNSK.
LINE 15, PAGE 24
2)		CALLXX ASGPGS		; Assign page from free space
2)		IFNSK.


LINE 31, PAGE 22
1)		CALLX (MSEC1,RELPGS)	; Release it
1)		RET			; Done
LINE 32, PAGE 24
2)		CALLXX RELPGS		; Release it
2)		RET			; Done