(FILECREATED "13-AUG-83 18:49:42" {PHYLUM}<LISPCORE>SOURCES>TRSERVER.;21 51213Q 

      changes to:  (MACROS \TELEKBDWAIT)

      previous date: " 8-AUG-83 17:46:32" {PHYLUM}<LISPCORE>SOURCES>TRSERVER.;20)


(* Copyright (c) 1983 by Xerox Corporation)

(PRETTYCOMPRINT TRSERVERCOMS)

(RPAQQ TRSERVERCOMS [(FNS \DOTELERAID \TELERAIDINIT \TELERAIDSERVER \TELERAIDCOMMAND \TELERAIDBREAK 
			  \TELERAIDGET \TELERAIDSEND \TELERAIDRELEASE \TELERAIDENTRY \TELERAIDEXIT 
			  \3MBRAWRECEIVE \3MBRAWTRANSMIT \10MBRAWRECEIVE \10MBRAWTRANSMIT 
			  \10MBRAWENCAPSULATE \10MBSETUPRECEIVER)
	(INITVARS (\TELERAIDBUFFER)
		  (\TELERAIDBLOCK))
	(BITMAPS \TELERAIDBITMAPS)
	(DECLARE: EVAL@COMPILE DONTCOPY (GLOBALVARS \TELERAIDPACKET \TELERAIDBUFFER \TELERAIDIOCB 
						    \TELERAIDBLOCK \TELERAIDBITMAPS)
		  (RECORDS TRBLOCK)
		  (MACROS \TELEBLTCURSOR \TELEKBDWAIT)
		  (CONSTANTS \#WORDS.CURSOR)
		  (FILES (LOADCOMP)
			 LLETHER 10MBDRIVER REMOTEVMEM LLFAULT))
	(DECLARE: DONTEVAL@LOAD DOCOPY (P (\TELERAIDINIT])
(DEFINEQ

(\DOTELERAID
  [LAMBDA NIL                                                (* bvm: "15-MAR-83 17:10")
    (PROG NIL
      LP  (\TELERAIDSERVER)
          (\CONTEXTSWITCH \TeleRaidFXP)
          (GO LP])

(\TELERAIDINIT
  [LAMBDA NIL                                                (* bvm: " 6-AUG-83 22:44")
    (for FN
       in (QUOTE (\TELERAIDSERVER \TELERAIDCOMMAND \DOTELERAID \TELERAIDGET \TELERAIDSEND 
				  \TELERAIDSETUP \TELERAIDENTRY \TELERAIDEXIT \3MBRAWTRANSMIT 
				  \3MBRAWRECEIVE \WRITERAWPBI \READRAWPBI \GETPACKETBUFFER 
				  \10MBRAWRECEIVE \10MBRAWTRANSMIT \TELERAIDRELEASE 
				  \10MBRAWENCAPSULATE \10MBSETUPRECEIVER FLIPCURSOR \KEYBOARDON 
				  \KEYBOARDOFF \10MB.TURNONETHER KEYDOWNP \QUEUE.OUTPUT.IOCB 
				  \QUEUE.INPUT.IOCB \10MB.GETPACKETSTATUS \10MB.GETPACKETLENGTH 
				  SETMAINTPANEL \TELERAIDBREAK \FREESTACKBLOCK \DOHELPINTERRUPT1 
				  \MAKEFRAME))
       do (\LOCKFN FN))
    (for VAR in (QUOTE (\TELERAIDPACKET \TELERAIDBUFFER \TELERAIDIOCB \TELERAIDBLOCK \LOCALNDBS 
					\PUP.READY \DEFSPACE))
       do (\LOCKVAR VAR))
    (COND
      ((NOT (TYPENAMEP \TELERAIDPACKET (QUOTE ETHERPACKET)))
	(SETQ \TELERAIDPACKET (\ALLOCATE.ETHERPACKET))
	(\LOCKPAGES \TELERAIDPACKET 2)))
    (\LOCKWORDS (SETQ \TELERAIDBLOCK (fetch BITMAPBASE of \TELERAIDBITMAPS))
		(fetch BITMAPHEIGHT of \TELERAIDBITMAPS])

(\TELERAIDSERVER
  [LAMBDA NIL                                                (* bvm: " 8-AUG-83 17:45")
    (PROG ((NDB \LOCALNDBS)
	   (PACKET \TELERAIDPACKET)
	   RECEIVER PTR VP FILEPAGE BODY)
          (SETQ RECEIVER (\TELERAIDENTRY NDB))
      LP  [COND
	    ((AND RECEIVER (\TELERAIDGET NDB PACKET RECEIVER))
	      (SELECTC (fetch PUPTYPE of PACKET)
		       (TR.GIVEPAGE (COND
				      ([OR (NOT (EVENP (fetch PUPIDLO of PACKET)
						       WORDSPERPAGE))
					   (fetch (VP INVALID)
					      of (SETQ VP (create WORD
								  HIBYTE ←(fetch LOBYTE
									     of (fetch PUPIDHI
										   of PACKET))
								  LOBYTE ←(fetch HIBYTE
									     of (fetch PUPIDLO
										   of PACKET]
					(GO ERROR)))
				    (SETQ PTR (\VAG2 (fetch PUPIDHI of PACKET)
						     (fetch PUPIDLO of PACKET)))
				    (COND
				      ((NOT (fetch (VMEMFLAGS VACANT) of (\READFLAGS VP)))
                                                             (* page is resident, we can just blt it)
					(\BLT (fetch PUPCONTENTS of PACKET)
					      PTR WORDSPERPAGE))
				      ((SETQ FILEPAGE (\LOOKUPPAGEMAP VP))
                                                             (* Page exists, so swap it into private buffer)
					(\ACTONVMEMFILE (fetch FILEPAGEONLY of FILEPAGE)
							\TELERAIDBUFFER 1)
					(\BLT (fetch PUPCONTENTS of PACKET)
					      \TELERAIDBUFFER WORDSPERPAGE))
				      (T (GO ERROR)))
				    (replace PUPLENGTH of PACKET with (IPLUS BYTESPERPAGE \PUPOVLEN))
				    (replace PUPTYPE of PACKET with TR.HEREISPAGE)
				    (\TELERAIDSEND NDB PACKET))
		       (TR.STORE (SETQ BODY (fetch PUPCONTENTS of PACKET))
				 (COND
				   ([OR (NOT (ZEROP (\GETBASEBYTE BODY 0)))
					(fetch (VP INVALID) of (SETQ VP (create WORD
										HIBYTE ←(\GETBASEBYTE
										  BODY 1)
										LOBYTE ←(\GETBASEBYTE
										  BODY 2]
				     (GO ERROR)))
				 (SETQ PTR (\VAG2 (\GETBASE BODY 0)
						  (\GETBASE BODY 1)))
				 (COND
				   ((NOT (fetch (VMEMFLAGS VACANT) of (\READFLAGS VP)))
                                                             (* page is resident, we can just store directly)
				     (\PUTBASE PTR 0 (\GETBASE BODY 2)))
				   ((SETQ FILEPAGE (\LOOKUPPAGEMAP VP))
                                                             (* Page exists, so swap it into private buffer)
				     (\ACTONVMEMFILE (fetch FILEPAGEONLY of FILEPAGE)
						     \TELERAIDBUFFER 1)
				     (\PUTBASE \TELERAIDBUFFER (fetch (POINTER WORDINPAGE)
								  of PTR)
					       (\GETBASE BODY 2))
				     (\ACTONVMEMFILE (fetch FILEPAGEONLY of FILEPAGE)
						     \TELERAIDBUFFER 1 T))
				   (T (GO ERROR)))
				 (replace PUPLENGTH of PACKET with \PUPOVLEN)
				 (replace PUPTYPE of PACKET with TR.STOREDONE)
				 (\TELERAIDSEND NDB PACKET))
		       [TR.GO (COND
				([PROG ((IDHI (fetch PUPIDHI of PACKET))
					(IDLO (fetch PUPIDLO of PACKET)))
				       (replace PUPTYPE of PACKET with TR.GOACK)
				       (\TELERAIDSEND NDB PACKET)
				       (RETURN (to 47040Q when (\TELERAIDGET NDB PACKET RECEIVER)
						  do (COND
						       ([AND (EQ (fetch PUPTYPE of PACKET)
								 TR.GOREPLY)
							     (COND
							       [(EQ IDLO MAX.SMALL.INTEGER)
                                                             (* Sigh, opencoded 40Q bit arithmetic)
								 (AND (ZEROP (fetch PUPIDLO
										of PACKET))
								      (EQ (fetch PUPIDHI
									     of PACKET)
									  (ADD1 IDHI]
							       (T (AND (EQ (fetch PUPIDLO
									      of PACKET)
									   (ADD1 IDLO))
								       (EQ (fetch PUPIDHI
									      of PACKET)
									   IDHI]
							 (RETURN T))
						       (T (\TELERAIDRELEASE NDB PACKET]
				  (\TELERAIDEXIT NDB)
				  (RETURN]
		       (\TELERAIDRELEASE NDB PACKET]
          [COND
	    ((OR (KEYDOWNP (QUOTE BLANK-BOTTOM))
		 (KEYDOWNP (QUOTE CTRL)))                    (* Command key)
	      (\TELEBLTCURSOR (fetch TRCOMMAND of \TELERAIDBLOCK))
	      (SELECTQ (\TELERAIDCOMMAND NDB)
		       (RESET (\TELERAIDEXIT NDB T)
			      (\CONTEXTSWITCH \ResetFXP))
		       (RETURN (\TELERAIDEXIT NDB)
			       (RETURN))
		       NIL))
	    (T (\TELEBLTCURSOR (fetch TRCURSOR of \TELERAIDBLOCK]
          (\UPDATETIMERS)                                    (* Keep the clock running)
          (GO LP)
      ERROR
          (replace PUPLENGTH of PACKET with \PUPOVLEN)
          (replace PUPTYPE of PACKET with TR.ERROR)
          (\TELERAIDSEND NDB PACKET)
          (GO LP])

(\TELERAIDCOMMAND
  [LAMBDA (NDB)                                              (* bvm: " 8-AUG-83 15:36")
    (COND
      [(KEYDOWNP (QUOTE D))                                  (* D -
							     hard reset)
	(\TELEBLTCURSOR (fetch TRCONTROLD of \TELERAIDBLOCK))
	(COND
	  ((\TELEKBDWAIT (QUOTE D))
	    (QUOTE RESET]
      [(KEYDOWNP (QUOTE N))                                  (* ↑N returns)
	(\TELEBLTCURSOR (fetch TRCONTROLN of \TELERAIDBLOCK))
	(COND
	  ((\TELEKBDWAIT (QUOTE N))
	    (QUOTE RETURN]
      ((KEYDOWNP (QUOTE B))                                  (* Break offender if possible)
	(\TELERAIDBREAK))
      ((KEYDOWNP (QUOTE P))                                  (* Display pup number in maintenance panel)
	(SETMAINTPANEL (fetch NDBPUPHOST# of NDB))
	(\TELEKBDWAIT (QUOTE P)))
      ((AND (NEQ \MACHINETYPE \DANDELION)
	    (KEYDOWNP (QUOTE R)))                            (* Get RAID)
	(\TELEBLTCURSOR (fetch TRRAID of \TELERAIDBLOCK))
	(COND
	  ((\TELEKBDWAIT (QUOTE R))
	    (RAID)
	    (\TELEBLTCURSOR (fetch TRCURSOR of \TELERAIDBLOCK])

(\TELERAIDBREAK
  [LAMBDA NIL                                                (* bvm: " 6-AUG-83 22:44")
    (PROG ((FRAME (fetch (IFPAGE TELERAIDFXP) of \InterfacePage))
	   NEWFRAME USERFRAME FREE NXT NXTEND)               (* Build a frame to invoke \DOHELPINTERRUPT1 on top of 
							     user process. This code adapted from \PROCESS.MAKEFRAME 
							     and \PROCESS.MAKEFRAME0)
          (\TELEBLTCURSOR (fetch TRBREAK of \TELERAIDBLOCK))
          [COND
	    ((ILESSP FRAME (fetch (IFPAGE StackBase) of \InterfacePage))
                                                             (* Running in a system context)
	      (COND
		((AND (IGREATERP (SETQ USERFRAME (fetch (IFPAGE FAULTFXP) of \InterfacePage))
				 (fetch (IFPAGE StackBase) of \InterfacePage))
		      (SELECTQ (fetch (FX FRAMENAME) of FRAME)
			       (\MP.ERROR T)
			       (RAID (EQ (fetch (FX FRAMENAME) of (SETQ FRAME (fetch (FX CLINK)
										 of FRAME)))
					 (QUOTE \MP.ERROR)))
			       NIL)
		      (SELECTC (\GETBASEPTR (STACKADDBASE (fetch (BF IVAR)
							     of (fetch (FX BLINK) of FRAME)))
					    0)
			       ((LIST \MP.INVALIDADDR \MP.INVALIDVP \MP.MOB \MP.RESIDENT)
                                                             (* MP codes in fault handler that are "safe")
				 T)
			       NIL))                         (* Special case: allow breaks in user process in these 
							     cases, because fault handler will just switch right back
							     to user context)
		  (SETQ FRAME USERFRAME)
		  (FLIPCURSOR))
		(T                                           (* Refuse to do it--chances of surviving a full-fledged 
							     break are slim)
		   (\TELEBLTCURSOR (fetch TRNOBREAK of \TELERAIDBLOCK))
		   (\TELEKBDWAIT (QUOTE B))
		   (RETURN]
          (COND
	    ((NOT (\TELEKBDWAIT (QUOTE B)))
	      (RETURN)))
          (SETQ NXT (fetch (FX NEXTBLOCK) of FRAME))
          (SETQ NXTEND (IPLUS NXT (fetch (FSB SIZE) of NXT)))
          [while (type? FSB NXTEND) do (SETQ NXTEND (IPLUS NXTEND (fetch (FSB SIZE) of NXTEND]
          (RETURN (COND
		    ((SETQ NEWFRAME
			(OR (\MAKEFRAME (FUNCTION \DOHELPINTERRUPT1)
					NXT NXTEND FRAME FRAME)
			    (\MAKEFRAME (FUNCTION \DOHELPINTERRUPT1)
					(SETQ FREE
					  (\FREESTACKBLOCK
					    (IPLUS (PROG1 (fetch (FNHEADER STKMIN)
							     of (fetch (LITATOM DEFPOINTER)
								   of (FUNCTION \DOHELPINTERRUPT1)))
                                                             (* Stack needed to call this fn)
							  )
						   (PROG1 (UNFOLD 20 WORDSPERCELL)
                                                             (* Extra slop)
							  ))
					    FRAME))
					(IPLUS FREE (fetch (FSB SIZE) of FREE))
					FRAME FRAME)))
		      (COND
			(USERFRAME (replace (IFPAGE FAULTFXP) of \InterfacePage with NEWFRAME))
			(T (replace (IFPAGE TELERAIDFXP) of \InterfacePage with NEWFRAME)))
		      (QUOTE RETURN])

(\TELERAIDGET
  [LAMBDA (NDB PACKET RECEIVER)                              (* bvm: " 6-AUG-83 22:08")
    (COND
      ((APPLY* RECEIVER NDB PACKET)
	(SELECTC (fetch EPTYPE of PACKET)
		 (\EPT.PUP (FLIPCURSOR)
			   (COND
			     [(AND (EQ (fetch PUPDESTSOCKETLO of PACKET)
				       \PUPSOC.TELERAID)
				   (EQ (fetch PUPDESTHOST of PACKET)
				       (fetch NDBPUPHOST# of NDB))
				   (ZEROP (fetch PUPDESTSOCKETHI of PACKET]
			     (T (\TELERAIDRELEASE NDB PACKET)
				NIL)))
		 (\EPT.3TO10 (COND
			       ((AND (EQ (fetch TRANSOPERATION of PACKET)
					 \TRANS.OP.REQUEST)
				     (EQ (fetch TRANSPUPHOST of PACKET)
					 (fetch NDBPUPHOST# of NDB)))
                                                             (* It's for us)
				 (\BLTLOCALHOSTNUMBER (LOCF (fetch BASETRANSNSHOST of PACKET))
						      NDB)   (* Add in the information he wants)
				 (replace TRANSOPERATION of PACKET with \TRANS.OP.RESPONSE)
				 (\10MBRAWENCAPSULATE NDB PACKET \TRANS.DATALENGTH)
                                                             (* Send back the response)
				 (\10MBRAWTRANSMIT NDB PACKET))
			       (T (\10MBSETUPRECEIVER NDB PACKET)))
			     NIL)
		 (\TELERAIDRELEASE NDB PACKET])

(\TELERAIDSEND
  [LAMBDA (NDB PACKET)                                       (* bvm: "19-JUL-83 11:10")
                                                             (* Swap the ports on PACKET and send it back where it 
							     came from)
    (swap (fetch PUPDESTHOST of PACKET)
	  (fetch PUPSOURCEHOST of PACKET))
    (swap (fetch PUPDESTNET of PACKET)
	  (fetch PUPSOURCENET of PACKET))
    (replace PUPDESTSOCKETHI of PACKET with (fetch PUPSOURCESOCKETHI of PACKET))
    (replace PUPDESTSOCKETLO of PACKET with (fetch PUPSOURCESOCKETLO of PACKET))
    (replace PUPSOURCESOCKETHI of PACKET with 0)
    (replace PUPSOURCESOCKETLO of PACKET with \PUPSOC.TELERAID)
    (replace PUPCHECKSUM of PACKET with \NULLCHECKSUM)
    (SELECTQ (fetch NETTYPE of NDB)
	     (3 (swap (fetch 3MBDESTHOST of PACKET)
		      (fetch 3MBSOURCEHOST of PACKET))
		(replace 3MBLENGTH of PACKET with (IPLUS \3MBENCAPSULATION.WORDS
							 (FOLDHI (fetch PUPLENGTH of PACKET)
								 BYTESPERWORD)))
		(\3MBRAWTRANSMIT NDB PACKET))
	     (10 (\10MBRAWENCAPSULATE NDB PACKET (fetch PUPLENGTH of PACKET))
		 (\10MBRAWTRANSMIT NDB PACKET))
	     NIL)
    (FLIPCURSOR])

(\TELERAIDRELEASE
  [LAMBDA (NDB PACKET)                                       (* bvm: "16-JUL-83 16:42")
                                                             (* Called when Teleraid is finished with PACKET, so that
							     it can be reused for receiving)
    (SELECTQ (fetch NETTYPE of NDB)
	     (12Q (\10MBSETUPRECEIVER NDB PACKET))
	     NIL)
    (FLIPCURSOR)
    NIL])

(\TELERAIDENTRY
  [LAMBDA (NDB)                                              (* bvm: "19-JUL-83 15:22")
                                                             (* Called on entry to TeleRaid.
							     Returns a packet receiver function)
    (\KEYBOARDOFF)
    (\BLT (fetch TROLDCURSOR of \TELERAIDBLOCK)
	  \EM.CURSORBITMAP \#WORDS.CURSOR)
    (\TELEBLTCURSOR (fetch TRCURSOR of \TELERAIDBLOCK))
    (COND
      ((AND NDB \PUP.READY)
	(SELECTQ (AND NDB (fetch NETTYPE of NDB))
		 (3 (FUNCTION \3MBRAWRECEIVE))
		 (10 (\10MB.TURNONETHER NDB (fetch TROLDCSB of \TELERAIDBLOCK)
					NIL T 0 0)
		     (\10MBSETUPRECEIVER NDB \TELERAIDPACKET)
		     (FUNCTION \10MBRAWRECEIVE))
		 NIL])

(\TELERAIDEXIT
  [LAMBDA (NDB RESET)                                        (* bvm: "19-JUL-83 15:23")
                                                             (* Restore state for teleraid exit)
    (SELECTQ (AND NDB (fetch NETTYPE of NDB))
	     (10 (\10MB.TURNONETHER NDB NIL (fetch TROLDCSB of \TELERAIDBLOCK)))
	     NIL)
    (\TELEBLTCURSOR (fetch TROLDCURSOR of \TELERAIDBLOCK))
    (OR RESET (\KEYBOARDON])

(\3MBRAWRECEIVE
  [LAMBDA (NDB PACKET)                                       (* bvm: "12-JUL-83 19:09")
    (COND
      ((UNINTERRUPTABLY
           (PROG ((PBI (\READRAWPBI)))
	         [COND
		   (PBI (\BLT (fetch 3MBBASE of PACKET)
			      (fetch PBIRAWSTART of PBI)
			      (ADD1 (fetch PBILENGTH of PBI]
	         (RETURN PBI)))
	(replace EPTYPE of PACKET with (fetch 3MBTYPE of PACKET))
	PACKET])

(\3MBRAWTRANSMIT
  [LAMBDA (NDB PACKET)                                       (* bvm: "14-MAR-83 15:23")
                                                             (* Sends raw seething etherpacket on the 3mb net denoted
							     by NDB)
    (SETQ PACKET (\DTEST PACKET (QUOTE ETHERPACKET)))
    (UNINTERRUPTABLY
        (PROG ((PBI (\GETPACKETBUFFER)))
	      (OR PBI (RETURN))
	      (\BLT (fetch PBIRAWSTART of PBI)
		    (fetch 3MBBASE of PACKET)
		    (ADD1 (fetch 3MBLENGTH of PACKET)))
	      (\WRITERAWPBI PBI)
	      (RETURN T)))])

(\10MBRAWRECEIVE
  [LAMBDA (NDB PACKET)                                       (* bvm: "15-JUL-83 14:36")
    (PROG ((STATUS (\10MB.GETPACKETSTATUS \TELERAIDIOCB)))
          (RETURN (COND
		    ((EQ STATUS \ES.PENDING)                 (* nothing received yet)
		      NIL)
		    ((OR (EQ STATUS \ES.GOOD.PACKET)
			 \10MB.GETGARBAGE)                   (* Accept the packet)
		      (replace 10MBLENGTH of PACKET with (\10MB.GETPACKETLENGTH \TELERAIDIOCB))
		      (replace EPTYPE of PACKET with (fetch 10MBTYPE of PACKET))
		      PACKET)
		    (T                                       (* Bad packet, stuff it back on input)
		       (\10MBSETUPRECEIVER NDB PACKET)
		       NIL])

(\10MBRAWTRANSMIT
  [LAMBDA (NDB PACKET)                                       (* bvm: "12-JUL-83 15:44")
    (\QUEUE.OUTPUT.IOCB NDB \TELERAIDIOCB (fetch 10MBPACKETBASE of PACKET)
			(IMAX (fetch 10MBLENGTH of PACKET)
			      \10MB.MINPACKETLENGTH))        (* And then wait until transmitted)
    (repeatuntil (NEQ (\10MB.GETPACKETSTATUS \TELERAIDIOCB)
		      \ES.PENDING])

(\10MBRAWENCAPSULATE
  [LAMBDA (NDB PACKET LENGTH)                                (* bvm: "19-JUL-83 11:08")
    (replace 10MBLENGTH of PACKET with (IPLUS \10MBENCAPSULATION.WORDS (FOLDHI LENGTH BYTESPERWORD)))
    (\BLT (fetch 10MBDESTHOSTBASE of PACKET)
	  (fetch 10MBSOURCEHOSTBASE of PACKET)
	  3)
    (\BLTLOCALHOSTNUMBER (fetch 10MBSOURCEHOSTBASE of PACKET)
			 NDB])

(\10MBSETUPRECEIVER
  [LAMBDA (NDB PACKET)                                       (* bvm: "14-JUL-83 13:45")
    (\QUEUE.INPUT.IOCB NDB \TELERAIDIOCB (fetch 10MBPACKETBASE of PACKET)
		       \10MBPACKETLENGTH])
)

(RPAQ? \TELERAIDBUFFER )

(RPAQ? \TELERAIDBLOCK )

(RPAQ \TELERAIDBITMAPS (READBITMAP))
(20Q 220Q
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"N@@@"
"DNHN"
"DHHH"
"DNHN"
"DHHH"
"DNNN"
"@@@@"
"@@@@"
"@@@@"
"N@@@"
"ICGF"
"IEBE"
"NGBE"
"JEBE"
"IEGF"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@GH"
"@@DD"
"@HDD"
"ALDD"
"BJDD"
"@HDD"
"@HDD"
"@HGH"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@DD"
"@@FD"
"@HFD"
"ALED"
"BJED"
"@HDL"
"@HDL"
"@HDD"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"FDEL"
"IFMB"
"HGMB"
"HEEB"
"HEEB"
"IDEB"
"FDEL"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@B@"
"N@@A"
"ICBG"
"NDJI"
"ICJI"
"IDJI"
"IGGG"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"O@A@"
"HHA@"
"HJMB"
"OCAD"
"HJAL"
"HJAB"
"OBAA"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"@@@@"
"GHD@"
"HDJ@"
"H@J@"
"HAA@"
"HEO@"
"GJ@H"
"@@@@"
"@@@@"
"DBMO"
"FBDD"
"EBHD"
"DJ@D"
"DF@D"
"DB@D"
"@@@@"
"@@@@")
(DECLARE: EVAL@COMPILE DONTCOPY 
(DECLARE: DOEVAL@COMPILE DONTCOPY

(ADDTOVAR GLOBALVARS \TELERAIDPACKET \TELERAIDBUFFER \TELERAIDIOCB \TELERAIDBLOCK \TELERAIDBITMAPS)
)

[DECLARE: EVAL@COMPILE 

(ACCESSFNS TRBLOCK ((TROLDCSB (PROGN DATUM))
		    (TROLDCURSOR (\ADDBASE DATUM 20Q))
		    (TRCURSOR (\ADDBASE DATUM 40Q))
		    (TRCONTROLD (\ADDBASE DATUM 60Q))
		    (TRCONTROLN (\ADDBASE DATUM 100Q))
		    (TRCOMMAND (\ADDBASE DATUM 120Q))
		    (TRRAID (\ADDBASE DATUM 140Q))
		    (TRBREAK (\ADDBASE DATUM 160Q))
		    (TRNOBREAK (\ADDBASE DATUM 200Q))))
]

(DECLARE: EVAL@COMPILE 

(PUTPROPS \TELEBLTCURSOR MACRO ((CURSOR)
				(\BLT \EM.CURSORBITMAP CURSOR \#WORDS.CURSOR)))

(PUTPROPS \TELEKBDWAIT MACRO [(KEY)
			      (while [AND (KEYDOWNP KEY)
					  (OR (KEYDOWNP (QUOTE BLANK-BOTTOM))
					      (KEYDOWNP (QUOTE CTRL]
				 finally (RETURN (COND
						   ((OR (KEYDOWNP (QUOTE BLANK-BOTTOM))
							(KEYDOWNP (QUOTE CTRL)))
						     T)
						   (T (\TELEBLTCURSOR (fetch TRCURSOR of 
										   \TELERAIDBLOCK))
						      NIL])
)

(DECLARE: EVAL@COMPILE 

(RPAQQ \#WORDS.CURSOR 20Q)

(CONSTANTS \#WORDS.CURSOR)
)

(FILESLOAD (LOADCOMP)
	   LLETHER 10MBDRIVER REMOTEVMEM LLFAULT)
)
(DECLARE: DONTEVAL@LOAD DOCOPY 
(\TELERAIDINIT)
)
(PUTPROPS TRSERVER COPYRIGHT ("Xerox Corporation" 3677Q))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1765Q 44340Q (\DOTELERAID 1777Q . 2324Q) (\TELERAIDINIT 2326Q . 4571Q) (\TELERAIDSERVER
 4573Q . 16166Q) (\TELERAIDCOMMAND 16170Q . 20344Q) (\TELERAIDBREAK 20346Q . 26412Q) (\TELERAIDGET 
26414Q . 31064Q) (\TELERAIDSEND 31066Q . 33567Q) (\TELERAIDRELEASE 33571Q . 34426Q) (\TELERAIDENTRY 
34430Q . 35776Q) (\TELERAIDEXIT 36000Q . 36706Q) (\3MBRAWRECEIVE 36710Q . 37620Q) (\3MBRAWTRANSMIT 
37622Q . 40733Q) (\10MBRAWRECEIVE 40735Q . 42275Q) (\10MBRAWTRANSMIT 42277Q . 43127Q) (
\10MBRAWENCAPSULATE 43131Q . 43772Q) (\10MBSETUPRECEIVER 43774Q . 44336Q)))))
STOP