Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_3_19910112 - mit/monitor/ch.dif
There are no other files named ch.dif in the archive.
;COMPARISON OF SSY:<BERLIN.M5>OLDCHAOS.MAC.1 AND SSY:<BERLIN.M5>CHAOS.MAC.17
;OPTIONS ARE    /3

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 1-1 (0)
;<SYS.MONITOR>CHAOS.MAC.427, 20-Jul-82 19:23:05, Edit by JTW
;282 MMcM's fix for overly large packet numbers
;<SYS.MONITOR>CHAOS.MAC.426, 18-Jul-82 05:31:21, Edit by JTW
;281 DCP's fix for incoming packets occasionally not processed
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 1-1 (0)
;<BERLIN.M5>CHAOS.MAC.17, 24-Sep-82 02:22:45, Edit by BERLIN
;1032 Comment out unreachable code
;<BERLIN.M5>CHAOS.MAC.16, 22-Sep-82 15:04:32, Edit by BERLIN
;1031 Old (?) way of handling EOF
; Turn off debugging - CHABDP leaves junk in syserr block and
;  causes ILLUUO when referenced.  Need to fix some bugs soon.
;1017 Also make this bug go away for the time being...
;<BERLIN>CHAOS.MAC.12, 24-Aug-82 21:56:47, Edit by BERLIN
;1016 Turn on debugging for a while...
;  The problem is that apparently a connection block is getting
;  used after it is released.  The latest bughlt (piptr1) came
;  at CHIDT9, when CHAPBF was -1, and PKT check wants 0 for empty q
;<BERLIN.M5>CHAOS.MAC.9, 21-Aug-82 23:07:50, Edit by BERLIN
;1014 Real check for empty q (How did this ever work???)
;1005 Force BBNFLG to 0 for MIT, remove gatinc,gattdnc
;<BERLIN.M5>CHAOS.MAC.5, 10-Aug-82 09:36:49, Edit by BERLIN
;1004 Remove support for receiving packets from the Arpanet
;<5.MITMON>CHAOS.MAC.4, 21-Jul-82 19:57:49, Edit by JTW
;1003 MMcM's fix for retrans problem with big packet numbers,
; DCP's fix for input packets sometimes not noticed
;<BERLIN.M5>CHAOS.MAC.3,  5-Jul-82 12:36:11, Edit by BERLIN
;1002 Remove arpa routing again
;<SYS.MONITOR>CHAOS.MAC.429,  5-Jul-82 01:30:36, Edit by BERLIN
;1000 V5 merge
;Fixes and changes from TAPPAN@BBN:
 ;<BBN-4-MONITOR>CHAOS.MAC.18, 10-Jan-82 17:47:31, Edit by TAPPAN
 ; Make CHGETP save temporaries to fix problem with T3 getting
 ; clobbered from GETINP
 ;<BBN-4-MONITOR>CHAOS.MAC.10, 18-Nov-81 19:00:57, Edit by TAPPAN
 ; Fixes to internet code, involving the fact that we
 ; can't call GETBLK while NOSKED
 ;[BBND]SNARK:<TAPPAN.4>CHAOS.MAC.26, 27-Oct-81 12:39:01, Ed: TAPPAN
 ; Make internet stuff work, some cleanup to NOSKDP/OKSKDP
 ; CHXINT cannot send packets if called from schedular context
;<SYS.MONITOR>CHAOS.MAC.427,  9-Apr-82 09:30:26, Edit by BERLIN
;284 Add up to 64 subnets and remove routing to LLL subnets
;284 because it's still buggy and I don't have time to support it.
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 3-3 (10689)
IFN ARPAF,<SEARCH IMPPAR>
IFNDEF FRNDLY,<FRNDLY==0>	;FRIENDLY HOST SUPPORT CODE
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 3-4 (12513)
	BBNFLG=0		;1005 BBNFLG is 0 at MIT
;1000 Setup default parameter switches
DEFINE NDG (SYM,VAL)<
   IFNDEF SYM,<
	SYM==:VAL>>
