

; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE NICLS  (IDENT='X14') =

;	0002	BEGIN

;	0003	

;	0004	!

;	0005	! COPYRIGHT (C) 1977

;	0006	! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

;	0007	!

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

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

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

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

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

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

;	0014	! REMAIN IN DEC.

;	0015	!

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

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

;	0018	! CORPORATION.

;	0019	!

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

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

;	0022	

;	0023	!++

;	0024	! FACILITY:

;	0025	!

;	0026	!		NICE -- the network control utility

;	0027	!

;	0028	! ABSTRACT:

;	0029	!

;	0030	!	This module executes the NICE 'line service' functions.

;	0031	!	These functions include remote triggering of the target

;	0032	!	node's bootstrap, downline loading, and (not yet supported)

;	0033	!	upline dumping.

;	0034	!

;	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:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 2

; Digital Equipment Corporation

;

;	0045	!

;	0046	! INCLUDE FILES:

;	0047	!

;	0048	  REQUIRE 'SRC$:NICDEF.B32' ;	! symbol and structure def's

;	0940	

;	0941	!

;	0942	! TABLE OF CONTENTS:

;	0943	!

;	0944	

;	0945	FORWARD ROUTINE

;	0946	

;	0947	  ENDLINSRV	: LNKMSG NOVALUE,

;	0948	  PACK_DATA	: LNKMSG,

;	0949	  READ_HDLG	: LNKMSG,

;	0950	  CONDUCT_LOAD	: LNKMSG,

;	0951	  SYSPAR_VERIFY,

;	0952	  TARG_DLG ;

;	0953	

;	0954	!

;	0955	! MACROS:

;	0956	!

;	0957	

;	0958		! define the 'message summary block' 

;	0959	

;	0960	  FIELD

;	0961	     MSB$_FIELDS =

;	0962		SET

;	0963		MSB$B_STATUS	= [0,0,8,0],	! Status of message

;	0964						! summary

;	0965		MSB$B_CPUTYPE	= [1,0,8,0],	! NICE cpu type code

;	0966		MSB$B_MSGTYPE	= [2,0,8,0],	! NICE dialogue message

;	0967						! type code

;	0968		MSB$B_ANY	= [3,0,8,0],	! No assigned meaning

;	0969		MSB$L_BASE	= [4,0,32,0],	! Base address

;	0970		MSB$L_XFER	= [8,0,32,0],	! Transfer address

;	0971		MSB$B_SYSPAR	= [12,0,8,0],	! Count field for the

;	0972						! system parameters

;	0973		MSB$T_SYSPAR	= [13,0,0,0]	! Start of text field of

;	0974						! counted string

;	0975		TES ;

;	0976	

;	0977	  LITERAL

;	0978		MSB$S_SYSPAR = 22,		! Length of text field

;	0979						! of counted string

;	0980	

;	0981		MSB$K_SIZE = 35 ;		! Size in bytes of MSB

;	0982						! structure

;	0983	

;	0984	  MACRO  MSB = BLOCK [MSB$K_SIZE, BYTE]  FIELD (MSB$_FIELDS) % ;

;	0985	

;	0986	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 3

; Digital Equipment Corporation

;

;	0987		GLOBAL	TRG_CTL : TCB,		! the target control block

;	0988			HOST_SUM : MSB ;	! the host message summary block

;	0989	

;	0990	!

;	0991	! EQUATED SYMBOLS

;	0992	!

;	0993	

;	0994	

;	0995	  	! Define the function codes for routine TARG_DLG.

;	0996		! Refer to its header for an explanation

;	0997	LITERAL

;	0998		     TRG$_START     =  0,

;	0999		     TRG$_STOP 	    =  1,

;	1000		     TRG$_WAIT 	    =  2,

;	1001		     TRG$_RCV 	    =  3,

;	1002		     TRG$_RCV_WAIT  =  4,

;	1003		     TRG$_RCV_TST   =  5,

;	1004		     TRG$_XMT 	    =  6,

;	1005		     TRG$_XMT_WAIT  =  7,

;	1006		     TRG$_XR 	    =  8,

;	1007		     TRG$_TST_XR    =  9,

;	1008		     TRG$_MAXFCT    =  9 ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 4

; Digital Equipment Corporation

;

;	1009	

;	1010	!

;	1011	! EXTERNAL ROUTINE

;	1012	!

;	1013	

;	1014	EXTERNAL ROUTINE

;	1015	

;	1016	

;	1017	  CK_ERR	: LNKMSG,

;	1018	

;	1019	  TARG_LINK,

;	1020	  TARG_IO,

;	1021	

;	1022	  ACP		: LNKMSG,

;	1023	  GET_REC	: LNKMSG,

;	1024	  MOV_FIELD	: LNKMSG,

;	1025	  VERIFY_LN	: LNKMSG,

;	1026	  CVTLN		: LNKMSG,

;	1027	  LINK		: LNKMSG,

;	1028	  MESSAGE	: LNKMSG,

;	1029	

;	1030	  EXTSTR	: LNKMSG,

;	1031	  EXT_USTR	: LNKMSG,

;	1032	  EXTLN		: LNKMSG,

;	1033	  EXTND		: LNKMSG,

;	1034	  EXTB		: LNKMSG,

;	1035	  EXTW		: LNKMSG,

;	1036	  EXTL		: LNKMSG,

;	1037	

;	1038	  INSSTR	: LNKMSG,

;	1039	  INSLN		: LNKMSG,

;	1040	  INSB		: LNKMSG,

;	1041	  INSW		: LNKMSG,

;	1042	  INSL		: LNKMSG,

;	1043	  INS_CTRS	: LNKMSG,

;	1044	  INSFILL	: LNKMSG,

;	1045	  INS_REST	: LNKMSG ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 5

; Digital Equipment Corporation

;

;	1046	!

;	1047	! EXTERNAL STORAGE:

;	1048	!

;	1049	

;	1050	EXTERNAL

;	1051	

;	1052	  OPTION   : BYTE,	! The option code obtained from the 

;	1053				! second byte of a NICE command message.

;	1054	

;	1055	  XFER_ADDR,		! Transfer address of program being

;	1056				! downline loaded,

;	1057	  BASE_ADDR,		!   and its base address.

;	1058	

;	1059	  EXP_ADDR,		! Always indicates the highest virtual

;	1060				! address of the NICE process before

;	1061				! any virtual address expansion has

;	1062				! occured.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 6

; Digital Equipment Corporation

;

;	1063	  !+

;	1064	  ! LN_DDSC is used to describe line names in internal format,

;	1065	  ! i.e., an uncounted string of the form XMA0.  CDB_LN_DDSC

;	1066	  ! is used to describe a line name in the form expected by 

;	1067	  ! the configuration data base.

;	1068	  !-

;	1069	     LN_DDSC	   : DDSC,

;	1070	     CDB_LN_DDSC   : DDSC,

;	1071	

;	1072	  !+

;	1073	  ! The following are used during downline loads.

;	1074	  !-

;	1075	     SYSPAR_DDSC  : DDSC,   ! Target's system parameters

;	1076	     BTPW_DDSC	  : DDSC,   ! Counted string boot password

;	1077	     OPSYS_DDSC	  : DDSC,   ! Uncounted operating system filename

;	1078	     PGM_DDSC	  : DDSC,   ! Uncounted filename of program to 

;	1079				    ! be loaded next in the downline

;	1080				    ! sequence.

;	1081	  !+

;	1082	  ! The following are used to describe messages and buffers

;	1083	  ! used to communicate with a remote object.

;	1084	  !-

;	1085	     IMSG_DDSC	  : DDSC,

;	1086	     OMSG_DDSC	  : DDSC,

;	1087	

;	1088	  !+

;	1089	  ! The following are use to describe messages and buffers

;	1090	  ! used to communicate with the command node.

;	1091	  !-

;	1092	    CMD_IMSG_DDSC   : DDSC,

;	1093	    CMD_OMSG_DDSC   : DDSC,

;	1094	

;	1095	  !+

;	1096	  ! The following are used for miscellaneous purposes

;	1097	  !-

;	1098	     AUX0_DDSC	  : DDSC,

;	1099	     AUX1_DDSC	  : DDSC,

;	1100	     LARGE_DDSC	  : DDSC ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 7

; Digital Equipment Corporation

;

;	1101	GLOBAL ROUTINE LINSRV : NOVALUE LNKMSG =

;	1102	

;	1103	!++

;	1104	! FUNCTIONAL DESCRIPTION:

;	1105	!

;	1106	!	Major control routine for the 'line service' functions.

;	1107	!	This includes such things as downline load, remote bootstrap

;	1108	!	triggering, and upline dump.

;	1109	!

;	1110	! FORMAL PARAMETERS:

;	1111	!

;	1112	!	NONE

;	1113	!

;	1114	! IMPLICIT INPUTS:

;	1115	!

;	1116	!	OPTION	- The byte containing the specific line service

;	1117	!		  being requested.

;	1118	!

;	1119	!	The input message is assumed to be opened and available

;	1120	!	for parsing by the 'NICMSG' subroutines.

;	1121	!

;	1122	!	The input message is assumed to have been parsed as far

;	1123	!	as the 'option' field, the value of the option byte is

;	1124	!	can be found in variable OPTION

;	1125	!

;	1126	!	The error handler defined by the MCB (pointed to by R9) is 

;	1127	!	assumed to be disabled.

;	1128	!

;	1129	! IMPLICIT OUTPUTS:

;	1130	!

;	1131	!	NONE

;	1132	!

;	1133	! ROUTINE VALUE:

;	1134	! COMPLETION CODES:

;	1135	!

;	1136	!	NONE

;	1137	!

;	1138	! SIDE EFFECTS:

;	1139	!

;	1140	!	NONE

;	1141	!

;	1142	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 8

; Digital Equipment Corporation

;

;	1143	BEGIN

;	1144	EXTERNAL REGISTER	P_IM = 11, P_OM = 10, MCB_PTR = 9 : REF MCB ;

;	1145	MACRO	 REPLY_CODE = MCB_PTR [MCB$L_REPLYCODE] % ;

;	1146	

;	1147	MESSAGE (CLOSE_O, 0) ;			! Close the output message if

;	1148						! it is open.

;	1149	MCB_PTR [MCB$B_ERROR_ON] = TRUE ;	! Enable the error handler.

;	1150	

;	1151	!+

;	1152	! Zero the host message summary block and the target control block

;	1153	! structures.  Setup any necessary non-zero defaults.

;	1154	!-

;	1155	

;	1156	CH$FILL (0, MSB$K_SIZE, HOST_SUM) ;

;	1157	CH$FILL (0, TCB$K_SIZE, TRG_CTL) ;

;	1158	HOST_SUM [MSB$B_CPUTYPE] = NIC$K_TYPE11	;	! PDP11 is default

;	1159							! target CPU type.

;	1160	!+

;	1161	! There must be a Configuration Data Base record for the line which

;	1162	! connects to the target node.  Extract the name of this line, get

;	1163	! its data base record in order to obtain the MOP timeout constant,

;	1164	! and start the line.

;	1165	!-

;	1166	

;	1167	  BEGIN

;	1168	  BIND	LID_REC = .AUX0_DDSC[BUF_PTR] : BLOCK [LID$C_SIZE,BYTE] ;

;	1169	  

;	1170	  EXTLN	(Z_ERROR, LN_DDSC, 0) ;		! Extract the linename

;	1171	  CVTLN	(TO_NICE_FMT,.LN_DDSC[STR_PTR],	! Need a copy of name in NICE

;	1172	  	 CDB_LN_DDSC) ;			! format for data base lookup

;	1173	  

;	1174	  _GET_REC (FILE = LID$C_FILE,		! File index

;     P 1175		    BUFF = AUX0_DDSC,		! Buffer to store record

;     P 1176		    STRT = LID_REC[LID$B_CODE],	! Addr of field to match

;     P 1177		    KEY  = CDB_LN_DDSC		! DDSC of key to match

;     P 1178		   ) ;

;	1179	  TRG_CTL[TCB$B_MOPTIMOUT] 		! Setup timeout field in the

;	1180		    = .LID_REC[LID$B_TIMEOUT] ;	! Target Control Block

;	1181	  

;	1182	  IF  .TRG_CTL[TCB$B_MOPTIMOUT] EQL 0	! The MOP timeout constant must

;	1183	  THEN					! not be zero.

;	1184	      REPLY_CODE = NIC$_DATBASERR ;

;	1185	

;	1186	

;	1187	

;	1188	  REPLY_CODE = TARG_DLG (TRG$_START,LN_DDSC) ;	! Start the line

;	1189	  END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 9

; Digital Equipment Corporation

;

;	1190	IF  .REPLY_CODE				! Continue only if no errors

;	1191	THEN					! have been encountered.

;	1192	 SELECT  .OPTION  OF

;	1193	  SET

;	1194	  [0] :	! Establish Downline Load Dialogue

;	1195	

;	1196	      BEGIN

;	1197	      EXTB	(TRG_CTL[TCB$B_PGM]) ;	! Get loader type

;	1198	      MESSAGE	(CHECK_I, 0) ;		! Check for legal msg.

;	1199	

;	1200	      IF  .TRG_CTL[TCB$B_PGM] GTRU NIC$K_OPSYS	! Pgm type legal ?

;	1201	      THEN

;	1202		  REPLY_CODE = NIC$_ILLPARVAL

;	1203	      ELSE

;	1204		  BEGIN

;	1205		  MESSAGE      (SEND_REPLY, 0) ; ! Reply to host

;	1206		  CONDUCT_LOAD (HOST_SUM) ;	! Carry on load dialogue

;	1207		  END ;				! TRG_CTL  is an implied

;	1208	      END ;				! parameter.

;	1209	  

;	1210	

;	1211	  [1,	! Loop

;	1212	   2] :	! Establish  Dump Dialogue

;	1213	

;	1214	      REPLY_CODE = NIC$_ILL_OPT ;

;	1215	

;	1216	

;	1217	  [3,	! Trigger Boot, Get Program Request

;	1218	   4] :	! Trigger Boot, Do Not Get Program Request

;	1219	    

;	1220	      BEGIN

;	1221	      LOCAL	TMP : BYTE ;

;	1222	      EXTB  (TMP) ;			! Get count field for boot

;	1223	      IF .TMP NEQ 4			! password  -- it must equal 4

;	1224	      THEN

;	1225		  REPLY_CODE = NIC$_ILLPARVAL

;	1226	      ELSE

;	1227		  BEGIN

;	1228		  EXT_USTR (.TMP, BTPW_DDSC) ;	! get the password

;	1229		  MESSAGE  (CHECK_I, 0) ;	! chk for legal msg fmt

;	1230		  MESSAGE  (OPEN_O, OMSG_DDSC) ;! Open to build MOP msg.

;	1231		  INSB     (MOP$K_ENTERMOP) ;	! insert 'enter MOP' code 

;	1232		  INSSTR   (BTPW_DDSC) ;		! insert boot password

;	1233		  MESSAGE  (CLOSE_O, 0) ;	! close the output msg

;	1234		  END ;

;	1235	      END ;

;	1236	

;	1237	

;	1238	  [3] :	! Trigger Boot, Get Program Request

;	1239	

;	1240	      REPLY_CODE = TARG_DLG (TRG$_XR, OMSG_DDSC) ; ! send/rcv msg to target



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 10

; Digital Equipment Corporation

;

;	1241	  [4] :	! Trigger Boot, Do Not Get Program Request

;	1242	    

;	1243	      REPLY_CODE = TARG_DLG (TRG$_XMT_WAIT, OMSG_DDSC) ;   ! send msg to target

;	1244	

;	1245	

;	1246	

;	1247	  [OTHERWISE] :	    REPLY_CODE = NIC$_ILL_OPT ;

;	1248	  TES ;

;	1249	

;	1250	

;	1251	

;	1252	TARG_DLG (TRG$_WAIT, 0) ;		! Wait for all outstanding I/O

;	1253	

;	1254	!+

;	1255	! If REPLY_CODE does not indicate success then do not override its current

;	1256	! value.  Otherwise, the current status is the status of the communication

;	1257	! with the target node.  This status is found in the target control block.

;	1258	!-

;	1259	

;	1260	IF  .REPLY_CODE THEN REPLY_CODE = .TRG_CTL [TCB$B_STATUS] ;

;	1261	

;	1262						! to complete

;	1263	ENDLINSRV () ;				! Cleanup and send response

;	1264	END ;





							    .TITLE  NICLS

							    .IDENT  \X14\



							    .PSECT  $GLOBAL$,NOEXE,2



					      00000 TRG_CTL::

							    .BLKB   36

					      00024 HOST_SUM::

							    .BLKB   35



							    .GLOBL  CK_ERR, TARG_LINK, TARG_IO, ACP, GET_REC, MOV_FIELD

							    .GLOBL  VERIFY_LN, CVTLN, LINK, MESSAGE, EXTSTR, EXT_USTR

							    .GLOBL  EXTLN, EXTND, EXTB, EXTW, EXTL, INSSTR, INSLN

							    .GLOBL  INSB, INSW, INSL, INS_CTRS, INSFILL, INS_REST

							    .GLOBL  OPTION, XFER_ADDR, BASE_ADDR, EXP_ADDR, LN_DDSC

							    .GLOBL  CDB_LN_DDSC, SYSPAR_DDSC, BTPW_DDSC, OPSYS_DDSC

							    .GLOBL  PGM_DDSC, IMSG_DDSC, OMSG_DDSC, CMD_IMSG_DDSC

							    .GLOBL  CMD_OMSG_DDSC, AUX0_DDSC, AUX1_DDSC, LARGE_DDSC



							    .PSECT  $CODE$,NOWRT,2



					 01FC 00000 	    .ENTRY  LINSRV, Save R2,R3,R4,R5,R6,R7,R8			      ; 1101

		         56	0000V  CF  9E 00002 	    MOVAB   TARG_DLG, R6					      ;

		         57	0000G  CF  9E 00007 	    MOVAB   MESSAGE, R7						      ;

		         58	0000'  CF  9E 0000C 	    MOVAB   HOST_SUM, R8					      ;

		         5E	       04  C2 00011 	    SUBL2   #4, SP						      ;

		         7E	       06  7D 00014 	    MOVQ    #6, -(SP)						      ; 1147

		         67	       02  FB 00017 	    CALLS   #2, MESSAGE						      ;

		    41   A9	       01  90 0001A 	    MOVB    #1, 65(MCB_PTR)					      ; 1149



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 10-1

