

; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE  NICTRG (IDENT='X18') =

;	0002	

;	0003	BEGIN

;	0004	

;	0005	!

;	0006	! COPYRIGHT (C) 1977

;	0007	! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

;	0008	!

;	0009	! THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

;	0010	! COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

;	0011	! ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

;	0012	! MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

;	0013	! EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

;	0014	! TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

;	0015	! REMAIN IN DEC.

;	0016	!

;	0017	! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

;	0018	! AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

;	0019	! CORPORATION.

;	0020	!

;	0021	! DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

;	0022	! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

;	0023	

;	0024	!++

;	0025	! FACILITY:

;	0026	!	    NICE - the network monitor and control object.

;	0027	!

;	0028	! ABSTRACT:

;	0029	!	   This module provides direct access to the driver for the

;	0030	!	   line connecting the local node to the target node during

;	0031	!	   the NICE 'line service' functions.  This includes allocating

;	0032	!	   and deallocating the line, assigning and deassigning a channel

;	0033	!	   to the driver, starting and stoping the line, and sending

;	0034	!	   and receiving messages over the line.

;	0035	!

;	0036	! ENVIRONMENT:

;	0037	!

;	0038	! AUTHOR:   Al Eldridge,	CREATION DATE:	1-AUG-78

;	0039	!

;	0040	! MODIFIED BY:

;	0041	!

;	0042	! 	, : VERSION

;	0043	! 01	- 

;	0044	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 2

; Digital Equipment Corporation

;

;	0045	!

;	0046	! TABLE OF CONTENTS:

;	0047	!

;	0048	

;	0049	FORWARD ROUTINE

;	0050	

;	0051	  TARG_LINK,

;	0052	  TARG_IO,

;	0053	  TARG_IOAST	: NOVALUE,

;	0054	  TARG_TMRAST	: NOVALUE,

;	0055	  TARG_ATTNAST	: NOVALUE ;

;	0056	

;	0057	

;	0058	!

;	0059	! INCLUDE FILES:

;	0060	!

;	0061	

;	0062	  REQUIRE 'SRC$:NICDEF.B32' ;

;	0954	

;	0955	!

;	0956	! MACROS:

;	0957	!

;	0958	

;	0959	!

;	0960	! EQUATED SYMBOLS:

;	0961	!

;	0962	

;	0963	!

;	0964	! OWN STORAGE:

;	0965	!

;	0966	

;	0967	!

;	0968	! EXTERNAL REFERENCES:

;	0969	!

;	0970	

;	0971	EXTERNAL	TRG_CTL : TCB ;	! The Target Control Block as defined in

;	0972					! module 'NICDEF.B32'.

;	0973	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 3

; Digital Equipment Corporation

;

;	0974	! USING THE ROUTINES IN THIS MODULE

;	0975	! =================================

;	0976	!

;	0977	! This module provides a MOP sensitive interface to the DMC11 driver.

;	0978	! It is intended to be used for all of the NICE 'line service' 

;	0979	! functions.  These functions require communication with a remote

;	0980	! node which is not currently speaking NSP.  The line is accessed

;	0981	! directly by these routines, i.e., there is no ACP intervention and

;	0982	! therefore no virtual I/O support.

;	0983	!

;	0984	! The following quidelines should be strictly adhered to when using 

;	0985	! this module :

;	0986	!

;	0987	!	- Only routines TARG_IO and TARG_LINK should be called.  The

;	0988	!	  remainder of the routines are AST's used for upgrading

;	0989	!	  throughput and for error recovery.

;	0990	!

;	0991	!	- Message descriptors, control, and status information are

;	0992	!	  passed between this module and the calling routines via

;	0993	!	  a 'target control block' (TCB).  This structure is defined

;	0994	!	  in module NICDEF.B32.  Only one TCB may be active at a time.

;	0995	!	  The address of this TCB is assumed to be stored in external

;	0996	!	  variable TRG_CTL.

;	0997	!

;	0998	!	- The nature of a MOP dialogue is host/satellite half-dulpex.

;	0999	!	  The local node is the host.  Only MOP version 1 is supported.

;	1000	!

;	1001	!	- In order to enhance thruput on downline loads, it is possible

;	1002	!	  to indicate that a receive is to automatically follow a

;	1003	!	  successful transmit by setting the low order bit of the TCB's

;	1004	!	  TCB$B_IMPLDRCV field.  The received message will be checked

;	1005	!	  for requested retransmissions, which will then occur

;	1006	!	  automatically.

;	1007	!

;	1008	!	-  The TCB$B_MOPTIMOUT field is used to indicate the desired

;	1009	!	   number of seconds that a receive or transmit is remain

;	1010	!	   hanging before it is cancelled by the timer AST.

;	1011	!

;	1012	!	- The completion of a TARG_IO function is signalled by setting

;	1013	!	  the event flag named in the TCB.  If a recoverable error is

;	1014	!	  detected in either a transmit or a receive, then the last

;	1015	!	  transmit is retried until either the operation is successful

;	1016	!	  or until the TCB's retry counter is exhausted.

;	1017	!

;	1018	!	  NOTE : A retransmission will follow an unsuccessful receive

;	1019	!		 provided that the retry counter field of the TCB is

;	1020	!		 non-zero.  Therefore the XMTDDSC buffer must contain

;	1021	!		 a valid message if a receive is issued with a non-zero

;	1022	!		 retry counter.

;	1023	!

;	1024	!		 However, the receive itself will subsequently be

;	1025	!		 retried only if the TCB$B_IMPLDRCV field's low bit is

;	1026	!		 set.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 4

; Digital Equipment Corporation

;

;	1027	!	- A received message is checked primarily to detect the to

;	1028	!	  need to retransmit.  In general, if the TCB$B_RCVMOPTYP

;	1029	!	  field is set to 'MOP$K_REQLOAD' and the TCB$B_STATUS field

;	1030	!	  has its low bit set, then the calling routine may assume

;	1031	!	  that no errors exist.  In all other cases it is the 

;	1032	!	  responsibility of the calling routine to validate the 

;	1033	!	  received message.

;	1034	!

;	1035	!	- The address of a double-descriptor of the message to be

;	1036	!	  transmitted is assumed to be found in field TCB$A_XMTDDSC.

;	1037	!	  All four fields of the double descriptor are assumed to be

;	1038	!	  valid.

;	1039	!

;	1040	!	- The address of two double descriptors are needed for receives.

;	1041	!	  and are assumed to be found in fields TCB$A_RCVDDSC and

;	1042	!	  TCB$A_INTDDSC.  Only the buffer descriptor portion of these 

;	1043	!	  DDSC's need to be set up by the calling routine.  The string

;	1044	!	  descriptor portion will be set up by the AST routines in this 

;	1045	!	  module when the receive completes.

;	1046	!

;	1047	!	  A receive buffer must be associated with TCB$A_INTDDSC 

;	1048	!	  when the link to the target node is established by calling 

;	1049	!	  routine TARG_LINK.  Once the link is established it is 

;	1050	!	  possible to receive unsolicited messages (although this should

;	1051	!	  only happen when the target is 'primary mode' -- see the

;	1052	!	  latest attempt at the MOP spec. for details).

;	1053	!

;	1054	!	  Two receive buffers are required.  This allows an unsolicited

;	1055	!	  message to be received at any time.  All messages are 

;	1056	!	  initially received in INTDDSC's buffer whether or not they are

;	1057	!	  solicited.  Whenever a receive is solicited, either via a

;	1058	!	  call to TARG_IO with the receive function code or with the

;	1059	!	  transmit function code and the implied receive bit set in the

;	1060	!	  TCB, the INTDDSC buffer is checked to see if it contains a

;	1061	!	  message. If it does it is transferred to the RCVDDSC buffer,

;	1062	!	  if it does not then a QIO is issued and the subsequently

;	1063	!	  received message is transferred from the INTDDSC buffer to the

;	1064	!	  RCVDDSC buffer.

;	1065	!

;	1066	!	  The RCVDDSC buffer must be at least as big as the INTDDSC

;	1067	!	  buffer.

;	1068	!

;	1069	!	  If a message is received before the previously received

;	1070	!	  message has been transferred to the RCVDDSC buffer, then the

;	1071	!	  previously received message is overwritten by the new message.

;	1072	!	  This should only occur when the target is in primary mode

;	1073	!	  sending 'program request' or 'mop mode running' messages.

;	1074	!	  It is the desired response since the content of these messages

;	1075	!	  are indentical, since it prevents some subtle hangup

;	1076	!	  conditions, and since it prevents the driver from signalling

;	1077	!	  data overrun conditions.

;	1078	!

;	1079	!	- A typical call sequence to the routines in this module is

;	1080	!	  outlined below.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 5

; Digital Equipment Corporation

;

;	1081	!		1. Ensure that the line name is stored in the buffer

;	1082	!		   described by LN_DDSC and create a TCB structure

;	1083	!		   with the global name TRG_CTL.

;	1084	!		2. Setup two buffer DDSC's and store their addresses

;	1085	!		   in fields TCB$A_INTDDSC and TCB$A_RCVDDSC.

;	1086	!		3. Setup the TCB$L_EFN field with the number of the 