NDG ARPAF,0			; Arpaanet packetizing
NDG CHINET,0			; Internet packetizing
NDG MNET,0			; Multinet system
NDG BBNFLG,0			; BBN monitor mods
NDG F3FLG,0			; Foonly processor
NDG KLFLG,0			; KL processor
NDG SMFLG,0			; 2020 processor
NDG T20FLG,0			; TOPS-20 monitor
NDG TNXFLG,0			; TENEX monitor
NDG NETDTE,-1			;DEFAULT IS NO DTE USAGE
NDG FRNDLY,0			; friendly host support code
;;;DEBUGGING/METERING SETTINGS
NDG CHSDBG,0			;DEBUGGING OFF BY DEFAULT
NDG CHSMTR,0			;METERING OFF BY DEFAULT
;1000 End Addition
IFN ARPAF,<SEARCH IMPPAR>
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 3-13 (10849)
;;;DEBUGGING/METERING SETTINGS
chsdbg==0			;252 Turn off debugging for CHAOS
IFNDEF CHSDBG,<CHSDBG==-1>	;DEBUGGING ON BY DEFAULT
IFNDEF CHSMTR,<CHSMTR==0>	;METERING OFF BY DEFAULT
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 3-35 (13281)
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 3-88 (13321)
	EXTN <GATINC,GATDNC>
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 3-105 (15567)
;1005	EXTN <GATINC,GATDNC>
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 3-154 (14917)
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 3-171 (17168)
IFGE NETDTE,<			;1000
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 3-159 (15111)
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 3-176 (17383)
> ;1000 end IFGE NETDTE
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 4-11 (17846)
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 4-11 (20145)
IFN CHINET,<
	SETOM CHPKTI		; Hold off on internet buffer pointer
>
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 4-22 (18203)
	SETOM MYCHAD		;INDICATE WE DON'T KNOW OUR HARDWARE ADDRESS YET
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 4-25 (20573)
IFG NETDTE,<
	SETOM MYCHAD		; WE DON'T KNOW OUR HARDWARE ADDRESS YET