; Digital Equipment Corporation

;

	   00	         6E	       00  2C 0001E 	    MOVC5   #0, (SP), #0, #35, HOST_SUM				      ; 1156

		         68	       23     00022									      ;

	   00	         6E	       00  2C 00024 	    MOVC5   #0, (SP), #0, #36, TRG_CTL				      ; 1157

		    DC   A8	       24     00028									      ;

		    01   A8	       01  90 0002B 	    MOVB    #1, HOST_SUM+1					      ; 1158

		         52	0000G  CF  D0 0002F 	    MOVL    AUX0_DDSC+12, R2					      ; 1167

				       7E  D4 00034 	    CLRL    -(SP)						      ; 1170

				0000G  CF  9F 00036 	    PUSHAB  LN_DDSC						      ;

				       02  DD 0003A 	    PUSHL   #2							      ;

		  0000G  CF	       03  FB 0003C 	    CALLS   #3, EXTLN						      ;

				0000G  CF  9F 00041 	    PUSHAB  CDB_LN_DDSC						      ; 1171

				0000G  CF  DD 00045 	    PUSHL   LN_DDSC+4						      ;

				       02  DD 00049 	    PUSHL   #2							      ;

		  0000G  CF	       03  FB 0004B 	    CALLS   #3, CVTLN						      ;

				0000G  CF  9F 00050 	    PUSHAB  CDB_LN_DDSC						      ; 1178

				  18   A2  9F 00054 	    PUSHAB  24(R2)						      ;

				0000G  CF  9F 00057 	    PUSHAB  AUX0_DDSC						      ;

				       02  DD 0005B 	    PUSHL   #2							      ;

		  0000G  CF	       04  FB 0005D 	    CALLS   #4, GET_REC						      ;

		    E0   A8	  28   A2  90 00062 	    MOVB    40(R2), TRG_CTL+4					      ; 1180

				       03  12 00067 	    BNEQ    1$							      ; 1182

		         69	       1C  CE 00069 	    MNEGL   #28, (MCB_PTR)					      ; 1184

				0000G  CF  9F 0006C 1$:     PUSHAB  LN_DDSC						      ; 1188

				       7E  D4 00070 	    CLRL    -(SP)						      ;

		         66	       02  FB 00072 	    CALLS   #2, TARG_DLG					      ;

		         69	       50  D0 00075 	    MOVL    R0, (MCB_PTR)					      ;

		         03	       69  E8 00078 	    BLBS    (MCB_PTR), 2$					      ; 1190

				     00BE  31 0007B 	    BRW     10$							      ;

		         52	0000G  CF  9A 0007E 2$:     MOVZBL  OPTION, R2						      ; 1192

		         53	       01  D0 00083 	    MOVL    #1, R3						      ;

				       52  D5 00086 	    TSTL    R2							      ;

				       28  12 00088 	    BNEQ    4$							      ;

				       53  D4 0008A 	    CLRL    R3							      ;

				  E1   A8  9F 0008C 	    PUSHAB  TRG_CTL+5						      ; 1197

		  0000G  CF	       01  FB 0008F 	    CALLS   #1, EXTB						      ;

		         7E	       03  7D 00094 	    MOVQ    #3, -(SP)						      ; 1198

		         67	       02  FB 00097 	    CALLS   #2, MESSAGE						      ;

		         02	  E1   A8  91 0009A 	    CMPB    TRG_CTL+5, #2					      ; 1200

				       05  1B 0009E 	    BLEQU   3$							      ;

		         69	       20  CE 000A0 	    MNEGL   #32, (MCB_PTR)					      ; 1202

				       0D  11 000A3 	    BRB     4$							      ; 1200

		         7E	       08  7D 000A5 3$:     MOVQ    #8, -(SP)						      ; 1205

		         67	       02  FB 000A8 	    CALLS   #2, MESSAGE						      ;

				       58  DD 000AB 	    PUSHL   R8							      ; 1206

		  0000V  CF	       01  FB 000AD 	    CALLS   #1, CONDUCT_LOAD					      ;

		         01	       52  91 000B2 4$:     CMPB    R2, #1						      ; 1192

				       0A  1F 000B5 	    BLSSU   5$							      ;

		         02	       52  91 000B7 	    CMPB    R2, #2						      ;

				       05  1A 000BA 	    BGTRU   5$							      ;

				       53  D4 000BC 	    CLRL    R3							      ;

		         69	       02  CE 000BE 	    MNEGL   #2, (MCB_PTR)					      ; 1214

		         03	       52  91 000C1 5$:     CMPB    R2, #3						      ; 1192

				       4A  1F 000C4 	    BLSSU   7$							      ;

		         04	       52  91 000C6 	    CMPB    R2, #4						      ;

				       45  1A 000C9 	    BGTRU   7$							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 10-2

; Digital Equipment Corporation

;

				       53  D4 000CB 	    CLRL    R3							      ;

				       5E  DD 000CD 	    PUSHL   SP							      ; 1222

		  0000G  CF	       01  FB 000CF 	    CALLS   #1, EXTB						      ;

		         04	       6E  91 000D4 	    CMPB    TMP, #4						      ; 1223

				       05  13 000D7 	    BEQL    6$							      ;

		         69	       20  CE 000D9 	    MNEGL   #32, (MCB_PTR)					      ; 1225

				       32  11 000DC 	    BRB     7$							      ; 1223

				0000G  CF  9F 000DE 6$:     PUSHAB  BTPW_DDSC						      ; 1228

		         7E	  04   AE  9A 000E2 	    MOVZBL  TMP, -(SP)						      ;

		  0000G  CF	       02  FB 000E6 	    CALLS   #2, EXT_USTR					      ;

		         7E	       03  7D 000EB 	    MOVQ    #3, -(SP)						      ; 1229

		         67	       02  FB 000EE 	    CALLS   #2, MESSAGE						      ;

				0000G  CF  9F 000F1 	    PUSHAB  OMSG_DDSC						      ; 1230

				       05  DD 000F5 	    PUSHL   #5							      ;

		         67	       02  FB 000F7 	    CALLS   #2, MESSAGE						      ;

				       06  DD 000FA 	    PUSHL   #6							      ; 1231

		  0000G  CF	       01  FB 000FC 	    CALLS   #1, INSB						      ;

				0000G  CF  9F 00101 	    PUSHAB  BTPW_DDSC						      ; 1232

		  0000G  CF	       01  FB 00105 	    CALLS   #1, INSSTR						      ;

		         7E	       06  7D 0010A 	    MOVQ    #6, -(SP)						      ; 1233

		         67	       02  FB 0010D 	    CALLS   #2, MESSAGE						      ;

		         03	       52  91 00110 7$:     CMPB    R2, #3						      ; 1192

				       0E  12 00113 	    BNEQ    8$							      ;

				       53  D4 00115 	    CLRL    R3							      ;

				0000G  CF  9F 00117 	    PUSHAB  OMSG_DDSC						      ; 1240

				       08  DD 0011B 	    PUSHL   #8							      ;

		         66	       02  FB 0011D 	    CALLS   #2, TARG_DLG					      ;

		         69	       50  D0 00120 	    MOVL    R0, (MCB_PTR)					      ;

		         04	       52  91 00123 8$:     CMPB    R2, #4						      ; 1192

				       0E  12 00126 	    BNEQ    9$							      ;

				       53  D4 00128 	    CLRL    R3							      ;

				0000G  CF  9F 0012A 	    PUSHAB  OMSG_DDSC						      ; 1243

				       07  DD 0012E 	    PUSHL   #7							      ;

		         66	       02  FB 00130 	    CALLS   #2, TARG_DLG					      ;

		         69	       50  D0 00133 	    MOVL    R0, (MCB_PTR)					      ;

		         03	       53  E9 00136 9$:     BLBC    R3, 10$						      ; 1192

		         69	       02  CE 00139 	    MNEGL   #2, (MCB_PTR)					      ; 1247

		         7E	       02  7D 0013C 10$:    MOVQ    #2, -(SP)						      ; 1252

		         66	       02  FB 0013F 	    CALLS   #2, TARG_DLG					      ;

		         04	       69  E9 00142 	    BLBC    (MCB_PTR), 11$					      ; 1260

		         69	  DC   A8  98 00145 	    CVTBL   TRG_CTL, (MCB_PTR)					      ;

		  0000V  CF	       00  FB 00149 11$:    CALLS   #0, ENDLINSRV					      ; 1263

					   04 0014E 	    RET     							      ; 1101



; Routine Size:  335 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 11

; Digital Equipment Corporation

;

;	1265	GLOBAL ROUTINE  ENDLINSRV : LNKMSG NOVALUE =

;	1266	

;	1267	!++

;	1268	! FUNCTIONAL DESCRIPTION:

;	1269	!

;	1270	!	Cleanup after line service routines.  This includes deallocating

;	1271	!	the line, sending a reply to the command node, and optionally

;	1272	!	scanning past command node messages until the "end of dialogue"

;	1273	!	acknowledgement is received.

;	1274	!

;	1275	!	This routine may be called by the error handler as well as

;	1276	!	the lines service mainline routine.

;	1277	!

;	1278	! FORMAL PARAMETERS:

;	1279	!

;	1280	!	NONE

;	1281	!

;	1282	! IMPLICIT INPUTS:

;	1283	!

;	1284	!	R9		- Contains the address of the current message

;	1285	!			  control block (R9 alias is MCB_PTR).

;	1286	!	LN_DDSC		- Double descriptor of line to the target node

;	1287	!	OMSG_DDSC	- Double descriptor of last message received

;	1288	!			  from the target.

;	1289	!	TRG_CTL		- The Target Control Block.  This block is 

;	1290	!			  used by routine TARG_DLG which is called by

;	1291	!			  this routine.

;	1292	!

;	1293	! IMPLICIT OUTPUTS:

;	1294	!

;	1295	!	NONE

;	1296	!

;	1297	! ROUTINE VALUE:

;	1298	! COMPLETION CODES:

;	1299	!

;	1300	!	NONE

;	1301	!

;	1302	! SIDE EFFECTS:

;	1303	!

;	1304	!	- The value of MCB_PTR [MCB$L_REPLYCODE] may be modified.

;	1305	!	- Any message currently opened are closed.

;	1306	!	- The line is deallocated and the channel to the target is

;	1307	!	  deassigned.

;	1308	!	- A response message may be sent to the command node.

;	1309	!	- Command messages may be read until the "end of dialogue"

;	1310	!	  acknowledgement is encountered.

;	1311	!

;	1312	!--

;	1313	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 12

; Digital Equipment Corporation

;

;	1314	BEGIN

;	1315	EXTERNAL REGISTER	P_IM = 11, P_OM = 10, MCB_PTR = 9 : REF MCB ;

;	1316	BIND	 TMSG_DDSC  = .TRG_CTL [TCB$A_RCVDDSC]	: DDSC ;

;	1317	LOCAL 	 ABORT, DONE, P, OLD_HND_STA,

;	1318		 REPLY_INSERTED, REPLY : SIGNED BYTE ;

;	1319	

;	1320	

;	1321	OLD_HND_STA = .MCB_PTR [MCB$B_ERROR_ON] ;	! disable error handler

;	1322	MCB_PTR [MCB$B_ERROR_ON] = FALSE ;

;	1323	

;	1324	IF .MCB_PTR [MCB$L_REPLYCODE]		! The internal values of all

;	1325	THEN					!  non-success "reply_codes"

;	1326	    REPLY = NIC$_SUCCESS		!  are twice their NICE

;	1327	ELSE					!  protocol counterparts.

;	1328	    REPLY = .MCB_PTR [MCB$L_REPLYCODE] / 2 ;

;	1329	

;	1330	MCB_PTR[MCB$L_REPLYCODE] = NIC$_SUCCESS ; ! Now that we have stored a

;	1331						  ! copy of the error code, set

;	1332						  ! this one to success to avoid

;	1333						  ! possible false alarms in any

;	1334						  ! any subroutines which we may

;	1335						  ! call.

;	1336	

;	1337	TARG_DLG (TRG$_STOP, LN_DDSC) ;		! Cancel oustanding I/O and

;	1338						! release the line, etc.

;	1339	MESSAGE (CLEAR_ALL, 0) ;		! Close any open messages

;	1340	REPLY_INSERTED = FALSE ;		! Inidicate "REPLY" has

;	1341						! not yet been entered.

;	1342	

;	1343	P = CH$PTR (.CMD_OMSG_DDSC [BUF_PTR]) ;	! Create pointer used to

;	1344						! build the reply message

;	1345	

;	1346	IF ((.OPTION EQL 0) 			! Options 0 and 2 enter dialogue

;	1347		OR				! after the first receive

;	1348	    (.OPTION EQL 2))

;	1349		AND				! If we are in dialogue mode

;	1350	   .MCB_PTR [MCB$W_RECEIVES] GTRU 1

;	1351	THEN					! then enter "end of dialoque"

;	1352	    CH$WCHAR_A (0, P) ;			! prefix.

;	1353	

;	1354	

;	1355	IF  .TRG_CTL [TCB$W_RECEIVES] GEQU 1

;	1356		AND

;	1357	    .TMSG_DDSC [STR_LNG] NEQ 0		! If the received target message

;	1358	THEN					! is non-null then read it

;	1359	    BEGIN

;	1360	    BIND  MSG = .TMSG_DDSC [STR_PTR] : VECTOR [20, BYTE] ;

;	1361	

;	1362	

;	1363	    !+ 

;	1364	    ! If the last message received was a MOP program request message

;	1365	    ! then its semantics have not yet been validated for correctness.

;	1366	    ! If the message is anything else, then the status of its validity

;	1367	    ! is summarized by the code stored in 'REPLY' and no further

;	1368	    ! information needs to be extracted from it.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 12-1

; Digital Equipment Corporation

;

;	1369	    !-

;	1370	

;	1371	    IF .MSG [0] EQL MOP$K_PGMREQ

;	1372	    THEN

;	1373		IF .TMSG_DDSC [STR_LNG] LEQU 2	! Test for legal message length

;	1374			OR

;	1375		   .TMSG_DDSC [STR_LNG] GEQU 21	!  -- no exact max. specified,

;	1376			OR			!     this is a 'sanity' check

;	1377		   .MSG [2] NEQ 1		! MOP version code

;	1378		THEN

;	1379		    REPLY = NIC$_LNPROTERR / 2	! REPLY must use the mapped

;	1380						! error code.

;	1381		ELSE

;	1382		    BEGIN

;	1383		    CH$WCHAR_A (.REPLY, P) ;

;	1384		    REPLY_INSERTED = TRUE ;

;	1385		    CH$WCHAR_A (.MSG [1], P) ;	! Enter the device type code

;	1386	

;	1387		    CH$WCHAR_A (.HOST_SUM [MSB$B_CPUTYPE], P) ;	! Enter CPU type

;	1388	

;	1389		    IF .TMSG_DDSC [STR_LNG] GEQ 4  ! If pgm type is included

;	1390		    THEN			   ! then enter it from msg's

;	1391			CH$WCHAR_A (.MSG [3], P)   ! 4th byte

;	1392		    ELSE

;	1393			CH$WCHAR_A (0, P) ;	   ! else use default

;	1394	

;	1395		    IF .TMSG_DDSC [STR_LNG] LEQU 5  ! Is the software i.d.

;	1396		    THEN			    ! included ?

;	1397			CH$WCHAR_A (0, P)	    ! NO, use default

;	1398		    ELSE

;	1399			P = CH$MOVE (.MSG [4] + 1,  ! YES, xfer it to reply msg

;	1400				     MSG [4], .P) ;

;	1401		    END ;

;	1402	    END ;

;	1403	

;	1404	IF NOT .REPLY_INSERTED THEN CH$WCHAR_A (.REPLY, P) ;

;	1405	

;	1406	

;	1407	!+

;	1408	! Complete the double descriptor of the reply message and send

;	1409	! it to the command node.

;	1410	!-

;	1411	

;	1412	CMD_OMSG_DDSC [STR_PTR] = .CMD_OMSG_DDSC [BUF_PTR] ;

;	1413	CMD_OMSG_DDSC [STR_LNG] = .P - .CMD_OMSG_DDSC [BUF_PTR] ;

;	1414	

;	1415	IF  NOT MESSAGE  (SEND_DDSC, CMD_OMSG_DDSC)

;	1416	THEN

;	1417	    ABORT = TRUE 

;	1418	ELSE

;	1419	    ABORT = FALSE ;

;	1420	

;	1421	!+

;	1422	! If the reply message was an "end of dialoque" indicator then

;	1423	! repeatedly scan past all input messages until the "end of dialogue"



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 12-2

; Digital Equipment Corporation

;

;	1424	! acknowledgement is received.

;	1425	!-

;	1426	   DONE = FALSE ;

;	1427	

;	1428	IF  .(.CMD_OMSG_DDSC [STR_PTR])<0,8,0> EQL 0

;	1429	THEN

;	1430	    UNTIL .ABORT OR .DONE

;	1431	    DO

;	1432		IF MESSAGE (RCV_CLOSED, CMD_IMSG_DDSC)

;	1433		THEN