;	1087	!		   event flag to be set upon the completion of an

;	1088	!		   I/O operation.

;	1089	!		4. Call TARG_LINK to establish a link to the target.

;	1090	!		   This routine will set the event flag and return

;	1091	!		   its status in TCB$B_STATUS, as well as in R0.

;	1092	!		5. If a message is to be transmitted, then store the 

;	1093	!		   address of its DDSC in field TCB$A_XMTDDSC.

;	1094	!		6. If a receive is to implicitly follow the transmit

;	1095	!		   then set the TCB$B_IMPLDRCV field, else clear this

;	1096	!		   field.

;	1097	!		7. For both receives and transmits, the TCB$B_MOPTIMOUT

;	1098	!		   field should be set to the number of seconds that

;	1099	!		   the request is to remain oustanding before it is to

;	1100	!		   be cancelled by the timer AST.

;	1101	!		8. Set field TCB$B_RETRIES with the value of the number

;	1102	!		   of times the transmit may be retried before a

;	1103	!		   detected error is to be considered fatal.  A value

;	1104	!		   of zero will inhibit all retries.

;	1105	!

;	1106	!			NOTE :	This field must be set to zero if the

;	1107	!				operation is a receive and the XMTDDSC

;	1108	!				message is not valid.

;	1109	!

;	1110	!		9. Issue the transmit by calling routine TARG_IO with

;	1111	!		   a parameter value of zero (for receives use a value

;	1112	!		   of 1).

;	1113	!	       10. Processing may now continue in parallel with the

;	1114	!		   target I/O.  If the processing includes the 

;	1115	!		   construction of the next message to be transmitted

;	1116	!		   then a buffer other than the one referenced via

;	1117	!		   TCB$A_XMTDDSC must be used, or the value of

;	1118	!		   TCB$B_RETRIES must be zero.

;	1119	!	       11. The completion of the operation may be detected by

;	1120	!		   waiting for the event flag to be set.  The status of

;	1121	!		   the operation can be determined by checking the low

;	1122	!		   order bit of field TCB$B_STATUS.  If it is set then

;	1123	!		   the operation was successful, however, if a message

;	1124	!		   was received, then the TCB$B_RCVMOPTYP field should

;	1125	!		   also be checked to see that the response was proper.

;	1126	!		   If this field is 'MOP$K_REQLOAD' then the message

;	1127	!		   contents have not yet been validated.

;	1128	!

;	1129	!	       12. Loop to step  5.  if desired.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 6

; Digital Equipment Corporation

;

;	1130	GLOBAL ROUTINE  TARG_LINK (FCT, LN_DDSC_AD) : =

;	1131	

;	1132	!++

;	1133	! FUNCTIONAL DESCRIPTION:

;	1134	!

;	1135	!	Allocate the line to the target, set its characteristics, and

;	1136	!	assign a channel to it.  An attention AST is enabled to

;	1137	!	receive unsolicited input -- routine TARG_ATTNAST recieves

;	1138	!	the attention AST.

;	1139	!

;	1140	! FORMAL PARAMETERS:

;	1141	!

;	1142	!	FCT		- 0 =>  establish a MOP link to the target

;	1143	!		 	  1 =>  break the link and deallocate the line

;	1144	!	LN_DDSC_AD  	- address of the double descriptor of the line

;	1145	!			  which links the local node to the target node.

;	1146	!

;	1147	! IMPLICIT INPUTS:

;	1148	!

;	1149	!	TARG_ATTNAST	- the name of the attention ast routine.

;	1150	!	TRG_CTL		- the target control block (TCB).

;	1151	!

;	1152	!

;	1153	! IMPLICIT OUTPUTS:

;	1154	!

;	1155	!	TCB$W_CHAN	- the word which returns the channel associated

;	1156	!			  with the line.

;	1157	!

;	1158	!	The event flag named in TCB$L_EFN is set.

;	1159	!

;	1160	! COMPLETION CODE

;	1161	!

;	1162	!	One of the standard internal NICE status codes is returned

;	1163	!	in the TCB's TCB$B_STATUS field and also as the routine value.

;	1164	!

;	1165	! SIDE EFFECTS:

;	1166	!

;	1167	!	NONE

;	1168	!

;	1169	!--

;	1170	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 7

; Digital Equipment Corporation

;

;	1171	BEGIN

;	1172	BIND	LINE_DDSC = .LN_DDSC_AD	: DDSC ;

;	1173	BIND	TRG_IOSB= TRG_CTL[TCB$Z_IOSB]	: IO_SB ;

;	1174	LOCAL	STATUS,

;	1175		AST_STA,

;	1176		LOCBF_DSC  : NDSC,

;	1177		LOCBF	   : BLOCK [53,BYTE] ;	! device info buffer

;	1178	

;	1179	LOCBF_DSC [DSC_LNG] = 53 ;		! initialize descriptor

;	1180	LOCBF_DSC [DSC_PTR] = LOCBF ;

;	1181	AST_STA = $SETAST (ENBFLG = FALSE) ;	! Let's keep this simple

;	1182	STATUS = NIC$_SUCCESS ;

;	1183	

;	1184	IF  .FCT  EQL  1			! 1 =>  link to target

;	1185	THEN

;	1186	    !+

;	1187	    ! Allocate and assign the device 

;	1188	    !-

;	1189	

;	1190	    IF  NOT $ASSIGN (DEVNAM = LINE_DDSC [STR_DSC],

;     P 1191			     CHAN   = TRG_CTL [TCB$W_CHAN])

;	1192	    THEN

;	1193		BEGIN

;	1194		STATUS = NIC$_LN_WNGSTA ;	! Someone already owns the line

;	1195		TRG_CTL [TCB$W_CHAN] = 0 ;	! Zero is an illegal channel and

;	1196		END				! attempts to deassign it later 

;	1197						! will be harmless.

;	1198	    ELSE

;	1199		!+

;	1200		! Get the default device characteristics so that we do not have

;	1201		! to build the characteristics block ourselves.  We wll use it 

;	1202		! below when bringing the line up.

;	1203		!-

;	1204	

;	1205		IF  NOT  $GETCHN (CHAN   = .TRG_CTL [TCB$W_CHAN],

;     P 1206				  PRIBUF = LOCBF_DSC

;     P 1207				 )

;	1208		THEN

;	1209		     STATUS = NIC$_RESRCERR

;	1210		ELSE

;	1211		    BEGIN

;	1212		

;	1213		    !+

;	1214		    ! Set the device characteristics bits and the maximum

;	1215		    ! message size.  Turn the line off, so that it is in a known

;	1216		    ! and harmless state, and then bring it up in MOP mode.  We

;	1217		    ! can ignore problems encountered when shutting the line

;	1218		    ! down since any serious problems will be caught when we

;	1219		    ! attempt to bring the line up again.

;	1220		    !-

;	1221	

;	1222		    LOCBF [DIB$L_DEVDEPEND] = XM$M_CHR_MOP or   ! use MOP mode

;	1223					      XM$M_CHR_HDPLX ;  ! half duplex

;	1224		    LOCBF [DIB$W_DEVBUFSIZ] = NIC$K_IOBFSIZE ;

;	1225	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 7-1

; Digital Equipment Corporation

;

;	1226		    STATUS = NIC$_RESRCERR ;		! Preset in the event an

;	1227							! error is encountered

;	1228	

;	1229		    $QIOW  (FUNC = IO$_SETMODE or IO$M_SHUTDOWN,

;     P 1230			    CHAN = .TRG_CTL [TCB$W_CHAN],

;     P 1231			    P1   = LOCBF [DIB$B_DEVCLASS]    ! Starting addr of

;     P 1232			   ) ;				     ! char. block

;	1233	

;	1234		    IF $QIOW (FUNC = IO$_SETMODE or IO$M_STARTUP,

;     P 1235			      CHAN = .TRG_CTL [TCB$W_CHAN],

;     P 1236			      IOSB = TRG_IOSB,

;     P 1237			      P1   = LOCBF [DIB$B_DEVCLASS], ! starting addr of

;     P 1238							     ! char. block

;     P 1239			      P3   = 2			     ! Use pool of 2

;     P 1240							     ! receive buffs

;     P 1241			   )

;	1242		    THEN

;	1243			IF  .TRG_IOSB [IO_STAT]

;	1244			THEN

;	1245			    !+

;	1246			    ! Enable the attention AST in order to receive any

;	1247			    ! unsolicited input.

;	1248			    !-

;	1249	

;	1250			    IF  $QIOW (FUNC = IO$_SETMODE or IO$M_ATTNAST,

;     P 1251				       CHAN = .TRG_CTL [TCB$W_CHAN],

;     P 1252				       P1   = TARG_ATTNAST

;     P 1253				      )

;	1254			    THEN

;	1255				STATUS = NIC$_SUCCESS ;	! Restore status

;	1256		    END ;

;	1257	

;	1258	

;	1259	!+

;	1260	! If any problems have been encountered thus far, or if  FCT indicates

;	1261	! that we are to break the link to the target, then break the link

;	1262	! and deallocate the device.  We may ignore any errors due to illegal

;	1263	! channels or non-allocated devices.