>
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 9-8 (28323)
	JUMPE T3,[MOVX T2,SC%WHL!SC%OPR!SC%NWZ!SC%NAS ;YES, CHECK CAPAS
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 9-8 (30702)
	JUMPE T3,[
IFE BBNFLG,<
		MOVX T2,SC%WHL!SC%OPR!SC%NWZ!SC%NAS ;YES, CHECK CAPAS
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 9-12 (28534)
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 9-14 (30931)
>
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 10-75 (33762)
	SETOM CHAPBF(CONN)	;MARK THIS Q AS INACTIVE NOW
	MOVEI Q2,CHAIBF(CONN)	;INPUT BUFFERS
	CALL CHALFR
	SETOM CHAIBF(CONN)	;THIS Q IS INACTIVE
	CALL CHALFO
	SETOM CHAOBF(CONN)	;DITTO
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 10-75 (36162)
;1017	SETOM CHAPBF(CONN)	;MARK THIS Q AS INACTIVE NOW
	SETZM CHAPBF(CONN)	;1017 MARK THIS Q AS INACTIVE NOW
	MOVEI Q2,CHAIBF(CONN)	;INPUT BUFFERS
	CALL CHALFR
;1017	SETOM CHAIBF(CONN)	;THIS Q IS INACTIVE
	SETZM CHAIBF(CONN)	;1017 THIS Q IS INACTIVE
	CALL CHALFO
;1017	SETOM CHAOBF(CONN)	;DITTO
	SETZM CHAOBF(CONN)	;1017 DITTO
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 12-35 (38834)
;281 CHTCDN: SETOM CHATTW	;DONE, CLEAR OUT QUEUE
				;281 Now cleared by EXCH CONN,(Q2) above
CHTCDN:	RET			;281  so just return
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 12-35 (41383)
;1003 CHTCDN: SETOM CHATTW	;DONE, CLEAR OUT QUEUE
				;1003 NOW CLEARED BY EXCH CONN,(Q2) ABOVE
CHTCDN:	RET			;1003  SO JUST RETURN
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 15-33 (43563)
	PUSH P,T1		;SAVE BYTE POINTER
	CALL CHGETP		;GET THIS PACKET, DO ACKING, ETC.
	 JRST [	ADJSP P,-1	;FLUSH BP
		JRST GETIN4 ]	;OOPS, NO MORE, JUST RETURN
	POP P,T1		;GET BACK BYTE POINTER
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 15-33 (46115)
	CALL CHGETP		;GET THIS PACKET, DO ACKING, ETC.
	 JRST GETIN4		;1000 CHGETP preserves temps now
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 15-61 (44523)
CHGETP:	CALL NOSKDP		;LOCK THIS UP
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 15-58 (46981)
CHGETP:	SAVET			;1000 Save temps here
	CALL NOSKDP		;LOCK THIS UP
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 15-73 (44916)
;HANDLE ACK OF DATA AND EOF PACKETS; REMEMBER WE'VE SEEN AN EOF PACKET IF SO FOR
;STREAM I/O'S SAKE.
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 15-71 (47406)
;HANDLE ACK OF DATA AND EOF PACKETS;
; REMEMBER WE'VE SEEN AN EOF PACKET IF SO FOR STREAM I/O'S SAKE.
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 18-283 (57950)
	HRRZ T2,CHAWIN(CONN)	;PICK UP CURRENT XMIT WINDOW
	CAMG T2,CHANOS(CONN)	;SEE IF STILL THINGS TO BE ACK'ED
	 JRST [	ADJSP P,-1	;NO, GET OUT
		RETSKP ]
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 18-283 (60441)
;1031 Someboy changed this without an edit history.  I don't know which works.
repeat 0,<
	HRRZ T2,CHASTA(CONN)
	CAIE T2,.CSOPN		;STILL OPEN?
	 JRST MTONO1		;NO, DON'T WAIT
	HLRZ T2,CHAOBF(CONN)	;GET HEAD OF CONNECTION OUTPUT PACKET LIST
	JUMPE T2,MTONO1		;EMPTY, DON'T WAIT
>
repeat 1,<
	HRRZ T2,CHAWIN(CONN)	;PICK UP CURRENT XMIT WINDOW
	CAMG T2,CHANOS(CONN)	;SEE IF STILL THINGS TO BE ACK'ED
	 JRST MTONO1		;NO, DON'T WAIT
>
;1031 End of ambiguity
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 19-2 (58244)
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 18-302 (61044)
MTONO1:	ADJSP P,-1		;GET OUT
	RETSKP
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 19-10 (58419)
	MOVEI T1,1		;WE NEED PRIORITY, STAY IN HIGHEST Q
	MOVEM T1,JOBBIT
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 19-10 (61261)
IFE BBNFLG,<
	MOVEI T1,1		;WE NEED PRIORITY, STAY IN HIGHEST Q
	MOVEM T1,JOBBIT
>
IFN BBNFLG,<
	CALL SETSPQ		; Special Q for high priority
>
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 19-75 (60754)
	CAIN T1,1		;SOME PHONY XMIT-ACTIVE FLAG?
	 CAIE T1,-1		; OR NON-LINKED MARKER?
	 CAIA			;NO AND NO
	 CHABUG(CHSLCR)		;YES, COMPLAIN (JUST IN CASE)
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 19-80 (63675)
				;1032 Note that CHSLCR is unreachable!
;1032	CAIN T1,1		;SOME PHONY XMIT-ACTIVE FLAG?
;1032	 CAIE T1,-1		; OR NON-LINKED MARKER?
;1032	 CAIA			;NO AND NO
;1032	 CHABUG(CHSLCR)		;YES, COMPLAIN (JUST IN CASE)
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 20-20 (62083)
	MOVEI T1,1		;SAY WE SHOULD ALWAYS STAY IN HIGHEST-PRIORITY
	MOVEM T1,JOBBIT		; QUEUE
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 20-20 (65068)
IFE BBNFLG,<
	MOVEI T1,1		;SAY WE SHOULD ALWAYS STAY IN HIGHEST-PRIORITY
	MOVEM T1,JOBBIT		; QUEUE
>
IFN BBNFLG,<
	CALL SETSPQ		; Special Q us
>
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 20-31 (62508)
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 20-35 (65555)
IFN CHINET,<
	MOVEI T1,^D5000		; Sleep for a little
	DISMS			; to let the Internet initialize
	SETZM CHPKTI		; Now allow us to get an internet buffer
>
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 24-7 (77391)
	CALL GATDNC		;255 yes, poke internet
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 24-6 (80593)
;;	CALL GATDNC		;255 yes, poke internet
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 24-15 (77551)
	CALL GATINC		;255 up now, poke internet
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 24-14 (80755)
;;	CALL GATINC		;255 up now, poke internet
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 36-52 (123550)
	HRRZ T1,CHAACK(CONN)	;282 LAST PACKET NUMBER WE RE-XMITTED (16B -1)
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 36-52 (126756)
	HRRZ T1,CHAACK(CONN)	;1003 LAST PACKET NUMBER WE RE-XMITTED
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 39-88 (134997)
	REPEAT 14,<CHXIMI,,137>	;SUBNETS 20-33, LLL
	REPEAT 4,<0>		;SUBNETS 34-37 NOT USED
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 39-88 (138195)
	repeat 14,<0>		;284 can't get to LLL any more
;284	REPEAT 14,<CHXIMI,,137>	;SUBNETS 20-33, LLL
	REPEAT 4,<0>		;SUBNETS 34-37 NOT USED
	REPEAT 24,<0>		;284 SUBNETS 40-63 also not used yet
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 40-19 (136061)
	 JRST OKSKDP		;NO GOOD, JUST GET OUT
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 40-19 (139365)
	 CALLRET OKSKDP		;NO GOOD, JUST GET OUT
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 40-25 (136224)
		  JRST OKSKDP]
	HRLM PKT,(Q2)		;WAS EMPTY, ON BOTH ENDS
	JRST OKSKDP
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 40-25 (139531)
		  CALLRET OKSKDP]
	HRLM PKT,(Q2)		;WAS EMPTY, ON BOTH ENDS
	CALLRET OKSKDP
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 40-36 (136487)
	JUMPE PKT,CHAQG0
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 40-36 (139800)
	CAMN PKT,[777777]	;1014 IS Q EMPTY?
	 SETZ PKT,		;1014 WAS EMPTY, USE CANONICAL FORM
	SKIPN PKT		;1014 MAYBE 0, MAYBE -1?
	 JRST CHAQG0		;1014 YES, EMPTY
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 40-58 (137049)
NOSKDP:	AOSG CHPIDF		;IF ALREADY ACTIVE OR
	 CONSZ PI,177B27	; IF AT PI LEVEL, DO NOTHING
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 40-61 (140502)
NOSKDP: CONSZ PI,177B27	; IF AT PI LEVEL, DO NOTHING
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 40-63 (137218)
	CONSO PI,1B<28+CHACHN>
	 JRST [ SETZM CHPIOF
		RET ]
	SETOM CHPIOF		;REMEMBER WE CHNOFF'ED
	CHNOFF CHACHN