;	1434		    DONE = (.(.CMD_IMSG_DDSC [STR_PTR])<0,8,0> EQL 0)

;	1435		ELSE

;	1436		    ABORT = TRUE ;

;	1437	

;	1438	

;	1439	IF .ABORT THEN MCB_PTR [MCB$B_REQDISCON] = TRUE ;

;	1440	

;	1441	MCB_PTR [MCB$B_ERROR_ON] = .OLD_HND_STA ;	! Restore the former

;	1442							! status of the error

;	1443							! handler

;	1444	END ;











					 01FC 0014F 	    .ENTRY  ENDLINSRV, Save R2,R3,R4,R5,R6,R7,R8		      ; 1265

		         52	0000'  CF  D0 00151 	    MOVL    TRG_CTL+16, R2					      ; 1314

		         7E	  41   A9  9A 00156 	    MOVZBL  65(MCB_PTR), OLD_HND_STA				      ; 1321

				  41   A9  94 0015A 	    CLRB    65(MCB_PTR)						      ; 1322

		         05	       69  E9 0015D 	    BLBC    (MCB_PTR), 1$					      ; 1324

		         57	       01  90 00160 	    MOVB    #1, REPLY						      ; 1326

				       07  11 00163 	    BRB     2$							      ; 1324

	   50	         69	       02  C7 00165 1$:     DIVL3   #2, (MCB_PTR), R0					      ; 1328

		         57	       50  90 00169 	    MOVB    R0, REPLY						      ;

		         69	       01  D0 0016C 2$:     MOVL    #1, (MCB_PTR)					      ; 1330

				0000G  CF  9F 0016F 	    PUSHAB  LN_DDSC						      ; 1337

				       01  DD 00173 	    PUSHL   #1							      ;

		  0000V  CF	       02  FB 00175 	    CALLS   #2, TARG_DLG					      ;

		         7E	       0A  7D 0017A 	    MOVQ    #10, -(SP)						      ; 1339

		  0000G  CF	       02  FB 0017D 	    CALLS   #2, MESSAGE						      ;

				       58  D4 00182 	    CLRL    REPLY_INSERTED					      ; 1340

		         56	0000G  CF  D0 00184 	    MOVL    CMD_OMSG_DDSC+12, P					      ; 1343

		         50	0000G  CF  9A 00189 	    MOVZBL  OPTION, R0						      ; 1346

				       05  13 0018E 	    BEQL    3$							      ;

		         02	       50  D1 00190 	    CMPL    R0, #2						      ; 1348

				       08  12 00193 	    BNEQ    4$							      ;

		         01	  44   A9  B1 00195 3$:     CMPW    68(MCB_PTR), #1					      ; 1350

				       02  1B 00199 	    BLEQU   4$							      ;

				       86  94 0019B 	    CLRB    (P)+						      ; 1352

		         01	0000'  CF  B1 0019D 4$:     CMPW    TRG_CTL+6, #1					      ; 1355

				       57  1F 001A2 	    BLSSU   10$							      ;

				       62  D5 001A4 	    TSTL    (R2)						      ; 1357

				       53  13 001A6 	    BEQL    10$							      ;

		         50	  04   A2  D0 001A8 	    MOVL    4(R2), R0						      ; 1359



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 12-3

; Digital Equipment Corporation

;

		         08	       60  91 001AC 	    CMPB    (R0), #8						      ; 1371

				       4A  12 001AF 	    BNEQ    10$							      ;

		         02	       62  D1 001B1 	    CMPL    (R2), #2						      ; 1373

				       0B  1B 001B4 	    BLEQU   5$							      ;

		         15	       62  D1 001B6 	    CMPL    (R2), #21						      ; 1375

				       06  1E 001B9 	    BGEQU   5$							      ;

		         01	  02   A0  91 001BB 	    CMPB    2(R0), #1						      ; 1377

				       05  13 001BF 	    BEQL    6$							      ;

		         57	       11  8E 001C1 5$:     MNEGB   #17, REPLY						      ; 1379

				       35  11 001C4 	    BRB     10$							      ; 1373

		         86	       57  90 001C6 6$:     MOVB    REPLY, (P)+						      ; 1383

		         58	       01  D0 001C9 	    MOVL    #1, REPLY_INSERTED					      ; 1384

		         86	  01   A0  90 001CC 	    MOVB    1(R0), (P)+						      ; 1385

		         86	0000'  CF  90 001D0 	    MOVB    HOST_SUM+1, (P)+					      ; 1387

		         04	       62  D1 001D5 	    CMPL    (R2), #4						      ; 1389

				       06  19 001D8 	    BLSS    7$							      ;

		         66	  03   A0  90 001DA 	    MOVB    3(R0), (P)						      ; 1391

				       02  11 001DE 	    BRB     8$							      ; 1389

				       66  94 001E0 7$:     CLRB    (P)							      ; 1393

				       56  D6 001E2 8$:     INCL    P							      ; 1391

		         05	       62  D1 001E4 	    CMPL    (R2), #5						      ; 1395

				       04  1A 001E7 	    BGTRU   9$							      ;

				       86  94 001E9 	    CLRB    (P)+						      ; 1397

				       0E  11 001EB 	    BRB     10$							      ; 1395

		         51	  04   A0  9A 001ED 9$:     MOVZBL  4(R0), R1						      ; 1399

				       51  D6 001F1 	    INCL    R1							      ;

	   66	    04   A0	       51  28 001F3 	    MOVC3   R1, 4(R0), (P)					      ;

		         56	       53  D0 001F8 	    MOVL    R3, P						      ;

		         03	       58  E8 001FB 10$:    BLBS    REPLY_INSERTED, 11$					      ; 1404

		         86	       57  90 001FE 	    MOVB    REPLY, (P)+						      ;

		  0000G  CF	0000G  CF  D0 00201 11$:    MOVL    CMD_OMSG_DDSC+12, CMD_OMSG_DDSC+4			      ; 1412

    0000G  CF	         56	0000G  CF  C3 00208 	    SUBL3   CMD_OMSG_DDSC+12, P, CMD_OMSG_DDSC			      ; 1413

				0000G  CF  9F 00210 	    PUSHAB  CMD_OMSG_DDSC					      ; 1415

				       09  DD 00214 	    PUSHL   #9							      ;

		  0000G  CF	       02  FB 00216 	    CALLS   #2, MESSAGE						      ;

		         05	       50  E8 0021B 	    BLBS    R0, 12$						      ;

		         52	       01  D0 0021E 	    MOVL    #1, ABORT						      ; 1417

				       02  11 00221 	    BRB     13$							      ; 1415

				       52  D4 00223 12$:    CLRL    ABORT						      ; 1419

				       53  D4 00225 13$:    CLRL    DONE						      ; 1426

				0000G  DF  95 00227 	    TSTB    @CMD_OMSG_DDSC+4					      ; 1428

				       28  12 0022B 	    BNEQ    17$							      ;

		         28	       52  E8 0022D 14$:    BLBS    ABORT, 18$						      ; 1430

		         22	       53  E8 00230 	    BLBS    DONE, 17$						      ;

				0000G  CF  9F 00233 	    PUSHAB  CMD_IMSG_DDSC					      ; 1432

				       0C  DD 00237 	    PUSHL   #12							      ;

		  0000G  CF	       02  FB 00239 	    CALLS   #2, MESSAGE						      ;

		         0F	       50  E9 0023E 	    BLBC    R0, 16$						      ;

				       50  D4 00241 	    CLRL    R0							      ; 1434

				0000G  DF  95 00243 	    TSTB    @CMD_IMSG_DDSC+4					      ;

				       02  12 00247 	    BNEQ    15$							      ;

				       50  D6 00249 	    INCL    R0							      ;

		         53	       50  D0 0024B 15$:    MOVL    R0, DONE						      ;

				       DD  11 0024E 	    BRB     14$							      ; 1432

		         52	       01  D0 00250 16$:    MOVL    #1, ABORT						      ; 1436



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 12-4

; Digital Equipment Corporation

;

				       D8  11 00253 	    BRB     14$							      ; 1430

		         04	       52  E9 00255 17$:    BLBC    ABORT, 19$						      ; 1439

		    40   A9	       01  90 00258 18$:    MOVB    #1, 64(MCB_PTR)					      ;

		    41   A9	       6E  90 0025C 19$:    MOVB    OLD_HND_STA, 65(MCB_PTR)				      ; 1441

					   04 00260 	    RET     							      ; 1265



; Routine Size:  274 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 13

; Digital Equipment Corporation

;

;	1445	GLOBAL ROUTINE  CONDUCT_LOAD (HOST_MSB_AD) : LNKMSG  =

;	1446	

;	1447	!++

;	1448	! FUNCTIONAL DESCRIPTION:

;	1449	!

;	1450	!	Controls the load of the target node.  Manages the input data

;	1451	!	stream from the host node, repackages it, and sends it to the

;	1452	!	target node.

;	1453	!

;	1454	! FORMAL PARAMETERS:

;	1455	!

;	1456	!	HOST_MSB_AD	- The address of the host message summary block

;	1457	!			  to be used while processing the host data

;	1458	!			  stream.

;	1459	!

;	1460	! IMPLICIT INPUTS:

;	1461	!

;	1462	!	TRG_CTL		- The Target Control Block, in particular field

;	1463	!			  TCB$B_PGM is assumed set to the standard NICE

;	1464	!	OMSG_DDSC	- The DDSC of the buffer in which the output

;	1465	!			  messages to the target are constructed.

;	1466	!			  code for the type of program to be loaded.

;	1467	!	R9		- Contains the address of the MCB.

;	1468	!

;	1469	! IMPLICIT OUTPUTS:

;	1470	!

;	1471	!	NONE

;	1472	!

;	1473	! ROUTINE VALUE:

;	1474	! COMPLETION CODES:

;	1475	!

;	1476	!	The standard internal NICE status code.

;	1477	!

;	1478	! SIDE EFFECTS:

;	1479	!

;	1480	!	The length of OMSG_DDSC buffer, as indicated by its BUF_LNG

;	1481	!	field, may be reduced in order to limit the size of the messages

;	1482	!	sent to the target.

;	1483	!

;	1484	!--

;	1485	

;	1486	

;	1487	

;	1488	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 14

; Digital Equipment Corporation

;

;	1489	BEGIN

;	1490	EXTERNAL REGISTER	P_IM = 11, P_OM = 10, MCB_PTR = 9 : REF MCB ;

;	1491	

;	1492	BIND	HOST_MSB = .HOST_MSB_AD : MSB ;

;	1493	LOCAL	STATUS	: SIGNED,

;	1494	

;	1495		STATE, LOAD_NUM, PTR, MOPLOAD_TYPE, CTL_VEC  ;

;	1496	

;	1497		!+

;	1498		! Establish label values for the action routines

;	1499		! dispatched via the control vectors built below.

;	1500		!-

;	1501	

;	1502	LITERAL		PACKIMAGE = 0,	MEMLOAD = 1,	XR_TMSG = 2,

;	1503			ILL_SEQ = 3,	BUFF_OVF = 4,	APPEND_XFER = 5,

;	1504			SYS_PARAMS = 6,	SET_BASE = 7,	DONE = 8 ;

;	1505	

;	1506	MACRO	TOKEN = HOST_MSB [MSB$B_MSGTYPE] % ;

;	1507	

;	1508	BIND	HOST_DDSC = CMD_IMSG_DDSC : DDSC ;	! Used to receive input

;	1509							! from the host node.

;	1510	BIND	OTRG_DDSC = OMSG_DDSC	  : DDSC ;	! Used to contain messages

;	1511							! which are constructed 

;	1512							! and sent to the target

;	1513		!+

;	1514		! Establish uplit labels.  These uplits are used as

;	1515		! control vectors which direct the action specified for

;	1516		! each state and token pair in the state tables below.

;	1517		!-

;	1518	

;	1519	BIND	ILLSEQ     = UPLIT BYTE (ILL_SEQ,DONE),

;	1520		OVERFLOW   = UPLIT BYTE (BUFF_OVF,DONE),

;	1521		SETBASE    = UPLIT BYTE (SET_BASE,DONE),

;	1522		PACK	   = UPLIT BYTE (MEMLOAD,PACKIMAGE,DONE),

;	1523		PACK_XR	   = UPLIT BYTE (MEMLOAD,PACKIMAGE,XR_TMSG,DONE),

;	1524		APPXFER	   = UPLIT BYTE (APPEND_XFER,XR_TMSG,DONE),

;	1525		PARAMS     = UPLIT BYTE (SYS_PARAMS,XR_TMSG,DONE) ;

;	1526	

;	1527		!+

;	1528		! Setup the state tables for each type of load. Each 

;	1529		! entry in each table consists of a action routine

;	1530		! control vector followed by the new state.  Each table

;	1531		! consists of 3 rows and 3 columns.  The input token may vary

;	1532		! from 1 to 3, and is used to locate the column.  The current

;	1533		! state may vary from 0 to 2, and is used to locate to row

;	1534		! (state = 3 is the exit condition).

;	1535		!-

;	1536	

;	1537	LITERAL	  ROWS = 3, COLUMNS = 3, NEXT_STATE = 1, ACTION = 0 ;

;	1538	

;	1539	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 15

; Digital Equipment Corporation

;

;	1540	BIND  CONTROL_TBL =

;	1541	

;	1542		(SELECTONE  .TRG_CTL[TCB$B_PGM]  OF

;	1543		  SET

;	1544		  [NIC$K_SECLDR] :

;	1545			UPLIT 

;	1546			(SETBASE,1,	ILLSEQ,3,	ILLSEQ,3,

;	1547			 SETBASE,1,	PACK,2,		ILLSEQ,3,

;	1548			 ILLSEQ,3,	OVERFLOW,3,	APPXFER,3) ;

;	1549	

;	1550		  [NIC$K_TERLDR,

;	1551		   NIC$K_OPSYS ] :

;	1552	

;	1553			UPLIT 

;	1554			(SETBASE,1,	ILLSEQ,3,	ILLSEQ,3,

;	1555			 SETBASE,1,	PACK_XR,2,	ILLSEQ,3,

;	1556			 SETBASE,2,	PACK_XR,2,	PARAMS,3) ;

;	1557	

;	1558		   TES) : VECTOR [ROWS * COLUMNS * 2] ;

;	1559	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 16

; Digital Equipment Corporation

;

;	1560	!+

;	1561	! All messages sent to the target node are buffered by the target.

;	1562	! The size of the target's buffer is slightly greater than 256. bytes,

;	1563	! therefore no message greater than that may be sent.  Therefore, shrink

;	1564	! our output buffer size to at most 256 bytes, since it controls the 

;	1565	! output message size.

;	1566	!

;	1567	! The only exception to this is the load of the secondary loader.  It is

;	1568	! not buffered by the target and may be arbitrarly long (long enough to

;	1569	! load the secondary loader in one piece).

;	1570	!-

;	1571	

;	1572	IF  .TRG_CTL[TCB$B_PGM] NEQ NIC$K_SECLDR

;	1573	THEN

;	1574	    OTRG_DDSC[BUF_LNG] = MINU(.OTRG_DDSC[BUF_LNG],256) ;

;	1575	

;	1576	!+

;	1577	! Setup the type code for the MOP memory load image message.

;	1578	

;	1579	MOPLOAD_TYPE = (IF  .TRG_CTL[TCB$B_PGM] EQL NIC$K_SECLDR

;	1580			THEN

;	1581			    MOP$K_MEMLOADX	! memory load with xfer

;	1582			ELSE			!   address

;	1583			    MOP$K_MEMLOAD	! memory load w/o xfer

;	1584			) ;			!   address

;	1585	!+

;	1586	! Initialize STATE and STATUS.  STATE is used to control the

;	1587	! sequential behavior of the loader.  STATUS is used to store

;	1588	! the success/failure of all loader activities, and to shut

;	1589	! down the loader as soon as a problem is detected.

;	1590	!-

;	1591	    STATUS = NIC$_SUCCESS ;   STATE = 0 ;

;	1592	

;	1593	!+ 

;	1594	! LOAD_NUM is always incremented before it is inserted into a

;	1595	! MOP message.  Therefore initialize it at -1.

;	1596	!-

;	1597	    LOAD_NUM = -1 ;

;	1598	

;	1599	!+

;	1600	! The first dialouge message is read before begining the table

;	1601	! driven load.  All subsequent messages are read under direction

;	1602	! of action routines dispatched by the state table.  In general

;	1603	! it is routine PACK_DATA that reads the majority of the

;	1604	! messages.  Note that upon return from PACK_DATA, HOST_MSB

;	1605	! summarizes the first message  not  used by PACK_DATA.

;	1606	!			        ===

;	1607	! This is because either it was illegally formed, was of the

;	1608	! wrong type (base address message, system parameter message,)

;	1609	! etc.), or it was a memory image message but there was no

;	1610	! room for it in the target buffer.

;	1611	!

;	1612	! If the string descriptor is non-null then READ_HDLG will not



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 17

; Digital Equipment Corporation

;

;	1613	! read the next HOST message, but will interpret the specified

;	1614	! string as the message to be summarzed.

;	1615	!-

;	1616	    HOST_DDSC [STR_LNG] = 0 ;

;	1617				

;	1618	    READ_HDLG (HOST_DDSC, .HOST_MSB_AD) ;

;	1619	

;	1620	!+

;	1621	! Drive the loader with the state table.  STATE = 3 is the

;	1622	! normal stopping condition.  If the low bit of STATUS is clear

;	1623	! then a problem requiring shutting down the loader has occured.

;	1624	!-

;	1625	

;	1626	UNTIL  .STATE EQL 3  OR  NOT .STATUS

;	1627	DO

;	1628	  IF .TOKEN EQL 0  OR  .TOKEN GTRU 3

;	1629	  THEN

;	1630		STATUS = NIC$_ILLMSGFMT