;	1264	!-

;	1265	

;	1266	IF  (NOT .STATUS)  OR  (.FCT EQL 0)	  	!  0 => break link

;	1267	THEN

;	1268	    $DASSGN (CHAN   = .TRG_CTL [TCB$W_CHAN]) ;	! Implicit deallocate.

;	1269	

;	1270	!+

;	1271	! Record the status, set the event flag and return.

;	1272	!-

;	1273	

;	1274	TRG_CTL [TCB$B_STATUS] = .STATUS ;

;	1275	

;	1276	$SETEF  (EFN = .TRG_CTL [TCB$L_EFN]) ;

;	1277	$SETAST (ENBFLG = .AST_STA) ;	  	! Restore the AST state.

;	1278	RETURN  (.STATUS) ;

;	1279	END ;





; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 7-2

; Digital Equipment Corporation

;



							    .TITLE  NICTRG

							    .IDENT  \X18\



							    .GLOBL  TRG_CTL, SYS$SETAST, SYS$ASSIGN, SYS$GETCHN, SYS$QIOW

							    .GLOBL  SYS$DASSGN, SYS$SETEF



							    .PSECT  $CODE$,NOWRT,2



					 0E1C 00000 	    .ENTRY  TARG_LINK, Save R2,R3,R4,R9,R10,R11			      ; 1130

		         59 00000000G  9F  9E 00002 	    MOVAB   @#SYS$SETAST, R9					      ;

		         5A 00000000G  9F  9E 00009 	    MOVAB   @#SYS$QIOW, R10					      ;

		         5B	0000G  CF  9E 00010 	    MOVAB   TRG_CTL+8, R11					      ;

		         5E	  C0   AE  9E 00015 	    MOVAB   -64(SP), SP						      ;

		         53	  08   AC  D0 00019 	    MOVL    LN_DDSC_AD, R3					      ; 1171

		    38   AE	       35  D0 0001D 	    MOVL    #53, LOCBF_DSC					      ; 1179

		    3C   AE	       6E  9E 00021 	    MOVAB   LOCBF, LOCBF_DSC+4					      ; 1180

				       7E  D4 00025 	    CLRL    -(SP)						      ; 1181

		         69	       01  FB 00027 	    CALLS   #1, SYS$SETAST					      ;

		         54	       50  D0 0002A 	    MOVL    R0, AST_STA						      ;

		         52	       01  D0 0002D 	    MOVL    #1, STATUS						      ; 1182

		         01	  04   AC  D1 00030 	    CMPL    FCT, #1						      ; 1184

				       15  12 00034 	    BNEQ    1$							      ;

				       7E  7C 00036 	    CLRQ    -(SP)						      ; 1191

				0808   8F  BB 00038 	    PUSHR   #^M<R3,R11>						      ;

	      00000000G  9F	       04  FB 0003C 	    CALLS   #4, @#SYS$ASSIGN					      ;

		         07	       50  E8 00043 	    BLBS    R0, 2$						      ;

		         52	       12  CE 00046 	    MNEGL   #18, STATUS						      ; 1194

				       6B  B4 00049 	    CLRW    TRG_CTL+8						      ; 1195

				       7D  11 0004B 1$:     BRB     3$							      ; 1190

		         52	       1E  CE 0004D 2$:     MNEGL   #30, STATUS						      ; 1209

				       7E  7C 00050 	    CLRQ    -(SP)						      ; 1207

				  40   AE  9F 00052 	    PUSHAB  LOCBF_DSC						      ;

				       7E  D4 00055 	    CLRL    -(SP)						      ;

		         7E	       6B  3C 00057 	    MOVZWL  TRG_CTL+8, -(SP)					      ;

	      00000000G  9F	       05  FB 0005A 	    CALLS   #5, @#SYS$GETCHN					      ;

		         66	       50  E9 00061 	    BLBC    R0, 3$						      ;

		    08   AE	       05  D0 00064 	    MOVL    #5, LOCBF+8						      ; 1222

		    06   AE	0258   8F  B0 00068 	    MOVW    #600, LOCBF+6					      ; 1224

				       7E  7C 0006E 	    CLRQ    -(SP)						      ; 1232

				       7E  7C 00070 	    CLRQ    -(SP)						      ;

				       7E  D4 00072 	    CLRL    -(SP)						      ;

				  18   AE  9F 00074 	    PUSHAB  LOCBF+4						      ;

				       7E  7C 00077 	    CLRQ    -(SP)						      ;

				       7E  D4 00079 	    CLRL    -(SP)						      ;

		         7E	  A3   8F  9A 0007B 	    MOVZBL  #163, -(SP)						      ;

		         7E	       6B  3C 0007F 	    MOVZWL  TRG_CTL+8, -(SP)					      ;

				       7E  D4 00082 	    CLRL    -(SP)						      ;

		         6A	       0C  FB 00084 	    CALLS   #12, SYS$QIOW					      ;

				       7E  7C 00087 	    CLRQ    -(SP)						      ; 1241

		         7E	       02  7D 00089 	    MOVQ    #2, -(SP)						      ;

				       7E  D4 0008C 	    CLRL    -(SP)						      ;

				  18   AE  9F 0008E 	    PUSHAB  LOCBF+4						      ;

				       7E  7C 00091 	    CLRQ    -(SP)						      ;

				  10   AB  9F 00093 	    PUSHAB  TRG_IOSB						      ; 1130



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 7-3

; Digital Equipment Corporation

;

		         7E	  63   8F  9A 00096 	    MOVZBL  #99, -(SP)						      ; 1241

		         7E	       6B  3C 0009A 	    MOVZWL  TRG_CTL+8, -(SP)					      ;

				       7E  D4 0009D 	    CLRL    -(SP)						      ;

		         6A	       0C  FB 0009F 	    CALLS   #12, SYS$QIOW					      ;

		         25	       50  E9 000A2 	    BLBC    R0, 3$						      ;

		         21	  10   AB  E9 000A5 	    BLBC    TRG_IOSB, 3$					      ; 1243

				       7E  7C 000A9 	    CLRQ    -(SP)						      ; 1253

				       7E  7C 000AB 	    CLRQ    -(SP)						      ;

				       7E  D4 000AD 	    CLRL    -(SP)						      ;

				0000V  CF  9F 000AF 	    PUSHAB  TARG_ATTNAST					      ;

				       7E  7C 000B3 	    CLRQ    -(SP)						      ;

				       7E  D4 000B5 	    CLRL    -(SP)						      ;

		         7E	0123   8F  3C 000B7 	    MOVZWL  #291, -(SP)						      ;

		         7E	       6B  3C 000BC 	    MOVZWL  TRG_CTL+8, -(SP)					      ;

				       7E  D4 000BF 	    CLRL    -(SP)						      ;

		         6A	       0C  FB 000C1 	    CALLS   #12, SYS$QIOW					      ;

		         03	       50  E9 000C4 	    BLBC    R0, 3$						      ;

		         52	       01  D0 000C7 	    MOVL    #1, STATUS						      ; 1255

		         05	       52  E9 000CA 3$:     BLBC    STATUS, 4$						      ; 1266

				  04   AC  D5 000CD 	    TSTL    FCT							      ;

				       0A  12 000D0 	    BNEQ    5$							      ;

		         7E	       6B  3C 000D2 4$:     MOVZWL  TRG_CTL+8, -(SP)					      ; 1268

	      00000000G  9F	       01  FB 000D5 	    CALLS   #1, @#SYS$DASSGN					      ;

		    F8   AB	       52  90 000DC 5$:     MOVB    STATUS, TRG_CTL					      ; 1274

				  18   AB  DD 000E0 	    PUSHL   TRG_CTL+32						      ; 1276

	      00000000G  9F	       01  FB 000E3 	    CALLS   #1, @#SYS$SETEF					      ;

				       54  DD 000EA 	    PUSHL   AST_STA						      ; 1277

		         69	       01  FB 000EC 	    CALLS   #1, SYS$SETAST					      ;

		         50	       52  D0 000EF 	    MOVL    STATUS, R0						      ; 1278

					   04 000F2 	    RET     							      ; 1130



; Routine Size:  243 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 8

; Digital Equipment Corporation

;

;	1280	GLOBAL ROUTINE  TARG_IO (FCT) : =

;	1281	

;	1282	!++

;	1283	! FUNCTIONAL DESCRIPTION:

;	1284	!

;	1285	!	>> THIS ROUTINE MUST BE RECURSIVE <<

;	1286	!

;	1287	!	Issues QIO to transmit or receive a message to the TARGET node.

;	1288	!	If a transmit is requested and the retry counter is decremented

;	1289	!	to zero, then the QIO is not issued.  If a recieve is requested

;	1290	!	and there is a message residing in the TCB$A_INTDDSC buffer it

;	1291	!	is xfered to TCB$A_RCVDDSC, else a read QIO is issued using the

;	1292	!	buffer described by TCB$A_INTDDSC.

;	1293	!

;	1294	!	This routine works in cooperation with the TARG_ATTNAST and

;	1295	!	TARG_IOAST ast routines.

;	1296	!

;	1297	! FORMAL PARAMETERS:

;	1298	!