>;IFGE CHACHN,
	RET
OKSKDP:	SOSGE CHPIDF		;LEAVING THIS LEVEL OF LOCKING; IF STILL NESTED
	 CONSZ PI,177B27	; OR IF AT PI LEVEL,
	 RET			; DO NOTHING
	OKSKD1
IFGE CHACHN,<
	SKIPE CHPIOF		;DID WE DO A CHNOFF?
	 CHNON CHACHN		;YES, RESTORE STATE
>;IFGE CHACHN,
	RET
	SUBTTL	ARPANET ROUTING SUPPORT
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 40-65 (140633)
	AOSG CHPIOF		; CHNOFF if we haven't already
	 CHNOFF CHACHN
>;IFGE CHACHN,
	RET
OKSKDP: CONSZ PI,177B27		; IF at PI level
	 RET			; DO NOTHING
IFGE CHACHN,<
	SOSGE CHPIOF		; Are we the top level ?
	 CHNON CHACHN		; Yes, all interrupts again also
>;IFGE CHACHN,
	OKSKD1
IFN CHINET,<
;;; The following code is because we cannot call GETBLK while
;;; NOSKED (since it might block on the free storage lock)
;;; and CHXINT is always called while NOSKED.
;;; Therefore we try to keep an internet  buffer on tap
	SKIPN INSKED		; We can't work in schedular
	 SKIPE NSKED		; or if NOSKED
	  RET			; so give up
	
	PIOFF			; Steal machine for a moment
	SKIPE CHPKTI		; Have we a buffer already?
	 JRST [	PION		; yes, do nothing
		RET]
	SETOM CHPKTI		; make others leave it alone
	PION			; and give back the machine
	STKVAR <FROMS1>		; Flag of the section we're in
	XMOVEI T1,0		; Get section number
	MOVEM T1,FROMS1		; Save
	SKIPN T1		; If in section 0
	 SE1CAL			; enter section 1
	MOVEI T1,PKTELI+<MINIHS+3>/4+CHPKDT+<^D488>/4+2
				; allocate space for maximum possible packet
	CALL GETBLK		; get a block of Internet free storage
	MOVEM T1,CHPKTI		; Save buffer if we got it
	SKIPN FROMS1		; If we came from section 0
	 SE0ENT			; return to it