;	1631	  ELSE

;	1632	    BEGIN

;	1633	    LOCAL	TMP ;

;	1634	

;	1635	    TMP = 2 * (COLUMNS * .STATE + .TOKEN - 1) ;	! Build index into

;	1636							! the control table

;	1637	    CTL_VEC = .CONTROL_TBL [.TMP + ACTION] ;

;	1638	    STATE   = .CONTROL_TBL [.TMP + NEXT_STATE] ;

;	1639	

;	1640	     WHILE .STATUS

;	1641	     DO 

;	1642		BEGIN

;	1643	

;	1644		CASE CH$RCHAR_A (CTL_VEC) FROM 0 TO DONE OF

;	1645		  SET

;	1646		  [PACKIMAGE] :

;	1647	

;	1648			!+

;	1649			! Append memory image data obtained from the HOST

;	1650			! input message stream to the MOP message being

;	1651			! built in the TARGET buffer.  Update the base

;	1652			! address counter to point to the first unused

;	1653			! target location.

;	1654			!-

;	1655	

;	1656			BEGIN

;	1657			PACK_DATA (OTRG_DDSC, HOST_DDSC, .HOST_MSB_AD) ;

;	1658			BASE_ADDR = 

;	1659				.BASE_ADDR + .OTRG_DDSC [STR_LNG] - 6 ;

;	1660			END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 18

; Digital Equipment Corporation

;

;	1661		    [MEMLOAD] :

;	1662	

;	1663			!+

;	1664			! Enter the header for the MOP 'memory load'

;	1665			!  message.

;	1666			!-

;	1667	

;	1668			BEGIN

;	1669			PTR = .OTRG_DDSC [STR_PTR] ;

;	1670			CH$WCHAR_A (.MOPLOAD_TYPE, PTR) ;

;	1671	

;	1672			LOAD_NUM = .LOAD_NUM + 1 ;	! inc. the load

;	1673			CH$WCHAR_A (.LOAD_NUM, PTR) ;	! number before

;	1674							! entering it

;	1675			.PTR = .BASE_ADDR ;		! enter base address

;	1676			OTRG_DDSC [STR_LNG] = 6 ;	! header size

;	1677			END ;

;	1678	

;	1679	

;	1680		  [APPEND_XFER] :

;	1681	

;	1682			!+

;	1683			! Append the transfer address field from the message

;	1684			! summary block to the MOP message being built in the

;	1685			! target buffer.

;	1686			!

;	1687			! First check for adequate space

;	1688			!-

;	1689	

;	1690			IF .OTRG_DDSC [STR_LNG] + .OTRG_DDSC [STR_PTR] + 4

;	1691			    GEQA .OTRG_DDSC [BUF_PTR] + .OTRG_DDSC [BUF_LNG]

;	1692			THEN

;	1693			    STATUS = NIC$_RESRCERR

;	1694			ELSE

;	1695	

;	1696			    !+

;	1697			    ! If any image data has been appended to the 

;	1698			    ! message, then its length must be larger

;	1699			    ! than 6 which is the header length.

;	1700			    !-

;	1701	

;	1702			    IF .OTRG_DDSC [STR_LNG] LEQU 6

;	1703			    THEN

;	1704				STATUS = NIC$_ILLMSGSEQ

;	1705			    ELSE

;	1706				!+

;	1707				! enter the transfer address

;	1708	

;	1709				BEGIN

;	1710				(.OTRG_DDSC [STR_LNG] + .OTRG_DDSC [STR_PTR])

;	1711					    = .HOST_MSB [MSB$L_XFER] ;

;	1712				OTRG_DDSC [STR_LNG] 

;	1713					    = .OTRG_DDSC [STR_LNG] + 4 ;

;	1714				END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 19

; Digital Equipment Corporation

;

;	1715		  [SYS_PARAMS] :

;	1716	

;	1717			!+

;	1718			! It is assumed that the last HOST message read,

;	1719			! and consequently the message reflected in

;	1720			! HOST_MSB, was a NICE "system params with

;	1721			! xfer address" dialogue message.  It is also

;	1722			! assumed that the target buffer is large enough

;	1723			! to hold the message constructed below.

;	1724			!-

;	1725	

;	1726			!+

;	1727			! update the load number, establish a pointer

;	1728			! used to build the message, and enter the

;	1729			! message type code followed by the load number.

;	1730			!-

;	1731	

;	1732			BEGIN

;	1733			LOAD_NUM = .LOAD_NUM + 1 ;

;	1734			PTR = CH$PTR (.OTRG_DDSC [STR_PTR]) ;

;	1735			CH$WCHAR_A (MOP$K_PARAMS, PTR) ;

;	1736			CH$WCHAR_A (.LOAD_NUM, PTR) ;

;	1737	

;	1738			!+

;	1739			! Enter the system parameters and the transfer

;	1740			! address fields and update the target message

;	1741			! string descriptor.

;	1742			!-

;	1743	

;	1744			PTR = CH$MOVE (.HOST_MSB [MSB$B_SYSPAR],

;	1745					CH$PTR (HOST_MSB [MSB$T_SYSPAR]),

;	1746					.PTR

;	1747				       ) ;

;	1748	

;	1749			.PTR = .HOST_MSB [MSB$L_XFER] ;

;	1750	

;	1751			OTRG_DDSC [STR_LNG] 

;	1752				= .PTR + 4 - .OTRG_DDSC [STR_PTR] ;

;	1753			END ;

;	1754	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 20

; Digital Equipment Corporation

;

;	1755		  [SET_BASE] :

;	1756	

;	1757			!+

;	1758			! Set the base address variable according to the

;	1759			! information contained in the last HOST message read.

;	1760			! Then read the next HOST message.

;	1761			!-

;	1762			   BEGIN

;	1763			   BASE_ADDR = .HOST_MSB [MSB$L_BASE] ;

;	1764			   READ_HDLG (HOST_DDSC, .HOST_MSB_AD) ;

;	1765			   END ;

;	1766	

;	1767		  [XR_TMSG] :

;	1768	

;	1769			!+

;	1770			! Correspond with target

;	1771			!-

;	1772			    STATUS = TARG_DLG (TRG$_TST_XR, OTRG_DDSC) ;

;	1773	

;	1774		  [BUFF_OVF] :

;	1775	

;	1776			!+

;	1777			! Indicate buffer overflow

;	1778			!-

;	1779			    STATUS = NIC$_RESRCERR ;

;	1780	

;	1781		  [ILL_SEQ] :

;	1782	

;	1783			!+

;	1784			! Indicate illegal message sequence

;	1785			!-

;	1786			    STATUS = NIC$_ILLMSGSEQ ;

;	1787	

;	1788		  [DONE] :

;	1789			!+

;	1790			! Exit the case loop

;	1791			!-

;	1792			    EXITLOOP ;

;	1793		TES ;

;	1794	    END ;

;	1795	  END ;

;	1796	

;	1797	MCB_PTR [MCB$L_REPLYCODE] = .STATUS ;

;	1798	

;	1799	RETURN ((.MCB_PTR [MCB$A_EXIT_RT]) ()) ; ! Take common exit to check

;	1800						 ! for and report errors.

;	1801	END ;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00000 P.AAA:  .BYTE   3, 8						      ;

					      00002	    .BLKB   2

					      00004 P.AAB:  .BYTE   4, 8						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 20-1

; Digital Equipment Corporation

;

					      00006	    .BLKB   2

					      00008 P.AAC:  .BYTE   7, 8						      ;

					      0000A	    .BLKB   2

					      0000C P.AAD:  .BYTE   1, 0, 8						      ;

					      0000F	    .BLKB   1

					      00010 P.AAE:  .BYTE   1, 0, 2, 8						      ;

					      00014 P.AAF:  .BYTE   5, 2, 8						      ;

					      00017	    .BLKB   1

					      00018 P.AAG:  .BYTE   6, 2, 8						      ;

					      0001B	    .BLKB   1

					      0001C P.AAH:  .ADDRESS  SETBASE						      ;

					      00020 	    .LONG   1							      ;

					      00024 	    .ADDRESS  ILLSEQ						      ;

					      00028 	    .LONG   3							      ;

					      0002C 	    .ADDRESS  ILLSEQ						      ;

					      00030 	    .LONG   3							      ;

					      00034 	    .ADDRESS  SETBASE						      ;

					      00038 	    .LONG   1							      ;

					      0003C 	    .ADDRESS  PACK						      ;

					      00040 	    .LONG   2							      ;

					      00044 	    .ADDRESS  ILLSEQ						      ;

					      00048 	    .LONG   3							      ;

					      0004C 	    .ADDRESS  ILLSEQ						      ;

					      00050 	    .LONG   3							      ;

					      00054 	    .ADDRESS  OVERFLOW						      ;

					      00058 	    .LONG   3							      ;

					      0005C 	    .ADDRESS  APPXFER						      ;

					      00060 	    .LONG   3							      ;

					      00064 P.AAI:  .ADDRESS  SETBASE						      ;

					      00068 	    .LONG   1							      ;

					      0006C 	    .ADDRESS  ILLSEQ						      ;

					      00070 	    .LONG   3							      ;

					      00074 	    .ADDRESS  ILLSEQ						      ;

					      00078 	    .LONG   3							      ;

					      0007C 	    .ADDRESS  SETBASE						      ;

					      00080 	    .LONG   1							      ;

					      00084 	    .ADDRESS  PACK_XR						      ;

					      00088 	    .LONG   2							      ;

					      0008C 	    .ADDRESS  ILLSEQ						      ;

					      00090 	    .LONG   3							      ;

					      00094 	    .ADDRESS  SETBASE						      ;

					      00098 	    .LONG   2							      ;

					      0009C 	    .ADDRESS  PACK_XR						      ;

					      000A0 	    .LONG   2							      ;

					      000A4 	    .ADDRESS  PARAMS						      ;

					      000A8 	    .LONG   3							      ;



						    ILLSEQ=		P.AAA

						    OVERFLOW=		P.AAB

						    SETBASE=		P.AAC

						    PACK=		P.AAD

						    PACK_XR=		P.AAE

						    APPXFER=		P.AAF

						    PARAMS=		P.AAG





; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 20-2

; Digital Equipment Corporation

;



							    .PSECT  $CODE$,NOWRT,2



					 01FC 00261 	    .ENTRY  CONDUCT_LOAD, Save R2,R3,R4,R5,R6,R7,R8		      ; 1445

		         5E	       14  C2 00263 	    SUBL2   #20, SP						      ;

		         56	  04   AC  D0 00266 	    MOVL    HOST_MSB_AD, R6					      ; 1489

		         50	0000'  CF  9A 0026A 	    MOVZBL  TRG_CTL+5, R0					      ; 1542

		         51	       01  CE 0026F 	    MNEGL   #1, R1						      ;

				       50  D5 00272 	    TSTL    R0							      ;

				       07  12 00274 	    BNEQ    1$							      ;

		         52	0000'  CF  9E 00276 	    MOVAB   P.AAH, R2						      ; 1545

				       0F  11 0027B 	    BRB     2$							      ; 1542

		         01	       50  91 0027D 1$:     CMPB    R0, #1						      ;

				       0D  1F 00280 	    BLSSU   3$							      ;

		         02	       50  91 00282 	    CMPB    R0, #2						      ;

				       08  1A 00285 	    BGTRU   3$							      ;

		         52	0000'  CF  9E 00287 	    MOVAB   P.AAI, R2						      ; 1553

		         51	       52  D0 0028C 2$:     MOVL    R2, R1						      ; 1542

		         6E	       51  D0 0028F 3$:     MOVL    R1, (SP)						      ; 1489

				0000'  CF  95 00292 	    TSTB    TRG_CTL+5						      ; 1572

				       18  13 00296 	    BEQL    5$							      ;

		         50	0000G  CF  D0 00298 	    MOVL    OTRG_DDSC+8, R0					      ; 1574

	      00000100   8F	       50  D1 0029D 	    CMPL    R0, #256						      ;

				       05  1B 002A4 	    BLEQU   4$							      ;

		         50	0100   8F  3C 002A6 	    MOVZWL  #256, R0						      ;

		  0000G  CF	       50  D0 002AB 4$:     MOVL    R0, OTRG_DDSC+8					      ;

				0000'  CF  95 002B0 5$:     TSTB    TRG_CTL+5						      ; 1579

				       05  12 002B4 	    BNEQ    6$							      ;

				  0C   AE  D4 002B6 	    CLRL    MOPLOAD_TYPE					      ;

				       04  11 002B9 	    BRB     7$							      ;

		    0C   AE	       02  D0 002BB 6$:     MOVL    #2, MOPLOAD_TYPE					      ;

		         58	       01  D0 002BF 7$:     MOVL    #1, STATUS						      ; 1591

				  08   AE  D4 002C2 	    CLRL    STATE						      ;

		    04   AE	       01  CE 002C5 	    MNEGL   #1, LOAD_NUM					      ; 1597

				0000G  CF  D4 002C9 	    CLRL    HOST_DDSC						      ; 1616

				  04   AC  DD 002CD 	    PUSHL   HOST_MSB_AD						      ; 1618

				0000G  CF  9F 002D0 	    PUSHAB  HOST_DDSC						      ; 1445

		  0000V  CF	       02  FB 002D4 	    CALLS   #2, READ_HDLG					      ; 1618

		         03	  08   AE  D1 002D9 8$:     CMPL    STATE, #3						      ; 1626

				       03  12 002DD 	    BNEQ    10$							      ;

				     0116  31 002DF 9$:     BRW     26$							      ;

		         FA	       58  E9 002E2 10$:    BLBC    STATUS, 9$						      ;

				  02   A6  95 002E5 	    TSTB    2(R6)						      ; 1628

				       06  13 002E8 	    BEQL    11$							      ;

		         03	  02   A6  91 002EA 	    CMPB    2(R6), #3						      ;

				       05  1B 002EE 	    BLEQU   12$							      ;

		         58	       04  CE 002F0 11$:    MNEGL   #4, STATUS						      ; 1630

				       E4  11 002F3 	    BRB     8$							      ; 1628

	   50	    08   AE	       03  C5 002F5 12$:    MULL3   #3, STATE, R0					      ; 1635

		         51	  02   A6  9A 002FA 	    MOVZBL  2(R6), R1						      ;

		         50	       51  C0 002FE 	    ADDL2   R1, R0						      ;

				       50  D7 00301 	    DECL    R0							      ;

		         50	       02  C4 00303 	    MULL2   #2, TMP						      ;

		    10   AE	  00 BE40  D0 00306 	    MOVL    @0(SP)[TMP], CTL_VEC				      ; 1637

	   51	         6E	       04  C1 0030C 	    ADDL3   #4, (SP), R1					      ; 1638



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 20-3

; Digital Equipment Corporation

;

		    08   AE	     6140  D0 00310 	    MOVL    (R1)[TMP], STATE					      ;

		         C1	       58  E9 00315 13$:    BLBC    STATUS, 8$						      ; 1640

		         50	  10   BE  9A 00318 	    MOVZBL  @CTL_VEC, R0					      ; 1644

				  10   AE  D6 0031C 	    INCL    CTL_VEC						      ;

	   08	         00	       50  CF 0031F 	    CASEL   R0, #0, #8						      ;

	 00BA	       0032	     0012     00323 14$:    .WORD   15$-14$,-						      ;

	 004E	       00CA	     00CF     00329		    17$-14$,-						      ;

	 FFB6	       00A6	     0079     0032F		    22$-14$,-						      ;

								    24$-14$,-						      ;

								    23$-14$,-						      ;

								    19$-14$,-						      ;

								    20$-14$,-						      ;

								    21$-14$,-						      ;

								    8$-14$						      ;

				  04   AC  DD 00335 15$:    PUSHL   HOST_MSB_AD						      ; 1657

				0000G  CF  9F 00338 	    PUSHAB  HOST_DDSC						      ; 1445

				0000G  CF  9F 0033C 	    PUSHAB  OTRG_DDSC						      ;

		  0000V  CF	       03  FB 00340 	    CALLS   #3, PACK_DATA					      ; 1657

	   50	  0000G  CF	0000G  CF  C1 00345 	    ADDL3   OTRG_DDSC, BASE_ADDR, R0				      ; 1659

    0000G  CF	         50	       06  C3 0034D 	    SUBL3   #6, R0, BASE_ADDR					      ;

				       C0  11 00353 16$:    BRB     13$							      ; 1644

		         57	0000G  CF  D0 00355 17$:    MOVL    OTRG_DDSC+4, PTR					      ; 1669

		         87	  0C   AE  90 0035A 	    MOVB    MOPLOAD_TYPE, (PTR)+				      ; 1670

				  04   AE  D6 0035E 	    INCL    LOAD_NUM						      ; 1672

		         87	  04   AE  90 00361 	    MOVB    LOAD_NUM, (PTR)+					      ; 1673

		         67	0000G  CF  D0 00365 	    MOVL    BASE_ADDR, (PTR)					      ; 1675

		  0000G  CF	       06  D0 0036A 	    MOVL    #6, OTRG_DDSC					      ; 1676

				       A4  11 0036F 18$:    BRB     13$							      ; 1644

	   51	  0000G  CF	0000G  CF  C1 00371 19$:    ADDL3   OTRG_DDSC+4, OTRG_DDSC, R1				      ; 1690

	   52	         51	       04  C1 00379 	    ADDL3   #4, R1, R2						      ;

	   50	  0000G  CF	0000G  CF  C1 0037D 	    ADDL3   OTRG_DDSC+8, OTRG_DDSC+12, R0			      ; 1691

		         50	       52  D1 00385 	    CMPL    R2, R0						      ;

				       63  1E 00388 	    BGEQU   23$							      ;

		         06	0000G  CF  D1 0038A 	    CMPL    OTRG_DDSC, #6					      ; 1702

				       61  1B 0038F 	    BLEQU   24$							      ;

		         61	  08   A6  D0 00391 	    MOVL    8(R6), (R1)						      ; 1711

		  0000G  CF	       04  C0 00395 	    ADDL2   #4, OTRG_DDSC					      ; 1713

				       59  11 0039A 	    BRB     25$							      ; 1644

				  04   AE  D6 0039C 20$:    INCL    LOAD_NUM						      ; 1733

		         57	0000G  CF  D0 0039F 	    MOVL    OTRG_DDSC+4, PTR					      ; 1734

		         87	       14  90 003A4 	    MOVB    #20, (PTR)+						      ; 1735

		         87	  04   AE  90 003A7 	    MOVB    LOAD_NUM, (PTR)+					      ; 1736

		         50	  0C   A6  9A 003AB 	    MOVZBL  12(R6), R0						      ; 1744

	   67	    0D   A6	       50  28 003AF 	    MOVC3   R0, 13(R6), (PTR)					      ;

		         57	       53  D0 003B4 	    MOVL    R3, PTR						      ;

		         67	  08   A6  D0 003B7 	    MOVL    8(R6), (PTR)					      ; 1749

	   50	         57	0000G  CF  C3 003BB 	    SUBL3   OTRG_DDSC+4, PTR, R0				      ; 1752

    0000G  CF	         50	       04  C1 003C1 	    ADDL3   #4, R0, OTRG_DDSC					      ;

				       8A  11 003C7 	    BRB     16$							      ; 1644

		  0000G  CF	  04   A6  D0 003C9 21$:    MOVL    4(R6), BASE_ADDR					      ; 1763

				  04   AC  DD 003CF 	    PUSHL   HOST_MSB_AD						      ; 1764

				0000G  CF  9F 003D2 	    PUSHAB  HOST_DDSC						      ; 1445

		  0000V  CF	       02  FB 003D6 	    CALLS   #2, READ_HDLG					      ; 1764

				       92  11 003DB 	    BRB     18$							      ; 1644

				0000G  CF  9F 003DD 22$:    PUSHAB  OTRG_DDSC						      ; 1445



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 20-4