;	1299	!	FCT	-	0 => transmit

;	1300	!			1 => receive.

;	1301	!

;	1302	! IMPLICIT INPUTS:

;	1303	!

;	1304	!	TCB$W_CHAN	- the channel used for the transmit.

;	1305	!	TARG_IOAST	- the name of the IO ast which receives control

;	1306	!			  upon completion.

;	1307	!	TARG_TMRAST	- the name of the timeout ast.

;	1308	!	TCB$A_XMTDDSC	- addr of double descriptor of message being 

;	1309	!			  sent.

;	1310	!	TCB$A_RCVDDSC	- addr of double descriptor of receive buffer

;	1311	!	TCB$A_INTDDSC	- addr of double descriptor of the intermediate

;	1312	!			  buffer used in the receive.

;	1313	!	TCB$B_RETRIES	- current retry counter value indicating the

;	1314	!			  number of remaining retries for the current

;	1315	!			  message before a fatal error occurs.

;	1316	!

;	1317	! IMPLICIT OUTPUTS:

;	1318	!

;	1319	!	TCB$Z_IOSB	- IO status block associated with the QIO is

;	1320	!			  valid when the QIO's AST is delivered.

;	1321	!

;	1322	! ROUTINE VALUE:

;	1323	! COMPLETION CODES:

;	1324	!

;	1325	!	TCB$B_STATUS	- set to NIC$_LN_COMERR if a fatal problem is

;	1326	!			  encountered, unchanged otherwise.

;	1327	!	R0		- Returns the value stored in TCB$B_STATUS.

;	1328	!

;	1329	! SIDE EFFECTS:

;	1330	!

;	1331	!	- TCB$B_RETRIES is decremented.

;	1332	!	- Ast's TARG_IOAST and TARG_TMRAST may be "queued".

;	1333	!	- Ast TARG_IOAST may be called as a procedure.

;	1334	!	- The message in the TCB$A_INTDDSC buffer is always zeroed.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 8-1

; Digital Equipment Corporation

;

;	1335	!

;	1336	!--

;	1337	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 9

; Digital Equipment Corporation

;

;	1338	BEGIN

;	1339	LITERAL	YES = 1, NO = 0, CANNOTTELL = 2 ;

;	1340	LOCAL	STATUS, ASTPENDING, AST_FORMER_STA ;

;	1341	BIND	TRG_IOSB =  TRG_CTL [TCB$Z_IOSB]	: IO_SB,

;	1342		INT_DDSC = .TRG_CTL [TCB$A_INTDDSC]	: DDSC ;

;	1343	

;	1344	

;	1345	STATUS = TRUE ;			    ! Initialize to no error.

;	1346	AST_FORMER_STA = 

;	1347		$SETAST (ENBFLG = FALSE) ;  ! disabel ast's for now

;	1348	ASTPENDING = YES  ;		    ! Init flag. This flag will be 

;	1349					    ! modified if no QIOs are issued.

;	1350	$CLREF (EFN = .TRG_CTL [TCB$L_EFN]) ; ! This event flag will be set at

;	1351					    ! the end of the routine if no 

;	1352					    ! AST's are pending.

;	1353	IF  .FCT EQL 0

;	1354	THEN

;	1355	    !+

;	1356	    ! Request is for a transmit

;	1357	    !-

;	1358	

;	1359	    IF  .TRG_CTL [TCB$B_RETRIES] - 1 GEQ 0	! Note signed comparison

;	1360	    THEN

;	1361		BEGIN

;	1362		BIND	XMT_DDSC = .TRG_CTL [TCB$A_XMTDDSC]	: DDSC ;

;	1363	

;	1364		TRG_CTL [TCB$B_RETRIES] = .TRG_CTL [TCB$B_RETRIES] - 1 ;

;	1365		STATUS =  $QIO  (FUNC   = IO$_WRITEVBLK,

;     P 1366				 CHAN   = .TRG_CTL [TCB$W_CHAN],

;     P 1367				 IOSB   = TRG_IOSB,

;     P 1368				 ASTADR = TARG_IOAST,

;     P 1369				 ASTPRM = 0,		! indicates xmit

;     P 1370	

;     P 1371				 P1     = .XMT_DDSC [STR_PTR],

;     P 1372				 P2     = .XMT_DDSC [STR_LNG]

;     P 1373				)

;	1374		END

;	1375	    ELSE 

;	1376		STATUS = FALSE

;	1377	ELSE

;	1378	    !+

;	1379	    ! Request is for a receive

;	1380	    !-

;	1381	

;	1382	    BEGIN

;	1383	    BIND	RCV_DDSC = .TRG_CTL [TCB$A_RCVDDSC]	: DDSC ;

;	1384	

;	1385	    RCV_DDSC [STR_LNG] = 0 ;		! Nullify message currently 

;	1386						! in the final receive buffer.

;	1387	

;	1388	    IF  .INT_DDSC [STR_LNG]  NEQ  0	! Does INT_DDSC contain a msg ?

;	1389	    THEN



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 10

; Digital Equipment Corporation

;

;	1390		!+

;	1391		! Yes, (due a receive issued by TARG_ATTNAST) simulate a

;	1392		! receive completion AST to share code in processing the

;	1393		! received message.

;	1394		!-

;	1395	

;	1396		BEGIN

;	1397		TRG_IOSB [IO_STAT] = TRUE ;

;	1398		TRG_IOSB [IO_CNT]  = .INT_DDSC [STR_LNG] ;

;	1399	

;	1400		TARG_IOAST (1) ;	! 1 indicates receive AST

;	1401	

;	1402		!+

;	1403		! Routine TARG_IOAST is given the responsiblity of setting

;	1404		! TRG_CTL [TCB$L_EFN] or reissueing a QIO (it issues QIO's by

;	1405		! recalling this routine).  We cannot tell from here if an AST

;	1406		! is pending -- thus the following.

;	1407		!-

;	1408	

;	1409		ASTPENDING = CANNOTTELL ;

;	1410		END

;	1411	    ELSE

;	1412		!+

;	1413		! No, issue the receive and let TARG_IOAST handle its

;	1414		! completion.

;	1415		!-

;	1416	

;	1417		STATUS =  $QIO  (FUNC   = IO$_READVBLK,

;     P 1418				 CHAN   = .TRG_CTL [TCB$W_CHAN],

;     P 1419				 IOSB   = TRG_IOSB,

;     P 1420				 ASTADR = TARG_IOAST,

;     P 1421				 ASTPRM = 1,		! indicates receive

;     P 1422	

;     P 1423				 P1     = .INT_DDSC [BUF_PTR],

;     P 1424				 P2     = .INT_DDSC [BUF_LNG]

;     P 1425				) ;

;	1426	    END ;

;	1427	

;	1428	!+

;	1429	! If all has gone well so far and a QIO's AST is outstanding

;	1430	! then set the timeout timer.

;	1431	!-

;	1432	

;	1433	IF  .STATUS AND (.ASTPENDING EQL YES)

;	1434	THEN

;	1435	    BEGIN

;	1436	    LOCAL	TIMEOUT : VECTOR [2,LONG,SIGNED] ;

;	1437	

;	1438	    !+

;	1439	    ! The high order longword is use here merely for the sign bit

;	1440	    ! extensions.  The low order longword contains the timeout interval

;	1441	    ! after it is convert from the time given in seconds in the TCB.

;	1442	    !-

;	1443	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 11

; Digital Equipment Corporation

;

;	1444	    TIMEOUT [1] = -1 ;

;	1445	    TIMEOUT [0] = -10 * 1000 * 1000 * .TRG_CTL [TCB$B_MOPTIMOUT] ;

;	1446	

;	1447	    STATUS = $SETIMR (ASTADR = TARG_TMRAST, DAYTIM = TIMEOUT) ;

;	1448	    END ;

;	1449	

;	1450	

;	1451	

;	1452	!+

;	1453	! Check for problems

;	1454	!-

;	1455	

;	1456	IF  NOT .STATUS  THEN	BEGIN

;	1457		    		$CANCEL (CHAN = .TRG_CTL [TCB$W_CHAN]) ;

;	1458				TRG_CTL [TCB$B_STATUS] = NIC$_LN_COMERR ;

;	1459				ASTPENDING = NO ;

;	1460				END ;

;	1461	

;	1462	!+

;	1463	! If no AST's are outstanding then inform the world via the system

;	1464	! event flag.

;	1465	!-

;	1466	   IF .ASTPENDING EQL NO  THEN  $SETEF (EFN = .TRG_CTL [TCB$L_EFN]) ;

;	1467	

;	1468	!+

;	1469	! Finish up by zeroing the message currently stored in the INT_DDSC

;	1470	! buffer.  It is proper to do this at all times since if the function

;	1471	! requested was a receive then the message stored in INT_DDSC was

;	1472	! either xfered to RCV_DDSC via TARG_IOAST, or a receive AST is 

;	1473	! pending.  If the  requested function was a transmit then the message

;	1474	! stored in INT_DDSC cannot possibly be valid since the target should

;	1475	! only send messages in response the message which we have sent it.

;	1476	!-

;	1477	

;	1478	INT_DDSC [STR_LNG] = 0 ;

;	1479	