>
	RET
	SUBTTL	ARPANET ROUTING SUPPORT
repeat 0,<		;1002 remove arpa routing support
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 42-4 (138813)
IFN ARPAF!CHINET,<
;SUPPORT FOR RECEIVING PACKETS FROM ANOTHER MODULE IN ANOTHER SECTION
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 42-3 (143169)
>;1002 End repeat 0 (remove arpa routing support)
IFN ARPAF!CHINET,<
;SUPPORT FOR RECEIVING PACKETS FROM ANOTHER MODULE IN ANOTHER SECTION
REPEAT 0,<		;1004
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 42-13 (139111)
>;IFN ARPAF
;ENTER HERE WITH T2 POINTER TO ACTUAL CHAOSNET PACKET, COPY TO PRIMARY SECTION
;AND CALL CHAOSNET PACKET RECEIVER.
CHIIM1:	LOAD T1,CPKNB,(T2)	;GET BYTE COUNT
	ADDI T1,CHPKDT*4+3	;PLUS PACKET HEADER
	LSH T1,-2		;TURN INTO WORDS
	MOVEI T3,CHATPB		;THIS TEMP PACKET IS THE DESTINATION
	MOVEI PKT,(T3)		; AND LEAVE HERE FOR CHIPKT
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 42-15 (143539)
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 42-25 (139570)
	CAMG T1,CHPMXW		;COMPARE SIZE AGAINST MAXIMUM
	 CAILE T1,(T4)		;COMPARE THE TWO SIZES
	 RET			;BAD, FLUSH IT
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 42-18 (143649)
>;IFN ARPAF
>;Repeat 0
;;;
;;; Here with T2 pointing to Chaosnet packet, T4 holding amount
;;; of data received, copy packet to primary section and
;;; give it to packet receiver
;;;
CHIIM1:	LOAD T1,CPKNB,(T2)	;GET BYTE COUNT
	ADDI T1,3		; Round up
	LSH T1,-2		;TURN INTO WORDS
	CAMLE T1,CHPMXW		;COMPARE SIZE AGAINST MAXIMUM
	 RET			; Bad
	ADDI T1,CHPKDT		;PLUS PACKET HEADER
	CAILE T1,(T4)		;COMPARE THE TWO SIZES
	 RET			; Bad
	MOVEI T3,CHATPB		;THIS TEMP PACKET IS THE DESTINATION
	MOVEI PKT,(T3)		; AND LEAVE HERE FOR CHIPKT
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 43-3 (139972)
;INPUT MESSAGE FROM INTERNET MODULE, AGAIN MAY BE IN NON-ZERO SECTION.
CHIINT::SAVEQ
	MOVE T2,IPKT		;POINTER TO INTERNET PACKET
	LOAD T1,PIDO,(IPKT)	;DATA OFFSET
	ADD T2,T1		;ADD IT IN
	JRST CHIIM1		;CALL CHAOSNET
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 43-3 (144485)
; Input message from INTERNET module, again may be in non-zero section.
CHIINT::SAVEQ
	MOVE T2,IPKT		; Pointer to INTERNET packet
	LOAD T1,PIDO,(IPKT)	; Data offset
	LOAD T4,PIPL,(IPKT)	; Data size
	ADDI T2,PKTELI(T1)	; Add offset to pointer
	SUB T4,T1		; subtract header from size
	JRST CHIIM1		; And enter CHAOSNet
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 43-18 (140343)
CHXINT:	PUSH P,IPKT
	MOVEI IPKT,PKTINT(PKT)	;POINT TO INTERNET HEADER
	SETZM .IPKVR(IPKT)
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 43-20 (144961)
CHXINT:	STKVAR <FROMS1>		; flag of the section we're called from
	XMOVEI T1,0		; Get section number
	MOVEM T1,FROMS1		; save
	SKIPN T1		; Don't enter if we're already there
	 SE1CAL			; enter section 1
	PUSH P,IPKT		; Save Internet packet register
	SKIPE INSKED		; Called from the schedular?
	 JRST CHXINX		; Can't send packet if so
				; (because can't lock down memory)
	SKIPG IPKT,CHPKTI	; Is there an internet buffer on tap?
	 JRST CHXINX		; No, must drop packet
	SETZM CHPKTI		; clear pointer
	SETZRO PFLGS,(IPKT)	; clear all flags
	SETZM .IPKVR(IPKT)	
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 43-25 (140582)
	LOAD T1,CPKNB,(PKT)	;GET SIZE
	ADDI T1,<CHPKDT-PKTINT>*4	;INCLUDE HEADER
	STOR T1,PIPL,(IPKT)	;INTO INTERNET PORTION
	SETZM .IPKSG(IPKT)	;NO FRAGMENTATION
	SETZM .IPKPR(IPKT)
	MOVEI T1,.CHAFM		;CHAOSNET PROTOCOL
	STOR T1,PIPRO,(IPKT)
	LOAD T1,CPKSA,(PKT)	;SOURCE HOST
	IOR T1,[CHINTM]		;MASK IN INTERNET
	STOR T1,PISH,(IPKT)
	LOAD T1,CPKDA,(PKT)	;DESTINATION HOST
	IOR T1,[CHINTM]		;MASK IN INTERNET
	STOR T1,PIDH,(IPKT)	
	SE1ENT
	CALL SNDGAT
	SE0ENT
	POP P,IPKT
	POPJ P,
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 43-38 (145679)
	MOVEI T1,10		; reasonable TTL
	STOR T1,PITTL,(IPKT)	; save in packet
	LOAD T1,CPKNB,(PKT)	; get data size
	ADDI T1,CHPKDT*4	; Size of CHAOS header
	PUSH P,T1		; save for later
	ADDI T1,MINIHS		; + Size of inet leader
	STOR T1,PIPL,(IPKT)	; Store as packet size
	SETZM .IPKSG(IPKT)	; No fragmentation
	SETZM .IPKPR(IPKT)	; ...
	MOVEI T1,.CHAFM		; CHAOSNET protocol
	STOR T1,PIPRO,(IPKT)
	MOVE T1,DEFADR		; get default address
	STOR T1,PISH,(IPKT)	; set as source host
	LOAD T1,CPKDA,(PKT)	; destination host
	IOR T1,[CHINTM]		; mask in internet
	STOR T1,PIDH,(IPKT)	; and set internet destination
	XMOVEI T3,PKTELI+<MINIHS+3>/4(IPKT)	; Point to Data area
	MOVE T2,PKT		; transfer from here
	POP P,T1		; Number of bytes to transfer
	LSH T1,-2		; convert to words
	AOS T1			; in case of non-integer 
	CALL XBLTA		; ....
	CALL SNDGAT		; send it off
CHXINX:	POP P,IPKT		; restore register
	HRROS PKTLNK(PKT)	; Packet is no longer XMIT active
	RCALL RELPKM,22		; Packet is not in use, so release it
	SKIPN FROMS1		; don't return to sc 0 if we came from 1
	 SE0ENT			; return to section 0
	RETSKP			; and return
***************

**** FILE SSY:<BERLIN.M5>OLDCHAOS.MAC.1, 44-60 (142923)
CHKLCK:	SKIPGE CHPIDF		;HAS NOSKDP BEEN CALLED?
**** FILE SSY:<BERLIN.M5>CHAOS.MAC.17, 44-60 (148664)
CHKLCK:
IFGE CHACHN,<
	SKIPGE CHPIOF		;HAS NOSKDP BEEN CALLED?
>
IFL CHACHN,<
	SKIPN NSKED		; are we safe from pre-emption?
>
***************