; Digital Equipment Corporation

;

				       09  DD 003E1 	    PUSHL   #9							      ; 1772

		  0000V  CF	       02  FB 003E3 	    CALLS   #2, TARG_DLG					      ;

		         58	       50  D0 003E8 	    MOVL    R0, STATUS						      ;

				       82  11 003EB 	    BRB     18$							      ; 1644

		         58	       1E  CE 003ED 23$:    MNEGL   #30, STATUS						      ; 1779

				       03  11 003F0 	    BRB     25$							      ; 1644

		         58	       08  CE 003F2 24$:    MNEGL   #8, STATUS						      ; 1786

				     FF1D  31 003F5 25$:    BRW     13$							      ; 1644

		         69	       58  D0 003F8 26$:    MOVL    STATUS, (MCB_PTR)					      ; 1797

		    04   B9	       00  FB 003FB 	    CALLS   #0, @4(MCB_PTR)					      ; 1799

					   04 003FF 	    RET     							      ; 1445



; Routine Size:  415 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 21

; Digital Equipment Corporation

;

;	1802	ROUTINE  PACK_DATA (TBF_DDSC_AD, HOST_DDSC_AD, HOST_MSB_AD) : LNKMSG  =

;	1803	

;	1804	!++

;	1805	! FUNCTIONAL DESCRIPTION:

;	1806	!

;	1807	!	Append image data extracted from the HOST input message

;	1808	!	stream to the string residing in the target buffer.

;	1809	!	This routine has the ability to interpret memory image

;	1810	!	type HOST dialogue messages, and to stop the data

;	1811	!	packing whenever either the TBF_DDSC buffer is full or

;	1812	!	anything other that a valid memory image message is

;	1813	!	encountered.

;	1814	!

;	1815	! FORMAL PARAMETERS:

;	1816	!

;	1817	!	TBF_DDSC_AD	= Address of the double descriptor of

;	1818	!			  the buffer to receive the output. It

;	1819	!			  is assumed that both its string and 

;	1820	!			  buffer desriptor components are valid.

;	1821	!

;	1822	!	HOST_DDSC_AD	= Address of the double descriptor of

;	1823	!			  the buffer to be used to receive the 

;	1824	!			  HOST input messages.	Both the string 

;	1825	!			  and buffer descriptor components are 

;	1826	!			  assumed valid.

;	1827	!

;	1828	!	HOST_MSB_AD	= Address of the message summary block

;	1829	!			  to be used to return a description

;	1830	!			  of the contents of the final message 

;	1831	!			  returned in HOST message buffer.

;	1832	!

;	1833	! IMPLICIT INPUTS:

;	1834	!

;	1835	!	In general the begining of a MOP  'load memory'  message

;	1836	!	already resides in the output buffer and is described by

;	1837	!	the string descriptor component of TBF_DDSC.

;	1838	!

;	1839	!	If the string in the HOST_DDSC buffer is non-null it is

;	1840	!	interpreted as a complete HOST dialogue input message.  

;	1841	!

;	1842	!	R9	- contains the address of the MCB used to control

;	1843	!		  the Host message stream.

;	1844	

;	1845	! IMPLICIT OUTPUTS:

;	1846	!

;	1847	!	On routine exit the string descriptor for TBF_DDSC has

;	1848	!	been modified to account for any data that may have been

;	1849	!	appended to the string which was there on routine entry.

;	1850	!

;	1851	!	On routine exit if the string in the HOST_DDSC buffer

;	1852	!	is non-null then it may be assumed to be a complete  

;	1853	!	HOST dialogue input message.  This string may sit

;	1854	!	anywhere within the buffer, i.e., the string and buffer

;	1855	!	pointers do not need to coincide.

;	1856	!



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 21-1

; Digital Equipment Corporation

;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 22

; Digital Equipment Corporation

;

;	1857	! ROUTINE VALUE:

;	1858	!

;	1859	!	A standard NICE internal status code.

;	1860	!

;	1861	! SIDE EFFECTS:

;	1862	!

;	1863	!	Messages are read from the host input stream.

;	1864	!

;	1865	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 23

; Digital Equipment Corporation

;

;	1866	BEGIN

;	1867	EXTERNAL REGISTER	P_IM = 11, P_OM = 10, MCB_PTR = 9 : REF MCB ;

;	1868	

;	1869	BIND	 HOST_MSB =  .HOST_MSB_AD : MSB,

;	1870		 TBF_DDSC =  .TBF_DDSC_AD : DDSC,

;	1871		HOST_DDSC = .HOST_DDSC_AD : DDSC ;

;	1872	

;	1873	MACRO	 STAT = MCB_PTR [MCB$L_REPLYCODE] % ;

;	1874	

;	1875	LOCAL	CONTINUE, CTL_VEC ;

;	1876	LOCAL	FILL_PTR, SRC_PTR, FILL_SPACE, SRC_LNG ;

;	1877	

;	1878	BIND	CONTROL = UPLIT BYTE (1,2,0) ;

;	1879	

;	1880	!+

;	1881	! determine the amount of space left in the buffer, and the

;	1882	! value of a pointer to it.

;	1883	!-

;	1884	

;	1885	FILL_PTR = .TBF_DDSC [STR_PTR] + .TBF_DDSC [STR_LNG] ;

;	1886	FILL_SPACE = .TBF_DDSC[BUF_LNG] + .TBF_DDSC[BUF_PTR] - .FILL_PTR ;

;	1887	

;	1888	IF .FILL_SPACE EQL 0

;	1889	THEN

;	1890	    STAT = NIC$_RESRCERR ;

;	1891	

;	1892	!+

;	1893	! Now continue to loop in the case statement below until either

;	1894	! the buffer is full, or a problem or a non-image-data message

;	1895	! is encountered.

;	1896	!-

;	1897	

;	1898	CONTINUE = TRUE ;

;	1899	CTL_VEC = CONTROL ;	! setup the control vector which drives

;	1900				! the case loop below.

;	1901	

;	1902	WHILE  .STAT AND .CONTINUE

;	1903	DO

;	1904	   CASE CH$RCHAR_A (CTL_VEC)  FROM 0 TO 2 OF

;	1905		

;	1906	    SET

;	1907	    [0] :

;	1908		!+

;	1909		! reset the control vector pointer

;	1910		!-

;	1911	

;	1912		CTL_VEC = CONTROL ;

;	1913	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 24

; Digital Equipment Corporation

;

;	1914	    [1] :

;	1915		!+

;	1916		! If the host message buffer does not already contain a

;	1917		! message, then read one.  Setup MSB according to the

;	1918		! message contents, and check to see if is a legal

;	1919		! 'load memory image' message.

;	1920		!-

;	1921	

;	1922		BEGIN

;	1923		READ_HDLG (.HOST_DDSC_AD, .HOST_MSB_AD) ;

;	1924	

;	1925		IF .HOST_MSB [MSB$B_MSGTYPE] NEQ NIC$K_MEMIMAGE

;	1926		THEN

;	1927		    CONTINUE = FALSE

;	1928		ELSE

;	1929		    IF  (.HOST_MSB [MSB$B_CPUTYPE] NEQ NIC$K_TYPEVAX)

;	1930				  AND

;	1931		        (.HOST_MSB [MSB$B_CPUTYPE] NEQ NIC$K_TYPE11)

;	1932		    THEN

;	1933			HOST_MSB [MSB$B_STATUS]  =

;	1934						(STAT = NIC$_ILLPARVAL)

;	1935		    ELSE

;	1936			!+

;	1937			! the message is okay, setup a pointer to

;	1938			! the image data, and its length.  The image

;	1939			! begins on the third byte of the message.

;	1940			!-

;	1941	

;	1942			BEGIN

;	1943			SRC_PTR = .HOST_DDSC [STR_PTR] + 2 ;

;	1944			SRC_LNG = .HOST_DDSC [STR_LNG] - 2 ;

;	1945			END ;

;	1946	

;	1947		END ;

;	1948	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 25

; Digital Equipment Corporation

;

;	1949	    [2] :

;	1950		!+

;	1951		! Move all of the image data if it will fit, else move

;	1952		! as much as possible.  Update the fill space and fill

;	1953		! pointer variables.

;	1954		! If not all of the HOST message data is moved, then

;	1955		! reformat the message so that it is a valid HOST image

;	1956		! data message containing the remainder of the image

;	1957		! and update the descriptor of this message, else zero

;	1958		! the HOST message descriptor.

;	1959		!-

;	1960	

;	1961		BEGIN

;	1962		LOCAL	TMP ;

;	1963		TMP	 = MINU (.SRC_LNG, .FILL_SPACE) ;

;	1964		FILL_PTR = CH$MOVE (.TMP, .SRC_PTR, .FILL_PTR) ;

;	1965	

;	1966		IF .SRC_LNG EQL .TMP

;	1967		THEN

;	1968		    HOST_DDSC [STR_LNG] = 0

;	1969		ELSE

;	1970		    BEGIN

;	1971		    CH$MOVE (2,	CH$PTR (.HOST_DDSC [STR_PTR]),

;	1972				CH$PTR (.HOST_DDSC [STR_PTR], .TMP)) ;

;	1973		    HOST_DDSC [STR_LNG] = .HOST_DDSC [STR_LNG] - .TMP ;

;	1974		    HOST_DDSC [STR_PTR] = .HOST_DDSC [STR_PTR] + .TMP ;

;	1975		    END ;

;	1976	

;	1977		FILL_SPACE = .FILL_SPACE - .TMP ;

;	1978	

;	1979		IF .FILL_SPACE EQL 0

;	1980		THEN

;	1981		    CONTINUE = FALSE ;

;	1982		END ;

;	1983	

;	1984	

;	1985	    TES ;

;	1986	

;	1987	!+

;	1988	! Update the target message descriptor.

;	1989	!-

;	1990	   TBF_DDSC [STR_LNG] = .FILL_PTR - .TBF_DDSC [STR_PTR] ;

;	1991	

;	1992	RETURN (

;	1993		(.MCB_PTR [MCB$A_EXIT_RT]) () 	! Take common exit to check for

;	1994		) ;				! and report errors.

;	1995	END ;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      000AC P.AAJ:  .BYTE   1, 2, 0						      ;

					      000AF	    .BLKB   1





; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 25-1

; Digital Equipment Corporation

;

						    CONTROL=		P.AAJ





							    .PSECT  $CODE$,NOWRT,2



					 01FC 00400 PACK_DATA:

							    .WORD   Save R2,R3,R4,R5,R6,R7,R8				      ; 1802

		         5E	       18  C2 00402 	    SUBL2   #24, SP						      ;

				  0C   AC  DD 00405 	    PUSHL   HOST_MSB_AD						      ; 1866

		         58	  04   AC  D0 00408 	    MOVL    TBF_DDSC_AD, R8					      ;

		         56	  08   AC  D0 0040C 	    MOVL    HOST_DDSC_AD, R6					      ;

      08   AE	    04   A8	       68  C1 00410 	    ADDL3   (R8), 4(R8), FILL_PTR				      ; 1885

	   50	    08   A8	  0C   A8  C1 00416 	    ADDL3   12(R8), 8(R8), R0					      ; 1886

      04   AE	         50	  08   AE  C3 0041C 	    SUBL3   FILL_PTR, R0, FILL_SPACE				      ;

				       03  12 00422 	    BNEQ    1$							      ; 1888

		         69	       1E  CE 00424 	    MNEGL   #30, (MCB_PTR)					      ; 1890

		    0C   AE	       01  D0 00427 1$:     MOVL    #1, CONTINUE					      ; 1898

		    10   AE	0000'  CF  9E 0042B 2$:     MOVAB   CONTROL, CTL_VEC					      ; 1802

		         03	       69  E8 00431 3$:     BLBS    (MCB_PTR), 5$					      ; 1902

				     008F  31 00434 4$:     BRW     15$							      ;

		         F9	  0C   AE  E9 00437 5$:     BLBC    CONTINUE, 4$					      ;

		         50	  10   BE  9A 0043B 	    MOVZBL  @CTL_VEC, R0					      ; 1904

				  10   AE  D6 0043F 	    INCL    CTL_VEC						      ;

	   02	         00	       50  CF 00442 	    CASEL   R0, #0, #2						      ;

	 0042	       0008	     FFE5     00446 6$:     .WORD   2$-6$,-						      ;

								    7$-6$,-						      ;

								    10$-6$						      ;

				       DD  11 0044C 	    BRB     2$							      ; 1802

		         7E	  08   AC  7D 0044E 7$:     MOVQ    HOST_DDSC_AD, -(SP)					      ; 1923

		  0000V  CF	       02  FB 00452 	    CALLS   #2, READ_HDLG					      ;

	   50	         6E	       02  C1 00457 	    ADDL3   #2, (SP), R0					      ; 1925

		         02	       60  91 0045B 	    CMPB    (R0), #2						      ;

				       61  12 0045E 	    BNEQ    14$							      ;

	   50	         6E	       01  C1 00460 	    ADDL3   #1, (SP), R0					      ; 1929

		         03	       60  91 00464 	    CMPB    (R0), #3						      ;

				       12  13 00467 	    BEQL    9$							      ;

	   50	         6E	       01  C1 00469 	    ADDL3   #1, (SP), R0					      ; 1931

		         01	       60  91 0046D 	    CMPB    (R0), #1						      ;

				       09  13 00470 	    BEQL    9$							      ;

		         69	       20  CE 00472 	    MNEGL   #32, (MCB_PTR)					      ; 1934

		    00   BE	       20  8E 00475 	    MNEGB   #32, @0(SP)						      ; 1933

				       B6  11 00479 8$:     BRB     3$							      ; 1929

      18   AE	    04   A6	       02  C1 0047B 9$:     ADDL3   #2, 4(R6), SRC_PTR					      ; 1943

      14   AE	         66	       02  C3 00481 	    SUBL3   #2, (R6), SRC_LNG					      ; 1944

				       A9  11 00486 	    BRB     3$							      ; 1904

		         50	  14   AE  D0 00488 10$:    MOVL    SRC_LNG, R0						      ; 1963

		    04   AE	       50  D1 0048C 	    CMPL    R0, FILL_SPACE					      ;

				       04  1B 00490 	    BLEQU   11$							      ;

		         50	  04   AE  D0 00492 	    MOVL    FILL_SPACE, R0					      ;

		         57	       50  D0 00496 11$:    MOVL    R0, TMP						      ;

      08   BE	    18   BE	       57  28 00499 	    MOVC3   TMP, @SRC_PTR, @FILL_PTR				      ; 1964

		    08   AE	       53  D0 0049F 	    MOVL    R3, FILL_PTR					      ;

		         57	  14   AE  D1 004A3 	    CMPL    SRC_LNG, TMP					      ; 1966

				       04  12 004A7 	    BNEQ    12$							      ;

				       66  D4 004A9 	    CLRL    (R6)						      ; 1968



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 25-2

; Digital Equipment Corporation

;

				       0E  11 004AB 	    BRB     13$							      ; 1966

      04 B647	    04   B6	       02  28 004AD 12$:    MOVC3   #2, @4(R6), @4(R6)[TMP]				      ; 1971

		         66	       57  C2 004B4 	    SUBL2   TMP, (R6)						      ; 1973

		    04   A6	       57  C0 004B7 	    ADDL2   TMP, 4(R6)						      ; 1974

		    04   AE	       57  C2 004BB 13$:    SUBL2   TMP, FILL_SPACE					      ; 1977

				       B8  12 004BF 	    BNEQ    8$							      ; 1979

				  0C   AE  D4 004C1 14$:    CLRL    CONTINUE						      ; 1981

				       B3  11 004C4 	    BRB     8$							      ; 1902

	   68	    08   AE	  04   A8  C3 004C6 15$:    SUBL3   4(R8), FILL_PTR, (R8)				      ; 1990

		    04   B9	       00  FB 004CC 	    CALLS   #0, @4(MCB_PTR)					      ; 1993

					   04 004D0 	    RET     							      ; 1802