;	1480	!+

;	1481	! Restore the ast state to its former state

;	1482	!-

;	1483	

;	1484	$SETAST (ENBFLG = .AST_FORMER_STA) ;

;	1485	

;	1486	RETURN (.TRG_CTL[TCB$B_STATUS]) ;

;	1487	END ;







							    .GLOBL  SYS$CLREF, SYS$QIO, SYS$SETIMR, SYS$CANCEL



					 0E3C 000F3 	    .ENTRY  TARG_IO, Save R2,R3,R4,R5,R9,R10,R11		      ; 1280

		         59	0000V  CF  9E 000F5 	    MOVAB   TARG_IOAST, R9					      ;

		         5A 00000000G  9F  9E 000FA 	    MOVAB   @#SYS$SETAST, R10					      ;

		         5B	0000G  CF  9E 00101 	    MOVAB   TRG_IOSB, R11					      ;

		         5E	       08  C2 00106 	    SUBL2   #8, SP						      ;

		         52	  FC   AB  D0 00109 	    MOVL    TRG_CTL+20, R2					      ; 1338



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 11-1

; Digital Equipment Corporation

;

		         53	       01  D0 0010D 	    MOVL    #1, STATUS						      ; 1345

				       7E  D4 00110 	    CLRL    -(SP)						      ; 1347

		         6A	       01  FB 00112 	    CALLS   #1, SYS$SETAST					      ;

		         55	       50  D0 00115 	    MOVL    R0, AST_FORMER_STA					      ;

		         54	       01  D0 00118 	    MOVL    #1, ASTPENDING					      ; 1348

				  08   AB  DD 0011B 	    PUSHL   TRG_CTL+32						      ; 1350

	      00000000G  9F	       01  FB 0011E 	    CALLS   #1, @#SYS$CLREF					      ;

				  04   AC  D5 00125 	    TSTL    FCT							      ; 1353

				       26  12 00128 	    BNEQ    2$							      ;

		         50	  EA   AB  9A 0012A 	    MOVZBL  TRG_CTL+2, R0					      ; 1359

				       50  D7 0012E 	    DECL    R0							      ;

				       1A  19 00130 	    BLSS    1$							      ;

		         50	  F4   AB  D0 00132 	    MOVL    TRG_CTL+12, R0					      ; 1361

				  EA   AB  97 00136 	    DECB    TRG_CTL+2						      ; 1364

				       7E  7C 00139 	    CLRQ    -(SP)						      ; 1373

				       7E  7C 0013B 	    CLRQ    -(SP)						      ;

				       60  DD 0013D 	    PUSHL   (R0)						      ;

				  04   A0  DD 0013F 	    PUSHL   4(R0)						      ;

				       7E  D4 00142 	    CLRL    -(SP)						      ;

				       59  DD 00144 	    PUSHL   R9							      ;

				       5B  DD 00146 	    PUSHL   R11							      ; 1280

				       30  DD 00148 	    PUSHL   #48							      ; 1373

				       31  11 0014A 	    BRB     4$							      ;

				       53  D4 0014C 1$:     CLRL    STATUS						      ; 1376

				       3D  11 0014E 	    BRB     5$							      ; 1353

		         50	  F8   AB  D0 00150 2$:     MOVL    TRG_CTL+16, R0					      ; 1382

				       60  D4 00154 	    CLRL    (R0)						      ; 1385

				       62  D5 00156 	    TSTL    (R2)						      ; 1388

				       11  13 00158 	    BEQL    3$							      ;

		         6B	       01  B0 0015A 	    MOVW    #1, TRG_IOSB					      ; 1397

		    02   AB	       62  B0 0015D 	    MOVW    (R2), TRG_IOSB+2					      ; 1398

				       01  DD 00161 	    PUSHL   #1							      ; 1400

		         69	       01  FB 00163 	    CALLS   #1, TARG_IOAST					      ;

		         54	       02  D0 00166 	    MOVL    #2, ASTPENDING					      ; 1409

				       22  11 00169 	    BRB     5$							      ; 1388

				       7E  7C 0016B 3$:     CLRQ    -(SP)						      ; 1425

				       7E  7C 0016D 	    CLRQ    -(SP)						      ;

				  08   A2  DD 0016F 	    PUSHL   8(R2)						      ;

				  0C   A2  DD 00172 	    PUSHL   12(R2)						      ;

				       01  DD 00175 	    PUSHL   #1							      ;

				       59  DD 00177 	    PUSHL   R9							      ;

				       5B  DD 00179 	    PUSHL   R11							      ; 1280

				       31  DD 0017B 	    PUSHL   #49							      ; 1425

		         7E	  F0   AB  3C 0017D 4$:     MOVZWL  TRG_CTL+8, -(SP)					      ;

				       7E  D4 00181 	    CLRL    -(SP)						      ;

	      00000000G  9F	       0C  FB 00183 	    CALLS   #12, @#SYS$QIO					      ;

		         53	       50  D0 0018A 	    MOVL    R0, STATUS						      ;

		         2D	       53  E9 0018D 5$:     BLBC    STATUS, 7$						      ; 1433

		         01	       54  D1 00190 	    CMPL    ASTPENDING, #1					      ;

				       25  12 00193 	    BNEQ    6$							      ;

		    04   AE	       01  CE 00195 	    MNEGL   #1, TIMEOUT+4					      ; 1444

		         50	  EC   AB  9A 00199 	    MOVZBL  TRG_CTL+4, R0					      ; 1445

	   6E	         50 FF676980   8F  C5 0019D 	    MULL3   #-10000000, R0, TIMEOUT				      ;

				       7E  D4 001A5 	    CLRL    -(SP)						      ; 1447

				0000V  CF  9F 001A7 	    PUSHAB  TARG_TMRAST						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 11-2

; Digital Equipment Corporation

;

				  08   AE  9F 001AB 	    PUSHAB  TIMEOUT						      ;

				       7E  D4 001AE 	    CLRL    -(SP)						      ;

	      00000000G  9F	       04  FB 001B0 	    CALLS   #4, @#SYS$SETIMR					      ;

		         53	       50  D0 001B7 	    MOVL    R0, STATUS						      ;

		         11	       53  E8 001BA 6$:     BLBS    STATUS, 8$						      ; 1456

		         7E	  F0   AB  3C 001BD 7$:     MOVZWL  TRG_CTL+8, -(SP)					      ; 1457

	      00000000G  9F	       01  FB 001C1 	    CALLS   #1, @#SYS$CANCEL					      ;

		    E8   AB	       14  8E 001C8 	    MNEGB   #20, TRG_CTL					      ; 1458

				       54  D4 001CC 	    CLRL    ASTPENDING						      ; 1459

				       54  D5 001CE 8$:     TSTL    ASTPENDING						      ; 1466

				       0A  12 001D0 	    BNEQ    9$							      ;

				  08   AB  DD 001D2 	    PUSHL   TRG_CTL+32						      ;

	      00000000G  9F	       01  FB 001D5 	    CALLS   #1, @#SYS$SETEF					      ;

				       62  D4 001DC 9$:     CLRL    (R2)						      ; 1478

				       55  DD 001DE 	    PUSHL   AST_FORMER_STA					      ; 1484

		         6A	       01  FB 001E0 	    CALLS   #1, SYS$SETAST					      ;

		         50	  E8   AB  98 001E3 	    CVTBL   TRG_CTL, R0						      ; 1486

					   04 001E7 	    RET     							      ; 1280



; Routine Size:  245 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 12

; Digital Equipment Corporation

;

;	1488	GLOBAL ROUTINE  TARG_IOAST (FCT) : NOVALUE =

;	1489	

;	1490	++

;	1491	! FUNCTIONAL DESCRIPTION:

;	1492	!

;	1493	!	This is the AST which receives control whenever a TARGET

;	1494	!	receive or transmit completes.  A retry of the last transmit

;	1495	!	is issued if any QIO problems are sensed.  A receive is

;	1496	!	issued if the last QIO was a successful transmit and flag

;	1497	!	TCB$B_IMPLDRCV is set, else flag .TRG_CTL [TCB$L_EFN] is set.

;	1498	!	Flag TRG_CTL [TCB$L_EFN] is set if the last QIO was a receive.

;	1499	!	Flag TCB$B_STATUS is set if the received message violated

;	1500	!	the MOP protocol.

;	1501	!

;	1502	! FORMAL PARAMETERS:

;	1503	!

;	1504	!	FCT	-	0 => transmit ast

;	1505	!			1 => receive ast

;	1506	!

;	1507	! IMPLICIT INPUTS:

;	1508	!

;	1509	!	TCB$B_IMPLDRCV	- Indicates whether or not a receive is

;	1510	!			  to follow a transmit.

;	1511	!	TCB$Z_IOSB	- The IO status block used in the last QIO

;	1512	!	TCB$A_INTDDSC	- addr of  double descriptor of intermediate

;	1513	!			  buffer used in the receive QIO.

;	1514	!	TCB$A_RCVDDSC	- addr. of double descriptor of the buffer into

;	1515	!			  which a message received in TCB$A_INTDDSC

;	1516	!			  is transferred.

;	1517	!

;	1518	! IMPLICIT OUTPUTS:

;	1519	!

;	1520	!	The event flag named by the TCB$L_EFN field will be set if

;	1521	!	the routine exits with no oustanding AST's.

;	1522	!

;	1523	! ROUTINE VALUE:

;	1524	! COMPLETION CODES:

;	1525	!

;	1526	!	TCB$B_STATUS is set to NIC$_LNPROTERR if a received MOP message

;	1527	!	violates the protocol.

;	1528	!

;	1529	! SIDE EFFECTS:

;	1530	!

;	1531	!	The pending timeout timer is cancelled.  A receive or a

;	1532	!	transmit may be issued using TARG_IO, which will also reset.

;	1533	!	the timer.

;	1534	!

;	1535	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 13

; Digital Equipment Corporation

;

;	1536	BEGIN

;	1537	BIND	TRG_IOSB =  TRG_CTL [TCB$Z_IOSB]	: IO_SB,

;	1538		XMT_DDSC = .TRG_CTL [TCB$A_XMTDDSC] 	: DDSC ;

;	1539	

;	1540	LOCAL	DONE ;

;	1541	DONE = FALSE ;			! preset done indicators

;	1542	$CANTIM () ;			! Cancel timeout timer

;	1543	

;	1544	!+

;	1545	! NOTE - The value of TRG_CTL[TCB$B_STATUS] is subject to modification

;	1546	!	 by routine TARG_IO.  This routine may be called below in several

;	1547	!	 places.

;	1548	!-

;	1549	

;	1550	IF  .FCT EQL 0		! 0 => transmit

;	1551	THEN

;	1552	    !+

;	1553	    ! this is a transmit AST

;	1554	    !-

;	1555	

;	1556	    IF  NOT .TRG_IOSB [IO_STAT]		! Was I/O successful ?

;	1557	    THEN				! NO

;	1558		TARG_IO (0)			! retry the transmit

;	1559	    ELSE				! YES

;	1560		IF  .TRG_CTL [TCB$B_IMPLDRCV]	! does an implicit receive 

;	1561		THEN				! follow the the transmit ?

;	1562		    TARG_IO (1)			! 1 => receive

;	1563		ELSE

;	1564		    DONE = TRUE

;	1565	ELSE

;	1566	    !+

;	1567	    ! This is a receive ast

;	1568	    !-

;	1569	

;	1570	    BEGIN

;	1571	    BIND    RCV_DDSC = .TRG_CTL [TCB$A_RCVDDSC]  : DDSC,

;	1572		    INT_DDSC = .TRG_CTL [TCB$A_INTDDSC]  : DDSC ;

;	1573	

;	1574		!+

;	1575		! the first two bytes of the MOP message contain the message

;	1576		! type followed by (contingent upon msg type) the load number

;	1577		!-

;	1578	

;	1579	    BIND   XMT_HEADER = .XMT_DDSC [STR_PTR] : VECTOR [2,BYTE],

;	1580		   RCV_HEADER = .RCV_DDSC [BUF_PTR] : VECTOR [10,BYTE] ;

;	1581	

;	1582	    IF  (NOT .TRG_IOSB [IO_STAT])  OR  (.TRG_IOSB [IO_CNT] EQL 0)

;	1583	    THEN

;	1584		TARG_IO (0)			! Retry the transmit, TARG_IO

;	1585						! will detect retry threshold

;	1586						! conditions.

;	1587	    ELSE



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 14

; Digital Equipment Corporation

;

;	1588		BEGIN

;	1589	

;	1590		!+

;	1591		! Transfer the message from the QIO receive buffer to the

;	1592		! TCB$A_RCVDDSC buffer, and record the received message type.

;	1593		!-

;	1594	

;	1595		CH$MOVE (.TRG_IOSB [IO_CNT],	! length

;	1596			 .INT_DDSC [STR_PTR],	! source

;	1597			 .RCV_DDSC [BUF_PTR]	! destination

;	1598			) ;

;	1599	

;	1600		TRG_CTL [TCB$B_RCVMOPTYP] = .RCV_HEADER [0] ;

;	1601	

;	1602	

;	1603		RCV_DDSC [STR_LNG] = .TRG_IOSB [IO_CNT] ;

;	1604		RCV_DDSC [STR_PTR] = .RCV_DDSC [BUF_PTR] ;

;	1605	

;	1606	

;	1607		!+

;	1608		! now check the suitiblity of the received message according

;	1609		! to the message type sent, its load number etc.

;	1610		!-

;	1611	

;	1612		SELECTONE .XMT_HEADER [0]  OF    ! msg type is in byte 0

;	1613		  SET

;	1614		  [MOP$K_MEMLOAD,

;	1615		   MOP$K_MEMLOADX,

;	1616		   MOP$K_PARAMS] :

;	1617	

;	1618			SELECTONE  .RCV_HEADER [0]  OF

;	1619			  SET

;	1620			  [MOP$K_PGMREQ] : 

;	1621	

;	1622				!+

;	1623				! If the program request is for the program

;	1624				! just loaded, then reload it if possible (i.e.,

;	1625				! if the load number is 0). Otherwise we are

;	1626				! done -- it is the responsiblity of the routine

;	1627				! which caused the receive to be issued to 

;	1628				! interpret the program request and to determine

;	1629				! whether or not it is expected.

;	1630				!-

;	1631				

;	1632				IF  .RCV_DDSC [STR_LNG] LSSU 3

;	1633				THEN

;	1634				    !+

;	1635				    ! 3 is the minimum legal 'pgm req' message length

;	1636	

;	1637				    TRG_CTL [TCB$B_STATUS] = NIC$_LNPROTERR

;	1638				ELSE



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 15

; Digital Equipment Corporation

;

;	1639				    BEGIN

;	1640				    LOCAL	PGMTYP ;

;	1641	

;	1642				    !+

;	1643				    ! Get the requested program type from the 

;	1644				    ! message, or use the default.

;	1645	

;	1646				    IF  .RCV_DDSC [STR_LNG] EQL 3

;	1647				    THEN

;	1648					PGMTYP = 0		! Default

;	1649				    ELSE

;	1650					PGMTYP = .RCV_HEADER [3] ;

;	1651	

;	1652				    !+

;	1653				    ! Restart the load if necessary and if 

;	1654				    ! possible.

;	1655	

;	1656				    IF  .PGMTYP  EQL 		  ! Same program

;	1657					.TRG_CTL [TCB$B_PGM]	  ! type ?

;	1658				    THEN

;	1659					IF  .XMT_HEADER [1] EQL 0 ! load num = 0 ?

;	1660					THEN 

;	1661					    TARG_IO (0)		  ! Retransmit

;	1662					ELSE

;	1663					    DONE = TRUE

;	1664				    ELSE

;	1665					DONE = TRUE ;

;	1666				    END ;

;	1667	

;	1668	

;	1669			  [MOP$K_REQLOAD] :

;	1670	

;	1671				!+

;	1672				! If the next load number is being requested

;	1673				! we are done, if the former load number is

;	1674				! requested attempt to retransmit it, else

;	1675				! an error condition exists.

;	1676	

;	1677				IF  .RCV_DDSC [STR_LNG] LSSU 2	! is msg size ok

;	1678				THEN

;	1679				    TRG_CTL[TCB$B_STATUS] = NIC$_LNPROTERR

;	1680				ELSE

;	1681				    IF  .RCV_HEADER [1]  EQL  .XMT_HEADER [1]

;	1682				    THEN

;	1683					TARG_IO (0)			! retransmit

;	1684				    ELSE

;	1685					!+

;	1686					! Note that the load number is mod 256.

;	1687					!-

;	1688					BEGIN

;	1689					LOCAL	TMP : BYTE ;

;	1690					TMP = .XMT_HEADER[1] + 1 ;

;	1691					IF  .RCV_HEADER[1]  NEQ  .TMP

;	1692					THEN

;	1693					    TRG_CTL[TCB$B_STATUS] = NIC$_LNPROTERR



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 15-1

; Digital Equipment Corporation

;

;	1694					ELSE

;	1695					    DONE = TRUE ;

;	1696					END ;

;	1697			  TES ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 16

; Digital Equipment Corporation

;

;	1698		  [MOP$K_ENTERMOP] :

;	1699	

;	1700			!+

;	1701			! Retry the previous transmit until the message

;	1702			! received is a program request, or until the retry

;	1703			! threshold is surpassed.  The contents of the message

;	1704			! are not checked further since there is no program 

;	1705			! currently being loaded and it is therefore not

;	1706			! possible to restart the load.

;	1707	

;	1708			IF  .RCV_HEADER [0] NEQ MOP$K_PGMREQ

;	1709			THEN

;	1710			    TARG_IO (0)		! 0 => xmit.  TARG_IO detects

;	1711			ELSE			! retry threshold ocnditions.

;	1712			    DONE = TRUE ;

;	1713		  TES ;

;	1714		END ;

;	1715	    END ;

;	1716	!+

;	1717	! If we are done without error then update the count of messages

;	1718	! received and transmitted.  If FCT is 0 then update the xmit count,

;	1719	! if FCT is 1 then update the receive count, if FCT is 1 and the