; Routine Size:  209 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 26

; Digital Equipment Corporation

;

;	1996	GLOBAL ROUTINE READ_HDLG (BF_DDSC_AD, MSB_AD) : LNKMSG  =

;	1997	

;	1998	!++

;	1999	! FUNCTIONAL DESCRIPTION:

;	2000	!

;	2001	!	If the buffer contains a non-null string it is read as

;	2002	!	a NICE dialogue (line service dialogue) message.  If the

;	2003	!	buffer contains a null string then the next HOST

;	2004	!	dialogue message is read with the buffer's double

;	2005	!	descriptor adjusted accordingly.

;	2006	!

;	2007	!	Information is transfered from the HOST message to the 

;	2008	!	message summary block as follows (no action is taken

;	2009	!	unless the message is correctly formed) :

;	2010	!

;	2011	!	msg type	    action

;	2012	!	--------	    ------

;	2013	!

;	2014	!	end of dialogue	    verify message format only

;	2015	!

;	2016	!	set base addr	    Field MSB$L_BASE is setup

;	2017	!

;	2018	!	memory image	    Field MSB$B_CPUTYPE is setup

;	2019	!

;	2020	!	system params	    Fields MSB$B_SYSPAR, MSB$T_SYSPAR,

;	2021	!			    and MSG$L_XFER are setup.

;	2022	!

;	2023	!

;	2024	!

;	2025	! FORMAL PARAMETERS:

;	2026	!

;	2027	!	BF_DDSC_AD	Address of the buffer descriptor which 

;	2028	!			contains the message to be read, or which will

;	2029	!			receive the message from the host node.

;	2030	!

;	2031	!	MSG_TYPE	Address of the longword which returns the

;	2032	!			value of the first byte of the message, i.e.,

;	2033	!			the message type.

;	2034	!

;	2035	! IMPLICIT INPUTS:

;	2036	!

;	2037	!	R9	- contains the address of the MCB used to control and

;	2038	!		  monitor the HOST message input stream.

;	2039	!

;	2040	! IMPLICIT OUTPUTS:

;	2041	!

;	2042	! 	NONE

;	2043	!

;	2044	! ROUTINE VALUE:

;	2045	! COMPLETION CODES:

;	2046	!

;	2047	!	A standard NICE internal status code.

;	2048	!

;	2049	! SIDE EFFECTS:

;	2050	!



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 26-1

; Digital Equipment Corporation

;

;	2051	!	NONE

;	2052	!

;	2053	!--

;	2054	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 27

; Digital Equipment Corporation

;

;	2055	BEGIN

;	2056	EXTERNAL REGISTER	P_IM = 11, P_OM = 10, MCB_PTR = 9 : REF MCB ;

;	2057	

;	2058	BIND	BF_DDSC	 = .BF_DDSC_AD 	: DDSC,

;	2059		HOST_MSB = .MSB_AD 	: MSB ;

;	2060	

;	2061	MACRO	STAT = HOST_MSB [MSB$B_STATUS] % ;

;	2062	

;	2063	LABEL	ALPHA ;

;	2064	LOCAL	PTR, LNG, BOUND ;

;	2065	

;	2066	STAT = NIC$_SUCCESS ;			! Init status indicator

;	2067	

;	2068	!+

;	2069	! If the message currently found within the buffer is null

;	2070	! then read the next message from the HOST input message

;	2071	! stream.

;	2072	!-

;	2073	

;	2074	IF .BF_DDSC [STR_LNG] EQL 0

;	2075	THEN

;	2076	    MESSAGE (RCV_CLOSED, .BF_DDSC_AD) ;

;	2077	

;	2078	PTR = CH$PTR (.BF_DDSC [STR_PTR]) ;

;	2079	LNG = .BF_DDSC [STR_LNG] ;

;	2080	BOUND = .PTR + .LNG ;

;	2081	

;	2082	!+

;	2083	! Process the message according to the type code found in its

;	2084	! first byte.

;	2085	!-

;	2086	

;	2087	SELECTONE  (HOST_MSB [MSB$B_MSGTYPE] = CH$RCHAR_A (PTR)) OF

;	2088	  SET

;	2089	

;	2090	  [NIC$K_EOD] :	    ! *******  end of dialogue message  ********

;	2091		

;	2092		IF .LNG NEQ 2  THEN STAT = NIC$_ILLMSGFMT ;

;	2093	

;	2094	

;	2095	

;	2096	

;	2097	  [NIC$K_SETBASE] : ! *******  set base address message  *******

;	2098	

;	2099		IF .LNG EQL 5

;	2100		THEN 

;	2101		    HOST_MSB [MSB$L_BASE] = ..PTR	

;	2102		ELSE

;	2103		    STAT = NIC$_ILLMSGFMT ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 28

; Digital Equipment Corporation

;

;	2104	  [NIC$K_MEMIMAGE] : ! *******  load image message  ************

;	2105	

;	2106		IF .LNG GEQ 2		! note signed comparison

;	2107		THEN

;	2108		    HOST_MSB [MSB$B_CPUTYPE]  = CH$RCHAR_A (PTR)

;	2109		ELSE

;	2110		    STAT = NIC$_ILLMSGFMT ;

;	2111	

;	2112	

;	2113	

;	2114	

;	2115	

;	2116	  [NIC$K_SYSPAR] :   ! *******  system parameters message  *****

;	2117	

;	2118		BEGIN

;	2119		LOCAL  TMP ;

;	2120	

;	2121		!+

;	2122		! Call SYSPAR_VERIFY to verify correctness of the

;	2123		! system parameter field.  If its okay then move it to

;	2124		! the message summary block.

;	2125		!-

;	2126	

;	2127		IF  SYSPAR_VERIFY (.PTR, TMP)		! TMP returns the field

;	2128		THEN					! length.

;	2129		    BEGIN

;	2130		    HOST_MSB [MSB$B_SYSPAR] = .TMP ;	! setup count field

;	2131		    CH$MOVE (.TMP, .PTR,		! Move the system

;	2132			     HOST_MSB [MSB$T_SYSPAR]	! parameters' field

;	2133			    ) ;

;	2134		    PTR = CH$PLUS (.TMP,.PTR) ;		! Update input msg ptr

;	2135	

;	2136		    !+

;	2137		    ! The final field remaining in the input message must

;	2138		    ! be the 4 byte long transfer address field.

;	2139		    !-

;	2140	

;	2141		    IF  .PTR + 4  EQL  .BOUND		! there must be exactly

;	2142		    THEN				! 4 bytes left for the

;	2143			HOST_MSB [MSB$L_XFER] = ..PTR	! transfer address.

;	2144		    ELSE

;	2145			STAT = NIC$_ILLMSGFMT ;

;	2146	

;	2147		    END 

;	2148	

;	2149		ELSE

;	2150		    STAT = NIC$_ILLPARVAL ;

;	2151		END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 29

; Digital Equipment Corporation

;

;	2152	  [OTHERWISE] :  ! *******  illegal message type  ***********

;	2153	

;	2154		STAT = NIC$_ILLMSGSEQ ;

;	2155	

;	2156	  TES ;

;	2157	

;	2158	

;	2159	!+

;	2160	! If the message just read was anything but a memory image message,

;	2161	! then all of its information has been completely read.  Therefore

;	2162	! zero the string length field of the message descriptor so that

;	2163	! the next time this routine is called it will read a new message.

;	2164	!-

;	2165	

;	2166	IF .HOST_MSB [MSB$B_MSGTYPE] NEQ NIC$K_MEMIMAGE

;	2167	THEN

;	2168	    BF_DDSC [STR_LNG] = 0 ;

;	2169	

;	2170	

;	2171	

;	2172	MCB_PTR [MCB$L_REPLYCODE] = .STAT ;

;	2173	RETURN (

;	2174		(.MCB_PTR [MCB$A_EXIT_RT]) () 	! Take common exit to check for

;	2175		) ;				! report errors

;	2176	END ;











					 01FC 004D1 	    .ENTRY  READ_HDLG, Save R2,R3,R4,R5,R6,R7,R8		      ; 1996

		         5E	       0C  C2 004D3 	    SUBL2   #12, SP						      ;

				  04   AC  DD 004D6 	    PUSHL   BF_DDSC_AD						      ; 2055

		         56	  08   AC  D0 004D9 	    MOVL    MSB_AD, R6						      ;

		         66	       01  90 004DD 	    MOVB    #1, (R6)						      ; 2066

				  00   BE  D5 004E0 	    TSTL    @0(SP)						      ; 2074

				       0A  12 004E3 	    BNEQ    1$							      ;

				  04   AC  DD 004E5 	    PUSHL   BF_DDSC_AD						      ; 2076

				       0C  DD 004E8 	    PUSHL   #12							      ;

		  0000G  CF	       02  FB 004EA 	    CALLS   #2, MESSAGE						      ;

	   50	         6E	       04  C1 004EF 1$:     ADDL3   #4, (SP), R0					      ; 2078

		         57	       60  D0 004F3 	    MOVL    (R0), PTR						      ;

		         50	  00   BE  D0 004F6 	    MOVL    @0(SP), LNG						      ; 2079

      08   AE	         57	       50  C1 004FA 	    ADDL3   LNG, PTR, BOUND					      ; 2080

		    04   AE	       87  9A 004FF 	    MOVZBL  (PTR)+, 4(SP)					      ; 2087

		    02   A6	  04   AE  90 00503 	    MOVB    4(SP), 2(R6)					      ;

				  04   AE  D5 00508 	    TSTL    4(SP)						      ;

				       07  12 0050B 	    BNEQ    2$							      ;

		         02	       50  D1 0050D 	    CMPL    LNG, #2						      ; 2092

				       64  13 00510 	    BEQL    8$							      ;

				       55  11 00512 	    BRB     5$							      ;

		         01	  04   AE  D1 00514 2$:     CMPL    4(SP), #1						      ; 2087

				       0B  12 00518 	    BNEQ    3$							      ;

		         05	       50  D1 0051A 	    CMPL    LNG, #5						      ; 2099

				       4A  12 0051D 	    BNEQ    5$							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 29-1

; Digital Equipment Corporation

;

		    04   A6	       67  D0 0051F 	    MOVL    (PTR), 4(R6)					      ; 2101

				       51  11 00523 	    BRB     8$							      ; 2099

		         02	  04   AE  D1 00525 3$:     CMPL    4(SP), #2						      ; 2087

				       0B  12 00529 	    BNEQ    4$							      ;

		         02	       50  D1 0052B 	    CMPL    LNG, #2						      ; 2106

				       39  19 0052E 	    BLSS    5$							      ;

		    01   A6	       87  90 00530 	    MOVB    (PTR)+, 1(R6)					      ; 2108

				       40  11 00534 	    BRB     8$							      ; 2106

		         03	  04   AE  D1 00536 4$:     CMPL    4(SP), #3						      ; 2087

				       37  12 0053A 	    BNEQ    7$							      ;

				  0C   AE  9F 0053C 	    PUSHAB  TMP							      ; 2127

				       57  DD 0053F 	    PUSHL   PTR							      ;

		  0000V  CF	       02  FB 00541 	    CALLS   #2, SYSPAR_VERIFY					      ;

		         25	       50  E9 00546 	    BLBC    R0, 6$						      ;

		         58	  0C   AE  D0 00549 	    MOVL    TMP, R8						      ; 2130

		    0C   A6	       58  90 0054D 	    MOVB    R8, 12(R6)						      ;

      0D   A6	         67	       58  28 00551 	    MOVC3   R8, (PTR), 13(R6)					      ; 2131

		         57	       58  C0 00556 	    ADDL2   R8, PTR						      ; 2134

	   50	         57	       04  C1 00559 	    ADDL3   #4, PTR, R0						      ; 2141

		    08   AE	       50  D1 0055D 	    CMPL    R0, BOUND						      ;

				       06  12 00561 	    BNEQ    5$							      ;

		    08   A6	       67  D0 00563 	    MOVL    (PTR), 8(R6)					      ; 2143

				       0D  11 00567 	    BRB     8$							      ; 2141

		         66	       04  8E 00569 5$:     MNEGB   #4, (R6)						      ; 2145

				       08  11 0056C 	    BRB     8$							      ; 2127

		         66	       20  8E 0056E 6$:     MNEGB   #32, (R6)						      ; 2150

				       03  11 00571 	    BRB     8$							      ; 2087

		         66	       08  8E 00573 7$:     MNEGB   #8, (R6)						      ; 2154

		         02	  02   A6  91 00576 8$:     CMPB    2(R6), #2						      ; 2166

				       03  13 0057A 	    BEQL    9$							      ;

				  00   BE  D4 0057C 	    CLRL    @0(SP)						      ; 2168

		         69	       66  9A 0057F 9$:     MOVZBL  (R6), (MCB_PTR)					      ; 2172

		    04   B9	       00  FB 00582 	    CALLS   #0, @4(MCB_PTR)					      ; 2174

					   04 00586 	    RET     							      ; 1996



; Routine Size:  182 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 30

; Digital Equipment Corporation

;

;	2177	GLOBAL

;	2178	ROUTINE  SYSPAR_VERIFY (SRC_PTR, LENGTH_AD) : =

;	2179	

;	2180	!++

;	2181	! FUNCTIONAL DESCRIPTION:

;	2182	!

;	2183	!	This routine scans the 'system parameter' field of a

;	2184	!	message and determines if it is formed correctly.  No

;	2185	!	characcters are moved.  Correctness validation is

;	2186	!	syntax, not content, validation.

;	2187	!

;	2188	!	The 'system parameter' format is common to both the

;	2189	!	NICE and MOP protocols and has the form :

;	2190	!

;	2191	!	  PARAMETER  ENDMARK

;	2192	!

;	2193	!	where :

;	2194	!

;	2195	!	ENDMARK   = 0

;	2196	!

;	2197	!	PARAMETER = Parameter description consisting of 

;	2198	!

;	2199	!		PARTYPE (1) : B	  = parameter type number

;	2200	!

;	2201	!		PARLENGTH (1) : B = length of parameter

;	2202	!

;	2203	!		PARVALUE	  = parameter value according

;	2204	!				    to type and length

;	2205	!

;	2206	!		parameter  length	value

;	2207	!		  type	   in bytes	

;	2208	!		---------  --------	------

;	2209	!

;	2210	!		    1	   1 to 6	ASCII name by which

;	2211	!					node is to be known

;	2212	!

;	2213	!		    2	      2		Binary number by which

;	2214	!					node is to be known

;	2215	!

;	2216	!		    3	   1 to 6	ASCII name of host 

;	2217	!					assigned to target

;	2218	!

;	2219	!

;	2220	! FORMAL PARAMETERS:

;	2221	!

;	2222	!	SRC_PTR		= The value of a pointer to the start

;	2223	!			  of the system parameter field.

;	2224	!

;	2225	!	LENGTH_AD	= The address of the longword which

;	2226	!			  returns the length of the field.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 31

; Digital Equipment Corporation

;

;	2227	! IMPLICIT INPUTS:	NONE

;	2228	!

;	2229	! IMPLICIT OUTPUTS:	NONE

;	2230	!

;	2231	! ROUTINE VALUE:	TRUE	If the system parameter field is

;	2232	!				correctly formed.

;	2233	!			FALSE	Otherwise.

;	2234	!

;	2235	! SIDE EFFECTS:		NONE

;	2236	!

;	2237	!--

;	2238	

;	2239	BEGIN

;	2240	LOCAL	STAT, PTR, I, PFLAGS : VECTOR [4,BYTE] ;

;	2241	

;	2242	(PFLAGS [0]) = 0 ;	! Zero the entire vector

;	2243	

;	2244	STAT = TRUE ;	PTR = CH$PTR (.SRC_PTR) ;

;	2245	

;	2246	WHILE  .STAT

;	2247	DO

;	2248	    SELECT  (I = CH$RCHAR_A (PTR)) OF

;	2249	    SET

;	2250	

;	2251	    [0] : EXITLOOP ;

;	2252	

;	2253	    [1,2,3] :	! Verify that no prameters are repeated

;	2254	

;	2255		  IF .PFLAGS [.I]  THEN  EXITLOOP (STAT = FALSE)

;	2256				   ELSE  PFLAGS [.I] = 1 ;

;	2257	

;	2258	    [1,3] :	! Counted node name string 

;	2259	

;	2260		  IF CH$RCHAR (.PTR) LEQU 6

;	2261		  THEN

;	2262			PTR = CH$PLUS (CH$RCHAR (.PTR) + 1, .PTR)

;	2263		  ELSE

;	2264			STAT = FALSE ;

;	2265	

;	2266	    [2] : 	! Node number preceded by count value of 2

;	2267	

;	2268		  IF CH$RCHAR_A (PTR) EQL 2

;	2269		  THEN

;	2270			PTR = CH$PLUS (2, .PTR)

;	2271		  ELSE

;	2272			STAT = FALSE ;

;	2273	

;	2274	    [OTHERWISE] :  STAT = FALSE ;

;	2275	

;	2276	    TES ;

;	2277	

;	2278	.LENGTH_AD = .PTR - .SRC_PTR ;

;	2279	

;	2280	RETURN (.STAT) ;

;	2281	END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 31-1

; Digital Equipment Corporation