;	1720	! implied receive bit is also set, then also update the transmit

;	1721	! count since it was not updated as a result of the transmit because

;	1722	! the DONE flag was not set at that time.

;	1723	!-

;	1724	

;	1725	    IF  .DONE AND .TRG_CTL[TCB$B_STATUS]

;	1726	    THEN

;	1727		IF  .FCT EQL 0

;	1728		THEN

;	1729		    TRG_CTL[TCB$W_XMITS] = .TRG_CTL[TCB$W_XMITS] + 1

;	1730		ELSE

;	1731		    BEGIN

;	1732		    TRG_CTL[TCB$W_RECEIVES] = .TRG_CTL[TCB$W_RECEIVES] + 1 ;

;	1733		    IF  .TRG_CTL[TCB$B_IMPLDRCV]

;	1734		    THEN

;	1735			TRG_CTL[TCB$W_XMITS] = .TRG_CTL[TCB$W_XMITS] + 1 ;

;	1736		    END ;

;	1737	

;	1738	!+

;	1739	! If the DONE flag is set or if TCB$B_STATUS idicates an error then there

;	1740	! are no AST's pending and the event flag should be set.  Otherwise 

;	1741	! routine TARG_IO must have been called -- and it set or cleared the

;	1742	! event flag depending upon whether or not an IO requet was queued.

;	1743	!-

;	1744	

;	1745	    IF  .DONE  OR  NOT .TRG_CTL[TCB$B_STATUS]

;	1746	    THEN

;	1747		$SETEF (EFN = .TRG_CTL [TCB$L_EFN]) ;

;	1748	RETURN (.TRG_CTL[TCB$B_STATUS]) ;

;	1749	END ;









; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 16-1

; Digital Equipment Corporation

;

							    .GLOBL  SYS$CANTIM



					 0FFC 001E8 	    .ENTRY  TARG_IOAST, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 1488

		         5B	0000G  CF  9E 001EA 	    MOVAB   TRG_IOSB, R11					      ;

		         53	  F4   AB  D0 001EF 	    MOVL    TRG_CTL+12, R3					      ; 1536

				       59  D4 001F3 	    CLRL    DONE						      ; 1541

				       7E  7C 001F5 	    CLRQ    -(SP)						      ; 1542

	      00000000G  9F	       02  FB 001F7 	    CALLS   #2, @#SYS$CANTIM					      ;

				       5A  D4 001FE 	    CLRL    R10							      ; 1550

				  04   AC  D5 00200 	    TSTL    FCT							      ;

				       11  12 00203 	    BNEQ    2$							      ;

				       5A  D6 00205 	    INCL    R10							      ;

		         6D	       6B  E9 00207 	    BLBC    TRG_IOSB, 6$					      ; 1556

		         03	  EB   AB  E8 0020A 	    BLBS    TRG_CTL+3, 1$					      ; 1560

				     009D  31 0020E 	    BRW     12$							      ;

				       01  DD 00211 1$:     PUSHL   #1							      ; 1562

				     0091  31 00213 	    BRW     11$							      ;

		         56	  F8   AB  D0 00216 2$:     MOVL    TRG_CTL+16, R6					      ; 1570

		         52	  FC   AB  D0 0021A 	    MOVL    TRG_CTL+20, R2					      ;

		         57	  04   A3  D0 0021E 	    MOVL    4(R3), R7						      ;

		         58	  0C   A6  D0 00222 	    MOVL    12(R6), R8						      ;

		         7C	       6B  E9 00226 	    BLBC    TRG_IOSB, 10$					      ; 1582

				  02   AB  B5 00229 	    TSTW    TRG_IOSB+2						      ;

				       77  13 0022C 	    BEQL    10$							      ;

		         50	  02   AB  3C 0022E 	    MOVZWL  TRG_IOSB+2, R0					      ; 1595

      0C   B6	    04   B2	       50  28 00232 	    MOVC3   R0, @4(R2), @12(R6)					      ;

		    E9   AB	       68  90 00238 	    MOVB    (R8), TRG_CTL+1					      ; 1600

		         66	  02   AB  3C 0023C 	    MOVZWL  TRG_IOSB+2, (R6)					      ; 1603

		    04   A6	  0C   A6  D0 00240 	    MOVL    12(R6), 4(R6)					      ; 1604

				       67  95 00245 	    TSTB    (R7)						      ; 1612

				       0A  13 00247 	    BEQL    3$							      ;

		         02	       67  91 00249 	    CMPB    (R7), #2						      ;

				       05  13 0024C 	    BEQL    3$							      ;

		         14	       67  91 0024E 	    CMPB    (R7), #20						      ;

				       48  12 00251 	    BNEQ    9$							      ;

		         08	       68  91 00253 3$:     CMPB    (R8), #8						      ; 1618

				       21  12 00256 	    BNEQ    7$							      ;

		         03	       66  D1 00258 	    CMPL    (R6), #3						      ; 1632

				       38  1F 0025B 	    BLSSU   8$							      ;

		         03	       66  D1 0025D 	    CMPL    (R6), #3						      ; 1646

				       04  12 00260 	    BNEQ    4$							      ;

				       50  D4 00262 	    CLRL    PGMTYP						      ; 1648

				       04  11 00264 	    BRB     5$							      ; 1646

		         50	  03   A8  9A 00266 4$:     MOVZBL  3(R8), PGMTYP					      ; 1650

      ED   AB	         08	       00  ED 0026A 5$:     CMPZV   #0, #8, TRG_CTL+5, PGMTYP				      ; 1656

				       50     0026F									      ;

				       3C  12 00270 	    BNEQ    12$							      ;

				  01   A7  95 00272 	    TSTB    1(R7)						      ; 1659

				       37  12 00275 	    BNEQ    12$							      ;

				       2C  11 00277 6$:     BRB     10$							      ; 1661

		         0A	       68  91 00279 7$:     CMPB    (R8), #10						      ; 1618

				       33  12 0027C 	    BNEQ    13$							      ;

		         02	       66  D1 0027E 	    CMPL    (R6), #2						      ; 1677

				       12  1F 00281 	    BLSSU   8$							      ;

		    01   A7	  01   A8  91 00283 	    CMPB    1(R8), 1(R7)					      ; 1681



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 16-2

; Digital Equipment Corporation

;

				       1B  13 00288 	    BEQL    10$							      ;

	   50	    01   A7	       01  81 0028A 	    ADDB3   #1, 1(R7), TMP					      ; 1690

		         50	  01   A8  91 0028F 	    CMPB    1(R8), TMP						      ; 1691

				       19  13 00293 	    BEQL    12$							      ;

		    E8   AB	       22  8E 00295 8$:     MNEGB   #34, TRG_CTL					      ; 1693

				       16  11 00299 	    BRB     13$							      ; 1691

		         06	       67  91 0029B 9$:     CMPB    (R7), #6						      ; 1612

				       11  12 0029E 	    BNEQ    13$							      ;

		         08	       68  91 002A0 	    CMPB    (R8), #8						      ; 1708

				       09  13 002A3 	    BEQL    12$							      ;

				       7E  D4 002A5 10$:    CLRL    -(SP)						      ; 1710

		  FE47   CF	       01  FB 002A7 11$:    CALLS   #1, TARG_IO						      ;

				       03  11 002AC 	    BRB     13$							      ; 1708

		         59	       01  D0 002AE 12$:    MOVL    #1, DONE						      ; 1712

		         14	       59  E9 002B1 13$:    BLBC    DONE, 16$						      ; 1725

		         0D	  E8   AB  E9 002B4 	    BLBC    TRG_CTL, 15$					      ;

		         07	       5A  E8 002B8 	    BLBS    R10, 14$						      ; 1727

				  EE   AB  B6 002BB 	    INCW    TRG_CTL+6						      ; 1732

		         03	  EB   AB  E9 002BE 	    BLBC    TRG_CTL+3, 15$					      ; 1733

				  F2   AB  B6 002C2 14$:    INCW    TRG_CTL+10						      ; 1735

		         04	       59  E8 002C5 15$:    BLBS    DONE, 17$						      ; 1745

		         0A	  E8   AB  E8 002C8 16$:    BLBS    TRG_CTL, 18$					      ;

				  08   AB  DD 002CC 17$:    PUSHL   TRG_CTL+32						      ; 1747

	      00000000G  9F	       01  FB 002CF 	    CALLS   #1, @#SYS$SETEF					      ;

					   04 002D6 18$:    RET     							      ; 1488



; Routine Size:  239 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 17

; Digital Equipment Corporation

;

;	1750	GLOBAL ROUTINE  TARG_TMRAST : NOVALUE =

;	1751	

;	1752	!++

;	1753	! FUNCTIONAL DESCRIPTION:

;	1754	!

;	1755	!	This routine receives control if a QIO issued by routine

;	1756	!	TARG_IO times out.  The response is to cancel the QIO

;	1757	!	which results in the queing of the completion AST routine,

;	1758	!	TARG_IOAST.

;	1759	!

;	1760	! FORMAL PARAMETERS:

;	1761	!

;	1762	!	NONE

;	1763	!

;	1764	! IMPLICIT INPUTS:

;	1765	!

;	1766	!	TCB$W_CHAN	- word containing the channel used by

;	1767	!			  the QIO.

;	1768	!

;	1769	! IMPLICIT OUTPUTS:

;	1770	!

;	1771	!	NONE

;	1772	!

;	1773	! ROUTINE VALUE:

;	1774	! COMPLETION CODES:

;	1775	!

;	1776	!	NONE

;	1777	!

;	1778	! SIDE EFFECTS:

;	1779	!

;	1780	!	NONE

;	1781	!

;	1782	!--

;	1783	

;	1784	BEGIN

;	1785	

;	1786	$CANCEL (CHAN = .TRG_CTL [TCB$W_CHAN]) ;

;	1787	

;	1788	END ;











					 0000 002D7 	    .ENTRY  TARG_TMRAST, Save nothing				      ; 1750

		         7E	0000G  CF  3C 002D9 	    MOVZWL  TRG_CTL+8, -(SP)					      ; 1786

	      00000000G  9F	       01  FB 002DE 	    CALLS   #1, @#SYS$CANCEL					      ;

					   04 002E5 	    RET     							      ; 1750



; Routine Size:  15 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 18

; Digital Equipment Corporation

;

;	1789	GLOBAL ROUTINE  TARG_ATTNAST (DEV_CHAR) : NOVALUE =

;	1790	

;	1791	!++

;	1792	! FUNCTIONAL DESCRIPTION:

;	1793	!

;	1794	!	Receives control whenever an attention ast is delivered.  If

;	1795	!	the attention code indicates unsolicited input, then the

;	1796	!	message is read into the buffer described by TCB$A_INTDDSC.

;	1797	!

;	1798	!	The sole purpose of this routine is to receive messages in

;	1799	!	order to prevent data overruns.  If any problems are encountered

;	1800	!	they are ignored -- the problem will be handled when it is

;	1801	!	rediscovered by either the timeout mechanism or the failure

;	1802	!	of a subsequent QIO.

;	1803	!

;	1804	!	An attention ast is a oneshot, and it is therefore reenabled.

;	1805	!

;	1806	! FORMAL PARAMETERS:

;	1807	!

;	1808	!	DEV_CHAR	- A line's device dependent characteristics

;	1809	!			  longword.

;	1810	!

;	1811	! IMPLICIT INPUTS:

;	1812	!

;	1813	!	TCB$A_INTDDSC	- addr of double descriptor of the received

;	1814	!			  message.

;	1815	!			  The buffer descriptor portion is assumed

;	1816	!			  valid and read-only.

;	1817	!	TCB$W_CHAN	- channel used for communication with the 

;	1818	!			  target.

;	1819	!

;	1820	! IMPLICIT OUTPUTS:

;	1821	!

;	1822	!	see side effects

;	1823	!

;	1824	! ROUTINE VALUE:

;	1825	! COMPLETION CODES:

;	1826	!

;	1827	!	NONE

;	1828	!

;	1829	! SIDE EFFECTS:

;	1830	!

;	1831	!	If a there is currently an unprocessed message sitting in

;	1832	!	TCB$A_INTDDSC's buffer it is lost.  Note that messages are

;	1833	!	transferred from TCB$A_INTDDSC to another buffer by routine

;	1834	!	TARG_IO with the AST's disabled in order to avoid race

;	1835	!	conditions.

;	1836	!

;	1837	!--

;	1838	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 19

; Digital Equipment Corporation

;

;	1839	BEGIN

;	1840	BIND	INT_DDSC = .TRG_CTL [TCB$A_INTDDSC] : DDSC ;

;	1841	OWN	ATTN_IOSB : IO_SB ;

;	1842	

;	1843	!+

;	1844	! If the device is still active then this attention condition is due

;	1845	! to the receipt of an unsolicited message.  Read this message.  If

;	1846	! any problems exist then ignore them, fatal errors will be rediscovered

;	1847	! because the load will fail (routine TARG_IO will dectect this

;	1848	! exhausting the alloted retries.

;	1849	!-

;	1850	

;	1851	IF  ((.DEV_CHAR AND XM$M_STS_ACTIVE) NEQ 0) AND	! If device is active

;	1852	    (.DEV_CHAR <16,16,0> EQL 0)			! and no errors exist

;	1853	THEN

;	1854		!+

;	1855		! Read the target message

;	1856		!-

;	1857	

;	1858		IF $QIOW (FUNC = IO$_READVBLK or IO$M_NOW,

;     P 1859			  IOSB = ATTN_IOSB,

;     P 1860			  CHAN = .TRG_CTL [TCB$W_CHAN],

;     P 1861			  P1   = .INT_DDSC [BUF_PTR],

;     P 1862			  P2   = .INT_DDSC [BUF_LNG]

;     P 1863			 )

;	1864		THEN

;	1865		    IF  .ATTN_IOSB [IO_STAT]

;	1866		    THEN

;	1867			!+

;	1868			! Setup the descriptor of the recieved

;	1869			! message.

;	1870			!-

;	1871	

;	1872			BEGIN

;	1873			INT_DDSC [STR_PTR] = .INT_DDSC [BUF_PTR] ;

;	1874			INT_DDSC [STR_LNG] = .ATTN_IOSB [IO_CNT] ;

;	1875			END ;

;	1876	

;	1877	$QIOW (FUNC = IO$_SETMODE or IO$M_ATTNAST,	! Reset the AST

;     P 1878	       CHAN = .TRG_CTL [TCB$W_CHAN],

;     P 1879	       P1   = TARG_ATTNAST

;     P 1880	      ) ;

;	1881	

;	1882	END ;







							    .PSECT  $OWN$,NOEXE,2



					      00000 ATTN_IOSB:

							    .BLKB   8







							    .PSECT  $CODE$,NOWRT,2



; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 19-1

; Digital Equipment Corporation

;



					 0804 002E6 	    .ENTRY  TARG_ATTNAST, Save R2,R11				      ; 1789

		         5B 00000000G  9F  9E 002E8 	    MOVAB   @#SYS$QIOW, R11					      ;

		         52	0000G  CF  D0 002EF 	    MOVL    TRG_CTL+20, R2					      ; 1839

	   35	    04   AC	       0B  E1 002F4 	    BBC     #11, DEV_CHAR, 1$					      ; 1851

				  06   AC  B5 002F9 	    TSTW    DEV_CHAR						      ; 1852

				       30  12 002FC 	    BNEQ    1$							      ;

				       7E  7C 002FE 	    CLRQ    -(SP)						      ; 1863

				       7E  7C 00300 	    CLRQ    -(SP)						      ;

				  08   A2  DD 00302 	    PUSHL   8(R2)						      ;

				  0C   A2  DD 00305 	    PUSHL   12(R2)						      ;

				       7E  7C 00308 	    CLRQ    -(SP)						      ;

				0000'  CF  9F 0030A 	    PUSHAB  ATTN_IOSB						      ;

		         7E	  71   8F  9A 0030E 	    MOVZBL  #113, -(SP)						      ;

		         7E	0000G  CF  3C 00312 	    MOVZWL  TRG_CTL+8, -(SP)					      ;

				       7E  D4 00317 	    CLRL    -(SP)						      ;

		         6B	       0C  FB 00319 	    CALLS   #12, SYS$QIOW					      ;

		         0F	       50  E9 0031C 	    BLBC    R0, 1$						      ;

		         0A	0000'  CF  E9 0031F 	    BLBC    ATTN_IOSB, 1$					      ; 1865

		    04   A2	  0C   A2  D0 00324 	    MOVL    12(R2), 4(R2)					      ; 1873

		         62	0000'  CF  3C 00329 	    MOVZWL  ATTN_IOSB+2, (R2)					      ; 1874

				       7E  7C 0032E 1$:     CLRQ    -(SP)						      ; 1880

				       7E  7C 00330 	    CLRQ    -(SP)						      ;

				       7E  D4 00332 	    CLRL    -(SP)						      ;

				  AF   AF  9F 00334 	    PUSHAB  TARG_ATTNAST					      ;

				       7E  7C 00337 	    CLRQ    -(SP)						      ;

				       7E  D4 00339 	    CLRL    -(SP)						      ;

		         7E	0123   8F  3C 0033B 	    MOVZWL  #291, -(SP)						      ;

		         7E	0000G  CF  3C 00340 	    MOVZWL  TRG_CTL+8, -(SP)					      ;

				       7E  D4 00345 	    CLRL    -(SP)						      ;

		         6B	       0C  FB 00347 	    CALLS   #12, SYS$QIOW					      ;

					   04 0034A 	    RET     							      ; 1789



; Routine Size:  101 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:52:15	DBB3:[NICE.SRC]NICTRG.B32;35					Page 20

; Digital Equipment Corporation

;

;	1883	

;	1884	END

;	1885	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $CODE$         	   843  NOWRT,  RD ,  EXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $OWN$          	     8    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)









;				LIBRARY STATISTICS

;

;					     -------- Symbols --------    Blocks

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]STARLET.L32;1		      2688        24         0       128











; Size:		843 code + 8 data bytes

; Run Time:	00:32.9

; Elapsed Time:	01:22.5

; Memory Used:	262 pages

; Compilation Complete