;











					 003C 00587 	    .ENTRY  SYSPAR_VERIFY, Save R2,R3,R4,R5			      ; 2178

				       7E  D4 00589 	    CLRL    PFLAGS						      ; 2242

		         53	       01  D0 0058B 	    MOVL    #1, STAT						      ; 2244

		         52	  04   AC  D0 0058E 	    MOVL    SRC_PTR, PTR					      ;

		         66	       53  E9 00592 1$:     BLBC    STAT, 10$						      ; 2246

		         50	       82  9A 00595 	    MOVZBL  (PTR)+, I						      ; 2248

		         54	       50  D0 00598 	    MOVL    I, R4						      ;

		         55	       01  D0 0059B 	    MOVL    #1, R5						      ;

				       54  D5 0059E 	    TSTL    R4							      ;

				       04  12 005A0 	    BNEQ    2$							      ;

				       55  D4 005A2 	    CLRL    R5							      ;

				       55  11 005A4 	    BRB     10$							      ; 2251

		         01	       54  D1 005A6 2$:     CMPL    R4, #1						      ; 2248

				       14  19 005A9 	    BLSS    4$							      ;

		         03	       54  D1 005AB 	    CMPL    R4, #3						      ;

				       0F  14 005AE 	    BGTR    4$							      ;

				       55  D4 005B0 	    CLRL    R5							      ;

	   04	       6E40	       00  E1 005B2 	    BBC     #0, PFLAGS[I], 3$					      ; 2255

				       53  D4 005B7 	    CLRL    STAT						      ;

				       40  11 005B9 	    BRB     10$							      ;

		       6E40	       01  90 005BB 3$:     MOVB    #1, PFLAGS[I]					      ; 2256

		         01	       54  D1 005BF 4$:     CMPL    R4, #1						      ; 2248

				       05  13 005C2 	    BEQL    5$							      ;

		         03	       54  D1 005C4 	    CMPL    R4, #3						      ;

				       15  12 005C7 	    BNEQ    7$							      ;

				       55  D4 005C9 5$:     CLRL    R5							      ;

		         06	       62  91 005CB 	    CMPB    (PTR), #6						      ; 2260

				       0C  1A 005CE 	    BGTRU   6$							      ;

		         51	       62  9A 005D0 	    MOVZBL  (PTR), R1						      ; 2262

		         51	       52  C0 005D3 	    ADDL2   PTR, R1						      ;

	   52	         51	       01  C1 005D6 	    ADDL3   #1, R1, PTR						      ;

				       02  11 005DA 	    BRB     7$							      ; 2260

				       53  D4 005DC 6$:     CLRL    STAT						      ; 2264

		         02	       54  D1 005DE 7$:     CMPL    R4, #2						      ; 2248

				       11  12 005E1 	    BNEQ    9$							      ;

				       55  D4 005E3 	    CLRL    R5							      ;

		         51	       82  9A 005E5 	    MOVZBL  (PTR)+, R1						      ; 2268

		         02	       51  91 005E8 	    CMPB    R1, #2						      ;

				       05  12 005EB 	    BNEQ    8$							      ;

		         52	       02  C0 005ED 	    ADDL2   #2, PTR						      ; 2270

				       02  11 005F0 	    BRB     9$							      ; 2268

				       53  D4 005F2 8$:     CLRL    STAT						      ; 2272

		         9B	       55  E9 005F4 9$:     BLBC    R5, 1$						      ; 2248

				       53  D4 005F7 	    CLRL    STAT						      ; 2274

				       97  11 005F9 	    BRB     1$							      ; 2246

      08   BC	         52	  04   AC  C3 005FB 10$:    SUBL3   SRC_PTR, PTR, @LENGTH_AD				      ; 2278

		         50	       53  D0 00601 	    MOVL    STAT, R0						      ; 2280

					   04 00604 	    RET     							      ; 2178



; Routine Size:  126 bytes



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 31-2

; Digital Equipment Corporation

;







; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 32

; Digital Equipment Corporation

;

;	2282	GLOBAL ROUTINE  TARG_DLG (FCT, DDSC_AD) : =

;	2283	

;	2284	!++

;	2285	! FUNCTIONAL DESCRIPTION:

;	2286	!

;	2287	!	Interface to the line driver.  Understands the line (MOP)

;	2288	!	dialogue and can detect dialogue errors.  Assigns and starts

;	2289	!	the line, sends and receives messages over the line, and stops

;	2290	!	the line.

;	2291	!

;	2292	!	Extensive use of the routines in module NICTRG.B32 is necessary

;	2293	!	to accomplish these functions.  This routine assumes that it

;	2294	!	is the sole interface to the routines in that module.

;	2295	!

;	2296	!	Further insight may be gained by consulting the preamble

;	2297	!	found in module NICTRG.B32.

;	2298	!

;	2299	! FORMAL PARAMETERS:

;	2300	!

;	2301	!	FCT 	- Indicates action to be performed as follows :

;	2302	!

;	2303	!		  TRG$_START	- Assigns and brings up the line named 

;	2304	!				  by DDSC_AD.  Waits for the function to

;	2305	!				  complete.

;	2306	!		  TRG$_STOP	- Deassigns and deallocates the line.

;	2307	!				  Waits for function to complete.

;	2308	!		  TRG$_WAIT	- Waits for the a previous function to

;	2309	!				  complete. Returns the status according

;	2310	!				  to the success of that function.

;	2311	!		  TRG$_RCV_TST	- Waits for any previous target I/O to

;	2312	!				  complete, issues a receive, waits for

;	2313	!				  it to complete and checks the validity

;	2314	!				  of the returned message in the context

;	2315	!				  the last message transmitted.

;	2316	!		  TRG$_RCV_WAIT	- The same as TRG$_RCV except that the 

;	2317	!				  received message is not validated.

;	2318	!		  TRG$_RCV	- The same as TRG$_RCV_WAIT without

;	2319	!				  waiting for the issued receive to

;	2320	!				  complete.

;	2321	!		  TRG$_XMT	- Waits for any previous target I/O to

;	2322	!				  complete, issues the transmit, and

;	2323	!				  returns without waiting for it to 

;	2324	!				  complete.

;	2325	!		  TRG$_XMT_WAIT	- Same as TRG$_XMT followed by a

;	2326	!				  TRG$_WAIT.

;	2327	!		  TRG$_TST_XR	- Waits for the all target I/O to 

;	2328	!				  complete, checks the validity of the 

;	2329	!				  received message in the context of the

;	2330	!				  last message transmitted -- if no

;	2331	!				  message has yet been received then the

;	2332	!				  validation step is skipped.  Issues a

;	2333	!				  transmit with an implied receive. Does

;	2334	!				  not wait for this new I/O to complete.

;	2335	!				  This function facilitates pipelining

;	2336	!				  during downline loads.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 32-1

; Digital Equipment Corporation

;

;	2337	!		  TRG$_XR	- The same as TRG$_TST_XR without the

;	2338	!				  validity checking of the previously

;	2339	!				  received message.

;	2340	!

;	2341	!	DDSC_AD	- For TRG$_START and TRG$_STOP it the DDSC of the line

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

;	2343	!

;	2344	!		  For all transmit and receive functions it is

;	2345	!		  the address of the DDSC of the message to be

;	2346	!		  transmitted or the buffer to be used for the  receive.

;	2347	!		  If it has value 0 on a receive then  an internal 

;	2348	!		  buffer is used.  It MUST be  non-zero  for all 

;	2349	!		  TRANSMIT functions.  An   internal buffer is always 

;	2350	!		  used if for the   receive in function TRG$_TST_XR --

;	2351	!		  the DDSC is  assumed to be that of the message to be

;	2352	!		  xmitted.

;	2353	!

;	2354	!		  The size of a receive buffer or a transmit message 

;	2355	!		  must be less than or equal to NIC$K_IOBFSIZE.

;	2356	!

;	2357	!		  In order to allow pipelining during downline loads,

;	2358	!		  all transmits are buffered internally.  The buffer

;	2359	!		  given by this parameter can therefore be reused 

;	2360	!		  immediately upon return.

;	2361	!

;	2362	!		  The address of the internal receive and transmit 

;	2363	!		  DDSC's are given in the TCB (i.e., TRG_CTL).  In 

;	2364	!		  particular, this is a convenient way of reading the 

;	2365	!		  last message received after an error has occured.

;	2366	! IMPLICIT INPUTS:

;	2367	!

;	2368	!	TRG_CTL		- The target control block.  This control block

;	2369	!			  should be treated as read_only by all routines

;	2370	!			  except this one, and the routines in module

;	2371	!			  'NICTRG.B32'.  The exceptions to this are :

;	2372	!			  (1)  field TCB$B_MOPTIMOUT must be setup 

;	2373	!			  before calling this routine with the function

;	2374	!			  code TRG$_START, and should be unchanged

;	2375	!			  thereafter.  The value of this field should

;	2376	!			  be the number of seconds an I/O request on the

;	2377	!			  line may remain oustanding before it is 

;	2378	!			  cancelled.

;	2379	!			  (2)  field TCB$B_PGM must be setup with the

;	2380	!			  standard NICE code for the type of program

;	2381	!			  being downline loaded before the first load

;	2382	!			  message is transmitted.  This field is read

;	2383	!			  by the routines in module 'NICTRG.B32'.

;	2384	! IMPLICIT OUTPUTS:

;	2385	!

;	2386	!	NONE

;	2387	!

;	2388	! ROUTINE VALUE:

;	2389	!

;	2390	!	The standard internal NICE status code.  If this is anything

;	2391	!	other than NIC$_SUCCESS then breaking the connection to the



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 32-2

; Digital Equipment Corporation

;

;	2392	!	target and reporting to the host node with this same status

;	2393	!	code is is advised.

;	2394	!

;	2395	! SIDE EFFECTS:

;	2396	!

;	2397	!	The event flag number NIC$_TRGEFN is used.  Exclusive use of

;	2398	!	this flag is assumed for this routine and the routines which

;	2399	!	it calls.

;	2400	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 33

; Digital Equipment Corporation

;

;	2401	BEGIN

;	2402	BIND	ARG_DDSC = .DDSC_AD : DDSC ;

;	2403	OWN	TRGBF0 : VECTOR [NIC$K_IOBFSIZE, BYTE],	! Establish internal

;	2404		TRGBF1 : VECTOR [NIC$K_IOBFSIZE, BYTE],	! I/O buffers.

;	2405		TRGBF2 : VECTOR [NIC$K_IOBFSIZE, BYTE] ;

;	2406	

;	2407	OWN	XMT_DDSC : DDSC,	! internal xmit buffer descriptor

;	2408		RCV_DDSC : DDSC,	! internal receive buffer descriptor

;	2409		INT_DDSC : DDSC ;	! internal intermediate buffer used to

;	2410					! double buffer the receives to avoid

;	2411					! race conditions.

;	2412	LITERAL	DONE = 10 ;

;	2413	LOCAL	CTL_VEC, STATUS : SIGNED BYTE ;

;	2414	

;	2415	!+

;	2416	! Establish a control vector to the direct the dispatching in the

;	2417	! case statement below.

;	2418	!-

;	2419	

;	2420	CTL_VEC = (CASE  .FCT FROM 0 TO TRG$_MAXFCT OF

;	2421		     SET

;	2422		     [TRG$_START] :	UPLIT BYTE (0,1,DONE) ;

;	2423		     [TRG$_STOP] :	UPLIT BYTE (1,8,DONE) ;

;	2424		     [TRG$_WAIT] :	UPLIT BYTE (1,DONE) ;

;	2425		     [TRG$_RCV] :	UPLIT BYTE (1,2,3,DONE) ;

;	2426		     [TRG$_RCV_WAIT] :	UPLIT BYTE (1,2,3,1,DONE) ;

;	2427		     [TRG$_RCV_TST] :	UPLIT BYTE (1,2,3,1,4,DONE) ;

;	2428		     [TRG$_XMT] :	UPLIT BYTE (1,7,DONE) ;

;	2429		     [TRG$_XMT_WAIT] :	UPLIT BYTE (1,7,1,DONE) ;

;	2430		     [TRG$_XR] :	UPLIT BYTE (1,6,7,DONE) ;

;	2431		     [TRG$_TST_XR] :	UPLIT BYTE (1,4,6,7,DONE) ;

;	2432		     [OUTRANGE] :	UPLIT BYTE (9,DONE) ;

;	2433		     TES

;	2434		  ) ;

;	2435	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 34

; Digital Equipment Corporation

;

;	2436	STATUS = NIC$_SUCCESS ;

;	2437	WHILE  .STATUS

;	2438	DO

;	2439	  CASE  CH$RCHAR_A (CTL_VEC)  FROM 0 TO  DONE  OF

;	2440	    SET

;	2441	    [0] : !+

;	2442		  ! Initialize TCB and start the line

;	2443		  !-

;	2444	

;	2445		BEGIN

;	2446		TRG_CTL [TCB$L_EFN] = NIC$K_TRGEFN ;	! Event flag to signal

;	2447							! completion.

;	2448		TRG_CTL [TCB$W_RECEIVES] = 0 ;		! Nothing received yet.

;	2449		TRG_CTL [TCB$W_XMITS] = 0 ;		! Nothing xmitted yet.

;	2450		TRG_CTL [TCB$A_INTDDSC] = INT_DDSC ;	! Intermidiate receive

;	2451							! buffer.

;	2452		TRG_CTL [TCB$A_RCVDDSC] = RCV_DDSC ;	! Receive buffer

;	2453		TRG_CTL [TCB$A_XMTDDSC] = XMT_DDSC ;	! Transmit buffer

;	2454	

;	2455		!+

;	2456		! Now initialize the DDSC's

;	2457	

;	2458		XMT_DDSC [STR_PTR] = (XMT_DDSC [BUF_PTR] = TRGBF0) ;

;	2459		RCV_DDSC [STR_PTR] = (RCV_DDSC [BUF_PTR] = TRGBF1) ;

;	2460		INT_DDSC [STR_PTR] = (INT_DDSC [BUF_PTR] = TRGBF2) ;

;	2461		RCV_DDSC [STR_LNG] = (INT_DDSC [STR_LNG] = 0) ;

;	2462		RCV_DDSC [BUF_LNG] = (INT_DDSC [BUF_LNG] = NIC$K_IOBFSIZE) ;

;	2463		XMT_DDSC [BUF_LNG] = NIC$K_IOBFSIZE ;

;	2464	

;	2465	

;	2466		! Now assign the line and link to the target.

;	2467	

;	2468		STATUS = TARG_LINK (1,.DDSC_AD) ;

;	2469		END ;

;	2470	

;	2471	

;	2472	

;	2473	    [1] : !+

;	2474		  ! Wait for target I/O to complete and check its status

;	2475		  !-

;	2476	

;	2477		BEGIN

;	2478		$WAITFR (EFN = .TRG_CTL [TCB$L_EFN]) ;

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

;	2480		TRG_CTL [TCB$B_IMPLDRCV] = FALSE ;	! The default is no

;	2481		END ;					! implied receive. Clear

;	2482							! flag here before the

;	2483							! the next operation.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 35

; Digital Equipment Corporation

;

;	2484	    [2] : !+

;	2485		  ! Issue the receive -- attempt retries if possible

;	2486		  !-

;	2487	

;	2488		BEGIN

;	2489		IF  .XMT_DDSC [STR_PTR] NEQ 0		! There must be a msg to

;	2490		THEN					! retransmit if retries

;	2491		    BEGIN				! are to follow a

;	2492		    TRG_CTL [TCB$B_RETRIES] 		! timed-out recieve.

;	2493				      = NIC$K_MOPRETRY ;

;	2494		    TRG_CTL [TCB$B_IMPLDRCV] = TRUE ;	! Implied receive will

;	2495							! follow retransmission

;	2496		    END					! if first receive fails

;	2497		ELSE

;	2498		    TRG_CTL [TCB$B_RETRIES] = 0 ;

;	2499	

;	2500		STATUS = TARG_IO (1) ;			! 1 => recieve

;	2501		END ;

;	2502	

;	2503	

;	2504	

;	2505	    [3] : !+

;	2506		  ! If the routine parameter is non-zero then it is the

;	2507		  ! the address of the DDSC to return the received message.

;	2508		  !-

;	2509	

;	2510		IF  .DDSC_AD NEQ 0

;	2511		THEN

;	2512		    IF  .ARG_DDSC [BUF_LNG] LSSU .RCV_DDSC [STR_LNG]

;	2513		    THEN

;	2514			STATUS = NIC$_PGM_ERR	! the message will not fit

;	2515		    ELSE

;	2516			BEGIN

;	2517			CH$MOVE (.RCV_DDSC [STR_LNG],	! size

;	2518				 .RCV_DDSC [STR_PTR],	! source

;	2519				 .ARG_DDSC [BUF_PTR]	! destination

;	2520				) ;

;	2521			!+

;	2522			! Now complete the message descriptor.

;	2523	

;	2524			ARG_DDSC [STR_PTR] = .ARG_DDSC [BUF_PTR] ;

;	2525			ARG_DDSC [STR_LNG] = .RCV_DDSC [STR_LNG] ;

;	2526			END ;

;	2527	

;	2528	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 36

; Digital Equipment Corporation

;

;	2529	    [4] : !+

;	2530		  ! Validate the received message in the context of the

;	2531		  ! last message transmitted.   If no message has yet been

;	2532		  ! transmitted, then we are done by default.

;	2533		  !-

;	2534	

;	2535		IF  .TRG_CTL [TCB$W_XMITS] NEQ 0

;	2536		THEN

;	2537		 SELECTONE  .(.XMT_DDSC [STR_PTR])<0,8,0> OF	! Xmit msg type

;	2538		  SET

;	2539		  [MOP$K_MEMLOAD] : ! The expected message type is MOP$K_REQLOAD

;	2540				    ! If this is the rcv'd type and the status

;	2541				    ! is successful, then we can assume all is

;	2542				    ! okay.

;	2543	

;	2544			IF  .TRG_CTL [TCB$B_STATUS]

;	2545			THEN

;	2546			    IF .TRG_CTL [TCB$B_RCVMOPTYP] EQL MOP$K_REQLOAD

;	2547			    THEN

;	2548				()

;	2549			    ELSE

;	2550				STATUS = NIC$_LNPROTERR

;	2551			ELSE

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

;	2553	

;	2554	

;	2555		  [MOP$K_MEMLOADX,   ! If the rcv'd message type is MOP$K_PGMREQ

;	2556		   MOP$K_PARAMS,     ! and status indicates success, then we can

;	2557		   MOP$K_ENTERMOP] : ! assume that all is okay.  It is up to the

;	2558				     ! higher level routine to interpret the

;	2559				     ! received 'program request' message.

;	2560	

;	2561			IF  .TRG_CTL [TCB$B_STATUS]

;	2562			THEN

;	2563			    IF  .TRG_CTL [TCB$B_RCVMOPTYP] EQL MOP$K_PGMREQ

;	2564			    THEN

;	2565				()

;	2566			    ELSE

;	2567				STATUS = NIC$_LNPROTERR

;	2568			ELSE

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

;	2570	

;	2571		  TES ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 37

; Digital Equipment Corporation

;

;	2572	    [5] :  !+

;	2573		   ! Transfer the message to be transmitted to the internal

;	2574		   ! buffer.

;	2575		   !-

;	2576	

;	2577		IF  .ARG_DDSC [STR_LNG] GTRU .XMT_DDSC [BUF_LNG]

;	2578		THEN

;	2579		    STATUS = NIC$_PGM_ERR 	! message is to big for buffer

;	2580		ELSE

;	2581		    BEGIN

;	2582		    CH$MOVE (.ARG_DDSC [STR_LNG],	! size

;	2583			     .ARG_DDSC [BUF_PTR],	! source

;	2584			     .XMT_DDSC [BUF_PTR]	! destination

;	2585			    ) ;

;	2586		    !+

;	2587		    ! Complete message descriptor.  The ARG_DDSC buffer is now

;	2588		    ! free for other purposes.

;	2589	

;	2590		    XMT_DDSC [STR_LNG] = .ARG_DDSC [STR_LNG] ;

;	2591		    XMT_DDSC [STR_PTR] = .XMT_DDSC [BUF_PTR] ;

;	2592		    END ;

;	2593	

;	2594	

;	2595	    [6] : !+

;	2596		  ! Set the implied receive field.

;	2597		  !-

;	2598	

;	2599			TRG_CTL [TCB$B_IMPLDRCV] = TRUE ;

;	2600	

;	2601	    [7] : !+

;	2602		  ! Issue the transmit

;	2603		  !-

;	2604	

;	2605		BEGIN

;	2606		TRG_CTL [TCB$B_RETRIES] = NIC$K_MOPRETRY ;

;	2607	

;	2608		CH$MOVE (.ARG_DDSC [STR_LNG],	! move the data to the

;	2609			 .ARG_DDSC [STR_PTR],	! internal buffer

;	2610			 .XMT_DDSC [BUF_PTR]

;	2611		       ) ;

;	2612		XMT_DDSC [STR_LNG] = .ARG_DDSC [STR_LNG] ;

;	2613		XMT_DDSC [STR_PTR] = .XMT_DDSC [BUF_PTR] ;

;	2614	

;	2615		STATUS = TARG_IO (0) ;			! 0 => transmit

;	2616		END ;

;	2617	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 38

; Digital Equipment Corporation

;

;	2618	    [8] : !+

;	2619		  ! Break the link with the target and deallocate the line.

;	2620		  !-

;	2621	

;	2622			TARG_LINK (0, .DDSC_AD) ;	! 0 => break link etc.

;	2623	

;	2624	    [9] : !+

;	2625		  ! Error in requested function

;	2626		  !-

;	2627	

;	2628			STATUS = NIC$_PGM_ERR ;

;	2629	

;	2630	    [DONE] : ! We're done

;	2631	

;	2632			EXITLOOP ;

;	2633	    TES ;

;	2634	

;	2635	

;	2636	RETURN  (.STATUS) ;

;	2637	END ;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      000B0 P.AAK:  .BYTE   0, 1, 10						      ;

					      000B3	    .BLKB   1

					      000B4 P.AAL:  .BYTE   1, 8, 10						      ;

					      000B7	    .BLKB   1

					      000B8 P.AAM:  .BYTE   1, 10						      ;

					      000BA	    .BLKB   2

					      000BC P.AAN:  .BYTE   1, 2, 3, 10						      ;

					      000C0 P.AAO:  .BYTE   1, 2, 3, 1, 10					      ;

					      000C5	    .BLKB   3

					      000C8 P.AAP:  .BYTE   1, 2, 3, 1, 4, 10					      ;

					      000CE	    .BLKB   2

					      000D0 P.AAQ:  .BYTE   1, 7, 10						      ;

					      000D3	    .BLKB   1

					      000D4 P.AAR:  .BYTE   1, 7, 1, 10						      ;

					      000D8 P.AAS:  .BYTE   1, 6, 7, 10						      ;

					      000DC P.AAT:  .BYTE   1, 4, 6, 7, 10					      ;

					      000E1	    .BLKB   3

					      000E4 P.AAU:  .BYTE   9, 10						      ;

					      000E6	    .BLKB   2



							    .PSECT  $OWN$,NOEXE,2



					      00000 TRGBF0: .BLKB   600

					      00258 TRGBF1: .BLKB   600

					      004B0 TRGBF2: .BLKB   600

					      00708 XMT_DDSC:

							    .BLKB   16

					      00718 RCV_DDSC:

							    .BLKB   16

					      00728 INT_DDSC:



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 38-1

; Digital Equipment Corporation

;

							    .BLKB   16



							    .GLOBL  SYS$WAITFR



							    .PSECT  $CODE$,NOWRT,2



					 0FFC 00605 	    .ENTRY  TARG_DLG, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 2282

		         5A	0000'  CF  9E 00607 	    MOVAB   TRG_CTL, R10					      ;

		         5B	0000'  CF  9E 0060C 	    MOVAB   XMT_DDSC+12, R11					      ;

		         56	  08   AC  D0 00611 	    MOVL    DDSC_AD, R6						      ; 2401

	   09	         00	  04   AC  CF 00615 	    CASEL   FCT, #0, #9						      ; 2420

	 0029	       0022	     001B     0061A 1$:     .WORD   2$-1$,-						      ;

	 003E	       0037	     0030     00620		    3$-1$,-						      ;

	 0053	       004C	     0045     00626		    4$-1$,-						      ;

				     005A     0062C		    5$-1$,-						      ;

								    6$-1$,-						      ;

								    7$-1$,-						      ;

								    8$-1$,-						      ;

								    9$-1$,-						      ;

								    10$-1$,-						      ;

								    11$-1$						      ;

		         58	0000'  CF  9E 0062E 	    MOVAB   P.AAU, CTL_VEC					      ; 2432

				       44  11 00633 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 00635 2$:     MOVAB   P.AAK, CTL_VEC					      ; 2422

				       3D  11 0063A 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 0063C 3$:     MOVAB   P.AAL, CTL_VEC					      ; 2423

				       36  11 00641 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 00643 4$:     MOVAB   P.AAM, CTL_VEC					      ; 2424

				       2F  11 00648 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 0064A 5$:     MOVAB   P.AAN, CTL_VEC					      ; 2425

				       28  11 0064F 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 00651 6$:     MOVAB   P.AAO, CTL_VEC					      ; 2426

				       21  11 00656 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 00658 7$:     MOVAB   P.AAP, CTL_VEC					      ; 2427

				       1A  11 0065D 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 0065F 8$:     MOVAB   P.AAQ, CTL_VEC					      ; 2428

				       13  11 00664 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 00666 9$:     MOVAB   P.AAR, CTL_VEC					      ; 2429

				       0C  11 0066B 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 0066D 10$:    MOVAB   P.AAS, CTL_VEC					      ; 2430

				       05  11 00672 	    BRB     12$							      ; 2420

		         58	0000'  CF  9E 00674 11$:    MOVAB   P.AAT, CTL_VEC					      ; 2431

		         57	       01  90 00679 12$:    MOVB    #1, STATUS						      ; 2436

		         03	       57  E8 0067C 13$:    BLBS    STATUS, 14$						      ; 2437

				     014E  31 0067F 	    BRW     39$							      ;

		         50	       88  9A 00682 14$:    MOVZBL  (CTL_VEC)+, R0					      ; 2439

	   0A	         00	       50  CF 00685 	    CASEL   R0, #0, #10						      ;

	 008C	       007A	     0016     00689 15$:    .WORD   16$-15$,-						      ;

	 00FB	       00C3	     00A1     0068F		    17$-15$,-						      ;

	 0135	       0117	     0111     00695		    18$-15$,-						      ;

		       0147	     0141     0069B		    21$-15$,-						      ;

								    23$-15$,-						      ;

								    29$-15$,-						      ;

								    30$-15$,-						      ;

								    32$-15$,-						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 38-2

; Digital Equipment Corporation

;

								    35$-15$,-						      ;

								    37$-15$,-						      ;

								    39$-15$						      ;

		    20   AA	       03  D0 0069F 16$:    MOVL    #3, TRG_CTL+32					      ; 2446

				  06   AA  B4 006A3 	    CLRW    TRG_CTL+6						      ; 2448

				  0A   AA  B4 006A6 	    CLRW    TRG_CTL+10						      ; 2449

		    14   AA	  14   AB  9E 006A9 	    MOVAB   INT_DDSC, TRG_CTL+20				      ; 2450

		    10   AA	  04   AB  9E 006AE 	    MOVAB   RCV_DDSC, TRG_CTL+16				      ; 2452

		    0C   AA	  F4   AB  9E 006B3 	    MOVAB   XMT_DDSC, TRG_CTL+12				      ; 2453

		         50	F8EC   CB  9E 006B8 	    MOVAB   TRGBF0, R0						      ; 2458

		         6B	       50  D0 006BD 	    MOVL    R0, XMT_DDSC+12					      ;

		    F8   AB	       50  D0 006C0 	    MOVL    R0, XMT_DDSC+4					      ;

		         50	FB44   CB  9E 006C4 	    MOVAB   TRGBF1, R0						      ; 2459

		    10   AB	       50  D0 006C9 	    MOVL    R0, RCV_DDSC+12					      ;

		    08   AB	       50  D0 006CD 	    MOVL    R0, RCV_DDSC+4					      ;

		         50	FD9C   CB  9E 006D1 	    MOVAB   TRGBF2, R0						      ; 2460

		    20   AB	       50  D0 006D6 	    MOVL    R0, INT_DDSC+12					      ;

		    18   AB	       50  D0 006DA 	    MOVL    R0, INT_DDSC+4					      ;

				  14   AB  D4 006DE 	    CLRL    INT_DDSC						      ; 2461

				  04   AB  D4 006E1 	    CLRL    RCV_DDSC						      ;

		    1C   AB	0258   8F  3C 006E4 	    MOVZWL  #600, INT_DDSC+8					      ; 2462

		    0C   AB	0258   8F  3C 006EA 	    MOVZWL  #600, RCV_DDSC+8					      ;

		    FC   AB	0258   8F  3C 006F0 	    MOVZWL  #600, XMT_DDSC+8					      ; 2463

				  08   AC  DD 006F6 	    PUSHL   DDSC_AD						      ; 2468

				       01  DD 006F9 	    PUSHL   #1							      ;

		  0000G  CF	       02  FB 006FB 	    CALLS   #2, TARG_LINK					      ;

				     00B6  31 00700 	    BRW     34$							      ;

				  20   AA  DD 00703 17$:    PUSHL   TRG_CTL+32						      ; 2478

	      00000000G  9F	       01  FB 00706 	    CALLS   #1, @#SYS$WAITFR					      ;

		         57	       6A  90 0070D 	    MOVB    TRG_CTL, STATUS					      ; 2479

				  03   AA  94 00710 	    CLRB    TRG_CTL+3						      ; 2480

				       6D  11 00713 	    BRB     28$							      ; 2439

				  F8   AB  D5 00715 18$:    TSTL    XMT_DDSC+4						      ; 2489

				       08  13 00718 	    BEQL    19$							      ;

		    02   AA	0103   8F  B0 0071A 	    MOVW    #259, TRG_CTL+2					      ; 2493

				       03  11 00720 	    BRB     20$							      ; 2489

				  02   AA  94 00722 19$:    CLRB    TRG_CTL+2						      ; 2498

				       01  DD 00725 20$:    PUSHL   #1							      ; 2500

				     008A  31 00727 	    BRW     33$							      ;

				  08   AC  D5 0072A 21$:    TSTL    DDSC_AD						      ; 2510

				       6F  13 0072D 	    BEQL    31$							      ;

		         59	  04   AB  D0 0072F 	    MOVL    RCV_DDSC, R9					      ; 2512

		         59	  08   A6  D1 00733 	    CMPL    8(R6), R9						      ;

				       03  1E 00737 	    BGEQU   22$							      ;

				     008E  31 00739 	    BRW     37$							      ;

      0C   B6	    08   BB	       59  28 0073C 22$:    MOVC3   R9, @RCV_DDSC+4, @12(R6)				      ; 2517

		    04   A6	  0C   A6  D0 00742 	    MOVL    12(R6), 4(R6)					      ; 2524

		         66	       59  D0 00747 	    MOVL    R9, (R6)						      ; 2525

				       7C  11 0074A 	    BRB     36$							      ; 2510

				  0A   AA  B5 0074C 23$:    TSTW    TRG_CTL+10						      ; 2535

				       7C  13 0074F 	    BEQL    38$							      ;

		         50	  F8   BB  9A 00751 	    MOVZBL  @XMT_DDSC+4, R0					      ; 2537

		         02	       50  91 00755 	    CMPB    R0, #2						      ;

				       09  12 00758 	    BNEQ    24$							      ;

		         22	       6A  E9 0075A 	    BLBC    TRG_CTL, 27$					      ; 2544



; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 38-3

; Digital Equipment Corporation

;

		         0A	  01   AA  91 0075D 	    CMPB    TRG_CTL+1, #10					      ; 2546

				       15  11 00761 	    BRB     26$							      ;

				       50  D5 00763 24$:    TSTL    R0							      ; 2537

				       0A  13 00765 	    BEQL    25$							      ;

		         06	       50  91 00767 	    CMPB    R0, #6						      ;

				       05  13 0076A 	    BEQL    25$							      ;

		         14	       50  91 0076C 	    CMPB    R0, #20						      ;

				       5C  12 0076F 	    BNEQ    38$							      ;

		         0B	       6A  E9 00771 25$:    BLBC    TRG_CTL, 27$					      ; 2561

		         08	  01   AA  91 00774 	    CMPB    TRG_CTL+1, #8					      ; 2563

				       53  13 00778 26$:    BEQL    38$							      ;

		         57	       22  8E 0077A 	    MNEGB   #34, STATUS						      ; 2567

				       4E  11 0077D 	    BRB     38$							      ; 2561

		         57	       6A  90 0077F 27$:    MOVB    TRG_CTL, STATUS					      ; 2569

				       49  11 00782 28$:    BRB     38$							      ; 2537

		    FC   AB	       66  D1 00784 29$:    CMPL    (R6), XMT_DDSC+8					      ; 2577

				       40  1A 00788 	    BGTRU   37$							      ;

      00   BB	    0C   B6	       66  28 0078A 	    MOVC3   (R6), @12(R6), @XMT_DDSC+12				      ; 2582

		    F4   AB	       66  D0 00790 	    MOVL    (R6), XMT_DDSC					      ; 2590

		    F8   AB	       6B  D0 00794 	    MOVL    XMT_DDSC+12, XMT_DDSC+4				      ; 2591

				       33  11 00798 	    BRB     38$							      ; 2439

		    03   AA	       01  90 0079A 30$:    MOVB    #1, TRG_CTL+3					      ; 2599

				       2D  11 0079E 31$:    BRB     38$							      ; 2439

		    02   AA	       03  90 007A0 32$:    MOVB    #3, TRG_CTL+2					      ; 2606

      00   BB	    04   B6	       66  28 007A4 	    MOVC3   (R6), @4(R6), @XMT_DDSC+12				      ; 2608

		    F4   AB	       66  D0 007AA 	    MOVL    (R6), XMT_DDSC					      ; 2612

		    F8   AB	       6B  D0 007AE 	    MOVL    XMT_DDSC+12, XMT_DDSC+4				      ; 2613

				       7E  D4 007B2 	    CLRL    -(SP)						      ; 2615

		  0000G  CF	       01  FB 007B4 33$:    CALLS   #1, TARG_IO						      ;

		         57	       50  90 007B9 34$:    MOVB    R0, STATUS						      ;

				       0F  11 007BC 	    BRB     38$							      ; 2439

				  08   AC  DD 007BE 35$:    PUSHL   DDSC_AD						      ; 2622

				       7E  D4 007C1 	    CLRL    -(SP)						      ;

		  0000G  CF	       02  FB 007C3 	    CALLS   #2, TARG_LINK					      ;

				       03  11 007C8 36$:    BRB     38$							      ; 2439

		         57	       0A  8E 007CA 37$:    MNEGB   #10, STATUS						      ; 2628

				     FEAC  31 007CD 38$:    BRW     13$							      ; 2439

		         50	       57  98 007D0 39$:    CVTBL   STATUS, R0						      ; 2636

					   04 007D3 	    RET     							      ; 2282



; Routine Size:  463 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:47:24	DBB3:[NICE.SRC]NICLS.B32;6					Page 39

; Digital Equipment Corporation

;

;	2638	END				!End of module

;	2639	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $GLOBAL$       	    71    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

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

;  $PLIT$         	   232  NOWRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $OWN$          	  1848    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         1         0       108











; Size:		2004 code + 2151 data bytes

; Run Time:	01:00.4

; Elapsed Time:	02:13.6

; Memory Used:	300 pages

; Compilation Complete

