

; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE  NICDLL  (IDENT='X23') =	

;	0002	BEGIN

;	0003	

;	0004	!

;	0005	!			  COPYRIGHT (c) 1977 BY

;	0006	!	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

;	0007	!

;	0008	! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED

;	0009	! ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE

;	0010	! INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER

;	0011	! COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY

;	0012	! OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY

;	0013	! TRANSFERRED.

;	0014	!

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

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

;	0017	! CORPORATION.

;	0018	!

;	0019	! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS

;	0020	! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

;	0021	!

;	0022	

;	0023	!++

;	0024	! FACILITY:

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

;	0026	!

;	0027	! ABSTRACT:

;	0028	!	    This module performs the activities of the Host node

;	0029	!	    during the downline load of a Target node.  The Host node

;	0030	!	    controls the load and provides access to the secondary and

;	0031	!	    tertiary loader files and to the operating system file which

;	0032	!	    is to be loaded.  It does not speak to the Target node

;	0033	!	    directly, but uses a Server node as an intermediary.

;	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:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 2

; Digital Equipment Corporation

;

;	0045	!

;	0046	! INCLUDE FILES:

;	0047	!

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

;	0940	

;	0941	

;	0942	!

;	0943	! FORWARD ROUTINES

;	0944	!

;	0945	

;	0946	FORWARD ROUTINE

;	0947	

;	0948	  DOWNLINE	:  NOVALUE  LNKMSG,

;	0949	  END_DOWNLINE	: NOVALUE LNKMSG,

;	0950	  INIT_DLL	:  NOVALUE,

;	0951	  PARSE_DLL	:  NOVALUE  LNKMSG,

;	0952	  READ_PGM_REQ	:  LNKMSG,

;	0953	  SERVER_DLG	:  NOVALUE  LNKMSG,

;	0954	  CTL_VADDR,

;	0955	  VERIFY_SYSPAR,

;	0956	  TLK_TO_SRV ;

;	0957	

;	0958	!

;	0959	! EXTERNAL ROUTINE

;	0960	!

;	0961	

;	0962	EXTERNAL ROUTINE

;	0963	

;	0964	

;	0965	  CK_ERR	: LNKMSG,

;	0966	

;	0967	  ACP		: LNKMSG,

;	0968	  GET_REC	: LNKMSG,

;	0969	  MOV_FIELD	: LNKMSG,

;	0970	  VERIFY_LN	: LNKMSG,

;	0971	  CVTLN		: LNKMSG,

;	0972	  LINK		: LNKMSG,

;	0973	  MESSAGE	: LNKMSG,

;	0974	

;	0975	  EXTSTR	: LNKMSG,

;	0976	  EXT_USTR	: LNKMSG,

;	0977	  EXTLN		: LNKMSG,

;	0978	  EXTND		: LNKMSG,

;	0979	  EXTB		: LNKMSG,

;	0980	  EXTW		: LNKMSG,

;	0981	  EXTL		: LNKMSG,

;	0982	

;	0983	  INSSTR	: LNKMSG,

;	0984	  INSLN		: LNKMSG,

;	0985	  INSB		: LNKMSG,

;	0986	  INSW		: LNKMSG,

;	0987	  INSL		: LNKMSG,

;	0988	  INS_CTRS	: LNKMSG,

;	0989	  INSFILL	: LNKMSG,

;	0990	  INS_REST	: LNKMSG ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 2-1

; Digital Equipment Corporation

;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 3

; Digital Equipment Corporation

;

;	0991	!

;	0992	!

;	0993	!

;	0994	

;	0995	LITERAL	    SRV$_POST_RCV = 0,	  SRV$_WAIT_RCV = 1,

;	0996		    SRV$_RCV      = 2,	  SRV$_SEND     = 3,

;	0997		    SRV$_CANCELIO = 4,	  SRV$_MAX_FCT  = 4 ;

;	0998	

;	0999	LITERAL	    VA$_FETCH = 0,	  VA$_DELETE = 1 ;

;	1000	

;	1001	!

;	1002	! OWN STORAGE

;	1003	!

;	1004	

;	1005	OWN

;	1006		RCV_POSTED ;

;	1007	

;	1008	!

;	1009	! EXTERNAL STORAGE:

;	1010	!

;	1011	

;	1012	EXTERNAL

;	1013	

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

;	1015				! second byte of a NICE command message.

;	1016	  CHANNEL : WORD,	! Channel number for communication

;	1017				! with another NICE process.

;	1018	  CPU_TYPE : BYTE,	! NICE code for the processor type of a

;	1019				! target node when doing downline loads.

;	1020	  PGM_TYPE : BYTE,	! NICE code for type of program, i.e.,

;	1021				! secondary or tertiary loader or

;	1022				! operating system, to be loaded next in

;	1023				! the downline load sequence.

;	1024	  DEV_TYPE : BYTE,	! The line device type at the target end

;	1025				! during boots and downline loads

;	1026	

;	1027	

;	1028	  XFER_ADDR,		! Transfer address of program being

;	1029				! downline loaded,

;	1030	  BASE_ADDR,		!   and its base address.

;	1031	

;	1032	  EXP_ADDR,		! Always indicates the highest virtual

;	1033				! address of the NICE process before

;	1034				! any virtual address expansion has

;	1035				! occured.

;	1036	  FILE_MAPPED,		! A true false flag indicating whether

;	1037				! or not a task image is currently 

;	1038				! mapped into the current process'

;	1039				! address space.

;	1040	  BOOT_NEEDED,		! Flag to indicate whether or not a

;	1041				! target node should be booted.

;	1042	

;	1043	  FILE_VADDR_Q	: VECTOR [2, LONG],

;	1044	

;	1045				! Two long words describing the begining



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 3-1

; Digital Equipment Corporation

;

;	1046				! and ending virtual addresses of a

;	1047				! entire mapped file, not just its image

;	1048				! portion.

;	1049	  IMAGE_LB,		! The lower bound virtual address in the

;	1050				! current process space of the task 

;	1051				! image being downline loaded.

;	1052	  IMAGE_UB,		! Its upper bound virtual address.

;	1053	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 4

; Digital Equipment Corporation

;

;	1054	  !+

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

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

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

;	1058	  ! the configuration data base.

;	1059	  !-

;	1060	     LN_DDSC	   : DDSC,

;	1061	     CDB_LN_DDSC   : DDSC,

;	1062	

;	1063	  !+

;	1064	  ! The following are used to describe node names consisting

;	1065	  ! of a counted string whose text portion is at most 6 bytes

;	1066	  ! and whose count field is a single byte.

;	1067	  !-

;	1068	     LND_DDSC	  : DDSC,	! local name

;	1069	     SND_DDSC	  : DDSC,	! server name

;	1070	     TND_DDSC	  : DDSC,	! target name

;	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:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 5

; Digital Equipment Corporation

;

;	1101	EXTERNAL

;	1102	

;	1103		!+

;	1104		! The following table is used to consturct the names

;	1105		! of loader files for downline loads, and for

;	1106		! determining the internal device mnemonic for that

;	1107		! device type.  The first entry is the length of the

;	1108		! loader suffix uplit, the internal device mnemonic

;	1109		! uplit is always two characters.  The index into

;	1110		! these tables is the standard NICE type code divided

;	1111		! by two.

;	1112		!-

;	1113	

;	1114	  LN$AG_NAMES : BLOCKVECTOR [LN$K_ENTRIES, LN$K_ENTSIZE, BYTE] ;

;	1115	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 6

; Digital Equipment Corporation

;

;	1116	GLOBAL ROUTINE DOWNLINE  : NOVALUE LNKMSG =

;	1117	

;	1118	!++

;	1119	! FUNCTIONAL DESCRIPTION:

;	1120	!

;	1121	!	This routine processes the NICE downline load command

;	1122	!	message and supervises the load dialogue with the 

;	1123	!	server.

;	1124	!

;	1125	! FORMAL PARAMETERS:

;	1126	!

;	1127	!	NONE

;	1128	!

;	1129	! IMPLICIT INPUTS:

;	1130	!

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

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

;	1133	!

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

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

;	1136	!	can be found in variable OPTION.

;	1137	!

;	1138	!	The error handler is assumed to be pointed to by the

;	1139	!	MCB$A_EXIT_RT field of the MCB pointed to by R9.  It is assumed to 

;	1140	!	have error handling capabilities which are disabled on routine

;	1141	!	entry.  If these capabilities are enabled by setting field 

;	1142	!	MCB$B_ERROR_ON, and if the low bit of MCB$L_REPLYCODE is clear,

;	1143	!	then if the error handler is called it will not return.

;	1144	!

;	1145	! IMPLICIT OUTPUTS:

;	1146	!

;	1147	!	NONE

;	1148	!

;	1149	! ROUTINE VALUE:

;	1150	! COMPLETION CODES:

;	1151	!

;	1152	!	NONE

;	1153	!

;	1154	! SIDE EFFECTS:

;	1155	!

;	1156	!	The error handler pointed to by MCB$A_EXIT_RT field of the

;	1157	!	MCB pointed to by R9 may be enabled.

;	1158	!

;	1159	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 7

; Digital Equipment Corporation

;

;	1160	BEGIN

;	1161	LOCAL	 FCT, CONTINUE ;

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

;	1163	!+

;	1164	! Routines PARSE_DLL, SERVER_DLG, and SERVER_DLG all assume that the

;	1165	! error handler is enabled.  If any of these routines encounters an

;	1166	! error,it will exit via the error handler and will NOT return to the

;	1167	! calling routine.

;	1168	!-

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

;	1170	CHANNEL = 0 ;			! Init logical link channel to the 

;	1171					! server node to something harmless.

;	1172	INIT_DLL () ;			! Initialize all pertinent

;	1173					! variables.

;	1174	PARSE_DLL () ;			! Parse the command message

;	1175	

;	1176	MESSAGE (CLEAR_ALL, 0) ;	! Cleanup if necessary, in

;	1177					! particular, if an output message

;	1178					! is open then close it.

;	1179	LINK (CHANNEL, SND_DDSC) ;	! Establish a link to the NICE

;	1180					!  object on the server node.

;	1181	CONTINUE = TRUE ;

;	1182	!+

;	1183	! Boot the target, if necessary, to get the program request.

;	1184	!-

;	1185	IF .BOOT_NEEDED 

;	1186	THEN

;	1187	    SERVER_DLG (NIC$K_BTGETREQ, IMSG_DDSC, OMSG_DDSC) ;

;	1188	

;	1189	WHILE .CONTINUE 

;	1190	DO

;	1191	    BEGIN

;	1192	    IF NOT CTL_VADDR (VA$_FETCH)	! Get the pgm to be loaded and

;	1193	    THEN				!  map it into our v.a. space

;	1194		BEGIN

;	1195		MCB_PTR[MCB$L_REPLYCODE] = NIC$_ILL_FILE ;

;	1196		(.MCB_PTR[MCB$A_EXIT_RT]) () ;	! Call the error handler

;	1197		END ;				!  do NOT return

;	1198						!

;	1199	    IF .PGM_TYPE EQL NIC$K_OPSYS	! If the op. sys. is

;	1200	    THEN				!  being loaded, then

;	1201		BEGIN

;	1202		FCT = NIC$K_LDNOREQ ;		!  load pgm, no program

;	1203		CONTINUE = FALSE ;		!  request expected,

;	1204		END

;	1205	    ELSE				! else, load pgm and

;	1206		FCT = NIC$K_LDGETREQ ;		!  and read the request

;	1207	

;	1208	    SERVER_DLG (.FCT, IMSG_DDSC, OMSG_DDSC) ;

;	1209	    END ;

;	1210	

;	1211	END_DOWNLINE () ;			! Cleanup

;	1212	END ;







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 7-1

; Digital Equipment Corporation

;

							    .TITLE  NICDLL

							    .IDENT  \X23\



							    .PSECT  $OWN$,NOEXE,2



					      00000 RCV_POSTED:

							    .BLKB   4



							    .GLOBL  CK_ERR, ACP, GET_REC, MOV_FIELD, VERIFY_LN, CVTLN

							    .GLOBL  LINK, MESSAGE, EXTSTR, EXT_USTR, EXTLN, EXTND

							    .GLOBL  EXTB, EXTW, EXTL, INSSTR, INSLN, INSB, INSW, INSL

							    .GLOBL  INS_CTRS, INSFILL, INS_REST, OPTION, CHANNEL, CPU_TYPE

							    .GLOBL  PGM_TYPE, DEV_TYPE, XFER_ADDR, BASE_ADDR, EXP_ADDR

							    .GLOBL  FILE_MAPPED, BOOT_NEEDED, FILE_VADDR_Q, IMAGE_LB

							    .GLOBL  IMAGE_UB, LN_DDSC, CDB_LN_DDSC, LND_DDSC, SND_DDSC

							    .GLOBL  TND_DDSC, SYSPAR_DDSC, BTPW_DDSC, OPSYS_DDSC, PGM_DDSC

							    .GLOBL  IMSG_DDSC, OMSG_DDSC, CMD_IMSG_DDSC, CMD_OMSG_DDSC

							    .GLOBL  AUX0_DDSC, AUX1_DDSC, LARGE_DDSC, LN$AG_NAMES



							    .PSECT  $CODE$,NOWRT,2



					 000C 00000 	    .ENTRY  DOWNLINE, Save R2,R3				      ; 1116

		    41   A9	       01  90 00002 	    MOVB    #1, 65(MCB_PTR)					      ; 1169

				0000G  CF  B4 00006 	    CLRW    CHANNEL						      ; 1170

		  0000V  CF	       00  FB 0000A 	    CALLS   #0, INIT_DLL					      ; 1172

		  0000V  CF	       00  FB 0000F 	    CALLS   #0, PARSE_DLL					      ; 1174

		         7E	       0A  7D 00014 	    MOVQ    #10, -(SP)						      ; 1176

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

				0000G  CF  9F 0001C 	    PUSHAB  SND_DDSC						      ; 1179

				0000G  CF  9F 00020 	    PUSHAB  CHANNEL						      ;

		  0000G  CF	       02  FB 00024 	    CALLS   #2, LINK						      ;

		         53	       01  D0 00029 	    MOVL    #1, CONTINUE					      ; 1181

		         0F	0000G  CF  E9 0002C 	    BLBC    BOOT_NEEDED, 2$					      ; 1185

				0000G  CF  9F 00031 	    PUSHAB  OMSG_DDSC						      ; 1187

				0000G  CF  9F 00035 	    PUSHAB  IMSG_DDSC						      ;

				       02  DD 00039 	    PUSHL   #2							      ;

		  0000V  CF	       03  FB 0003B 1$:     CALLS   #3, SERVER_DLG					      ;

		         2B	       53  E9 00040 2$:     BLBC    CONTINUE, 6$					      ; 1189

				       7E  D4 00043 	    CLRL    -(SP)						      ; 1192

		  0000V  CF	       01  FB 00045 	    CALLS   #1, CTL_VADDR					      ;

		         07	       50  E8 0004A 	    BLBS    R0, 3$						      ;

		         69	       1A  CE 0004D 	    MNEGL   #26, (MCB_PTR)					      ; 1195

		    04   B9	       00  FB 00050 	    CALLS   #0, @4(MCB_PTR)					      ; 1196

		         02	0000G  CF  91 00054 3$:     CMPB    PGM_TYPE, #2					      ; 1199

				       05  12 00059 	    BNEQ    4$							      ;

		         52	       01  7D 0005B 	    MOVQ    #1, FCT						      ; 1202

				       02  11 0005E 	    BRB     5$							      ; 1199

				       52  D4 00060 4$:     CLRL    FCT							      ; 1206

				0000G  CF  9F 00062 5$:     PUSHAB  OMSG_DDSC						      ; 1208

				0000G  CF  9F 00066 	    PUSHAB  IMSG_DDSC						      ;

				       52  DD 0006A 	    PUSHL   FCT							      ;

				       CD  11 0006C 	    BRB     1$							      ;

		  0000V  CF	       00  FB 0006E 6$:     CALLS   #0, END_DOWNLINE					      ; 1211

					   04 00073 	    RET     							      ; 1116





; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 7-2

; Digital Equipment Corporation

;

; Routine Size:  116 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 8

; Digital Equipment Corporation

;

;	1213	ROUTINE INIT_DLL  : NOVALUE =

;	1214	

;	1215	!++

;	1216	! FUNCTIONAL DESCRIPTION:

;	1217	!

;	1218	!

;	1219	! FORMAL PARAMETERS:

;	1220	!

;	1221	!	NONE

;	1222	!

;	1223	! IMPLICIT INPUTS:

;	1224	!

;	1225	!	NONE

;	1226	!

;	1227	! IMPLICIT OUTPUTS:

;	1228	!

;	1229	!	NONE

;	1230	!

;	1231	! ROUTINE VALUE:

;	1232	! COMPLETION CODES:

;	1233	!

;	1234	!	NONE

;	1235	!

;	1236	! SIDE EFFECTS:

;	1237	!

;	1238	!	NONE

;	1239	!

;	1240	!--

;	1241	

;	1242	BEGIN

;	1243	RCV_POSTED  = FALSE ;

;	1244	FILE_MAPPED = FALSE ;

;	1245	END ;











					 0000 00074 INIT_DLL:

							    .WORD   Save nothing					      ; 1213

				0000'  CF  D4 00076 	    CLRL    RCV_POSTED						      ; 1243

				0000G  CF  D4 0007A 	    CLRL    FILE_MAPPED						      ; 1244

					   04 0007E 	    RET     							      ; 1213



; Routine Size:  11 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 9

; Digital Equipment Corporation

;

;	1246	GLOBAL ROUTINE  END_DOWNLINE  : LNKMSG NOVALUE =

;	1247	

;	1248	!++

;	1249	! FUNCTIONAL DESCRIPTION:

;	1250	!

;	1251	!	Perform cleanup operations such as deassining the channel to

;	1252	!	the server and deleting files from the process virtual

;	1253	!	address space.

;	1254	!

;	1255	!	This routine may be called from the error handler as well as

;	1256	!	from the downline load mainline routine.

;	1257	!

;	1258	! FORMAL PARAMETERS:

;	1259	!

;	1260	!	NONE

;	1261	!

;	1262	! IMPLICIT INPUTS:

;	1263	!

;	1264	!	CHANNEL		- Word containing the channel to the target

;	1265	!			  node.

;	1266	!

;	1267	!	All implicit inputs to routine CTL_VADDR.

;	1268	!

;	1269	! IMPLICIT OUTPUTS:

;	1270	!

;	1271	!	NONE

;	1272	!

;	1273	! ROUTINE VALUE:

;	1274	! COMPLETION CODES:

;	1275	!

;	1276	!	NONE

;	1277	!

;	1278	! SIDE EFFECTS:

;	1279	!

;	1280	!	NONE

;	1281	!

;	1282	!--

;	1283	

;	1284	BEGIN

;	1285	$DASSGN (CHAN = .CHANNEL) ;	! Destroy  link if it exists

;	1286	

;	1287	CTL_VADDR (VA$_DELETE) ;	! Delete any files from the virtual

;	1288					! address space and shrink the virual

;	1289					! address space to its original size.

;	1290	END ;







							    .GLOBL  SYS$DASSGN



					 0000 0007F 	    .ENTRY  END_DOWNLINE, Save nothing				      ; 1246

		         7E	0000G  CF  3C 00081 	    MOVZWL  CHANNEL, -(SP)					      ; 1285

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

				       01  DD 0008D 	    PUSHL   #1							      ; 1287

		  0000V  CF	       01  FB 0008F 	    CALLS   #1, CTL_VADDR					      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 9-1

; Digital Equipment Corporation

;

					   04 00094 	    RET     							      ; 1246



; Routine Size:  22 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 10

; Digital Equipment Corporation

;

;	1291	GLOBAL

;	1292	ROUTINE  PARSE_DLL : NOVALUE LNKMSG =

;	1293	

;	1294	!++

;	1295	! FUNCTIONAL DESCRIPTION:

;	1296	!

;	1297	!	This routine parses the 'downline load' command

;	1298	!	message.

;	1299	!

;	1300	! FORMAL PARAMETERS:

;	1301	!

;	1302	!	NONE

;	1303	!

;	1304	! IMPLICIT INPUTS:

;	1305	!

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

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

;	1308	!

;	1309	!	The error handler is assumed to be enabled.

;	1310	!

;	1311	! IMPLICIT OUTPUTS:

;	1312	!

;	1313	!	SYSPAR_DDSC	- The 'system parameter' field to be sent

;	1314	!			  to the server.

;	1315	!	OPSYS_DDSC	- Name of the final file to be loaded.

;	1316	!	TND_DDSC	- Name of the target node.

;	1317	!	SND_DDSC	- Name of the target's server node.

;	1318	!	LN_DDSC		- Name of the line joining the target

;	1319	!			  and server.  This is the name as known

;	1320	!			  to the server, and is of the form XMA0

;	1321	!	AUX0_DDSC	- The data base record for the target node.

;	1322	!	BOOT_NEEDED	- Returns a true/false value depending

;	1323	!			  upon whether or not the target needs

;	1324	!			  to be booted to retrieve the program

;	1325	!			  request information.

;	1326	!

;	1327	!	If BOOT_NEEDED is 'false', then the following

;	1328	!	information is returned.

;	1329	!

;	1330	!	CPU_TYPE	- The NICE code indicating the target's

;	1331	!			  cpu type

;	1332	!	DEV_TYPE	- The NICE code for the line controller

;	1333	!			  on the target node.

;	1334	!	PGM_TYPE	- The NICE code for the program type

;	1335	!			  to be loaded first.

;	1336	!	PGM_DDSC	- The name of the program to be loaded

;	1337	!			  first.

;	1338	!

;	1339	!

;	1340	!	If BOOT_NEEDED is 'true' then the following information

;	1341	!	is returned.

;	1342	!

;	1343	!	BTPW_DDSC	- The boot password for the Target node.

;	1344	!

;	1345	! ROUTINE VALUE:



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 10-1

; Digital Equipment Corporation

;

;	1346	! COMPLETION CODES:

;	1347	!

;	1348	!	NONE

;	1349	!

;	1350	! SIDE EFFECTS:

;	1351	!

;	1352	!	CDB_LN_DDSC and AUX1_DDSC may be used as temporaries.

;	1353	!

;	1354	!	If an error is encountered then the error handler is

;	1355	!	called and the caller is not returned to.

;	1356	!

;	1357	!	The message being parsed is closed upon return.

;	1358	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 11

; Digital Equipment Corporation

;

;	1359	BEGIN

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

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

;	1362	

;	1363	!+

;	1364	! Define a standard configuration data base remote node record structure

;	1365	! for the target node.  Use the auxilliary buffer given by AUX0_DDSC.

;	1366	!-

;	1367	

;	1368	BIND RND_REC = .AUX0_DDSC [BUF_PTR] : BLOCK [RND$C_SIZE, BYTE] ;

;	1369	

;	1370	

;	1371	!+

;	1372	!*********************************************************************

;	1373	! The current implementation assumes that the default server node is

;	1374	! the local node.

;	1375	!*********************************************************************

;	1376	!-

;	1377	

;	1378	    ACP (GET_LOCAL_NAME,0,0,LND_DDSC) ;	  ! Get a copy of the

;	1379						  ! local node name to

;	1380						  ! be used for default

;	1381	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 12

; Digital Equipment Corporation

;

;	1382	!+

;	1383	! Get the name of the server node, the target node, and the 

;	1384	! name of the line that joins them.

;	1385	!-

;	1386	

;	1387	  BEGIN

;	1388	  LOCAL	    CTL_VEC ;	! Used to control dispatching in the case

;	1389				! statement.

;	1390	

;	1391		!+

;	1392		! Define the labels for the case statement action routines

;	1393		! defined below.

;	1394		!-

;	1395	  LITERAL   TNDMSG = 0, SNDMSG = 1, SNDRND = 2, LINMSG = 3, LINRND = 4,

;	1396		    RNDTND = 5, RNDSRV = 6, TNDRND = 7, ILLOPT = 8, DONE = 9  ;

;	1397	

;	1398	  !+

;	1399	  ! Associate a control vector with CTL_VEC according to the option bits

;	1400	  ! specified.  These control vectors are used to direct the case 

;	1401	  ! statement dispatching.  The low order two bits of the OPTION code

;	1402	  ! have the following meaning :

;	1403	  !

;	1404	  !	0 - Get the target nodename from the command message, get the

;	1405	  !	    server node and the line joining it to the target from the

;	1406	  !	    Configuration Data Base.

;	1407	  !	1 - Downline load all known nodes using default information

;	1408	  !	    throughout.

;	1409	  !	2 - Get target nodename, the server nodename, and the name of

;	1410	  !	    line joining them from the command message.

;	1411	  !	3 - Get the server nodename and its line to the target from the

;	1412	  !	    command message,  identify the target node from this data.

;	1413	  !-

;	1414	

;	1415	  CTL_VEC = CH$PTR

;	1416		      (CASE  .OPTION<0,2,0>   FROM 0 TO 3 OF

;	1417			SET

;	1418			[0] : UPLIT BYTE (TNDMSG,RNDTND,SNDRND,LINRND,DONE) ;

;	1419			[1] : UPLIT BYTE (ILLOPT,DONE) ;

;	1420			[2] : UPLIT BYTE (TNDMSG,RNDTND,SNDMSG,LINMSG,DONE) ;

;	1421			[3] : UPLIT BYTE (SNDMSG,LINMSG,RNDSRV,TNDRND,DONE) ;

;	1422			TES

;	1423		      ) ;

;	1424	

;	1425	  !+

;	1426	  ! After the following WHILE loop exits the following will be true :

;	1427	  ! AUX0_DDSC - Holds the configuration data base record for the 

;	1428	  !		target node.

;	1429	  ! SND_DDSC  -	Holds the name of the server node.

;	1430	  ! TND_DDSC  -	Holds the name of the target node.

;	1431	  ! LN_DDSC   -	Holds the name of the line on the server node which

;	1432	  !		joins the server and the target nodes.

;	1433	  !

;	1434	  ! Note that error handler is temporarily disabled so that field



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 13

; Digital Equipment Corporation

;

;	1435	  ! 'MCB$L_REPLYCODE' may be remapped to a more appropriate error code

;	1436	  ! if necessary.

;	1437	  !-

;	1438	  MCB_PTR [MCB$B_ERROR_ON] = FALSE ;		! Disable error handler.

;	1439	

;	1440	  WHILE .MCB_PTR [MCB$L_REPLYCODE]

;	1441	  DO 

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

;	1443	     SET

;	1444	     [ILLOPT] :	! Option not supported

;	1445	

;	1446			.MCB_PTR[MCB$L_REPLYCODE] = NIC$_ILL_OPT ;

;	1447	

;	1448	

;	1449	     [TNDMSG] :	!+

;	1450			! Exract the name of the target node from the message.

;	1451			! This nodename cannot be verified by the NETACP since

;	1452			! it may be a new node entering the network. 

;	1453			!-

;	1454			    EXTND (NO_VERIFY, TND_DDSC, 0) ;

;	1455	

;	1456	     [SNDMSG] :	!+

;	1457			! Extract the name of the server node from the message.

;	1458			! A zero length name does not specify the local node,

;	1459			! it is an error condition.

;	1460			!-

;	1461			IF  NOT  EXTND (Z_ERROR, SND_DDSC, 0)

;	1462			THEN

;	1463			    MCB_PTR[MCB$L_REPLYCODE] = NIC$_ILLSRVID ;

;	1464	

;	1465	     [SNDRND] :	!+

;	1466			! Get the server node name from the configuration data 

;	1467			! base's RND record for the target node.  If this is 

;	1468			! null then use the name of the local node as default.

;	1469			!-

;	1470			IF  .RND_REC[RND$B_SERVER] NEQ 0

;	1471			THEN

;	1472			    _MOV_FIELD

;     P 1473				(BUFF = AUX0_DDSC,		 ! Buffer to 

;     P 1474								 ! receive record.

;     P 1475				 STRT = RND_REC [RND$B_SERVER],	 ! Address of 

;     P 1476								 ! source field.

;     P 1477				 SIZE = .RND_REC[RND$B_SERVER]+1,! Field size

;     P 1478				 DEST = SND_DDSC)		 ! Destination 

;	1479								 ! buffer.

;	1480			ELSE

;	1481			    BEGIN

;	1482			    CH$MOVE (.LND_DDSC[STR_LNG],	! Source length.

;	1483				     .LND_DDSC[STR_PTR],	! Source ptr.

;	1484				     .SND_DDSC[STR_PTR]) ;	! Dest. pointer

;	1485			    SND_DDSC[STR_LNG] 			! Complete the

;	1486					= .LND_DDSC[STR_LNG] ;	! descriptor.

;	1487			    END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 14

; Digital Equipment Corporation

;

;	1488	     [LINMSG] :	!+

;	1489			! Extract the name of the line connecting the server and

;	1490			! target nodes from the command message.  This linename

;	1491			! cannot be verified since there is no guarentee that

;	1492			! is attached to the local node (the server and host

;	1493			! nodes may be different).

;	1494			!-

;	1495			IF  EXTLN (NO_VERIFY, LN_DDSC, 0)

;	1496			THEN

;	1497			    IF  CVTLN (TO_NICE_FMT,.LN_DDSC[STR_PTR],CDB_LN_DDSC)

;	1498			    THEN ()

;	1499			    ELSE

;	1500				MCB_PTR[MCB$L_REPLYCODE] = NIC$_ILLSRVID

;	1501			ELSE

;	1502			    MCB_PTR[MCB$L_REPLYCODE] = NIC$_ILLSRVID ;

;	1503	

;	1504	     [LINRND] :	!+

;	1505			! Get the name of the line connecting the server and

;	1506			! target nodes from the data base record for the target

;	1507			! node.

;	1508			!-

;	1509			IF  CVTLN (TO_ASCII,		! Convert to ascii format

;	1510							! (e.g. XMA0).

;	1511				   RND_REC[RND$L_LINE],	! Starting address of 

;	1512							! line name in standard

;	1513							! NICE format.

;	1514				   LN_DDSC)		! DDSC of destination

;	1515			THEN 				! buffer.

;	1516			    IF  CVTLN (TO_NICE_FMT,

;	1517					.LN_DDSC[STR_PTR],

;	1518					CDB_LN_DDSC)

;	1519			    THEN ()

;	1520			    ELSE

;	1521				MCB_PTR[MCB$L_REPLYCODE] = NIC$_ILLSRVID

;	1522			ELSE

;	1523			    MCB_PTR[MCB$L_REPLYCODE] = NIC$_ILLSRVID ;

;	1524	

;	1525	     [RNDTND] :	!+

;	1526			! Get the Configuration Data Base Record for the target

;	1527			! node.  Use the target node name as the search key.

;	1528			!-

;	1529			_GET_REC

;     P 1530			    (FILE = RND$C_FILE,		! Search the remote node

;     P 1531							! records.

;     P 1532			     BUFF = AUX0_DDSC,		! Buffer to hold record.

;     P 1533			     STRT = RND_REC[RND$B_NAME], ! Starting address of

;     P 1534							 ! field within record 

;     P 1535							 ! to match on.

;     P 1536			     KEY  = TND_DDSC		! DDSC of key to match.

;     P 1537			    ) ;		

;	1538	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 15

; Digital Equipment Corporation

;

;	1539	     [RNDSRV] :	!+

;	1540			! Get the Configuration Data Base Record for the target

;	1541			! node from the server identification.  Use the name of

;	1542			! the line joining the target and server as the search key.

;	1543			!-

;	1544			WHILE _GET_REC

;     P 1545				(FILE = RND$C_FILE,	    ! Search the remote

;     P 1546							    ! node records.

;     P 1547				 BUFF = AUX0_DDSC,	    ! Buff to hold record.

;     P 1548				 STRT = RND_REC[RND$L_LINE], ! Starting address

;     P 1549							    ! of field within

;     P 1550							    ! record to match on.

;     P 1551				 KEY  = CDB_LN_DDSC	    ! DDSC of key to match.

;     P 1552				)		

;	1553			DO  !+

;	1554			    ! Both the server node and line must match.  We must

;	1555			    ! verify that either the server name in the record

;	1556			    ! matches the server name, or that the server name in

;	1557			    ! the record is null and the server name is the same

;	1558			    ! as the local name.

;	1559			    !-

;	1560			    IF  (CH$EQL(.SND_DDSC[STR_LNG],.SND_DDSC[STR_PTR],

;	1561					.LND_DDSC[STR_LNG],.SND_DDSC[STR_PTR],

;	1562					-1)

;	1563			    	  AND (.RND_REC[RND$B_SERVER] EQL 0)

;	1564				)

;	1565				OR

;	1566				CH$EQL (.RND_REC[RND$B_SERVER]+1, RND_REC[RND$B_SERVER],

;	1567					.SND_DDSC[STR_LNG], .SND_DDSC[STR_PTR],-1)

;	1568			    THEN

;	1569				EXITLOOP ;

;	1570	

;	1571	

;	1572	     [TNDRND] :	!+

;	1573	

;	1574			! Get the target name from the remote record.

;	1575			!-

;	1576			BEGIN

;	1577			CH$MOVE (.RND_REC[RND$B_NAME]+1, ! length includes count

;	1578				  RND_REC[RND$B_NAME],

;	1579				 .TND_DDSC[BUF_PTR]

;	1580				) ;

;	1581			TND_DDSC[STR_PTR] = .TND_DDSC[BUF_PTR] ;

;	1582			TND_DDSC[STR_LNG] = .RND_REC[RND$B_NAME]+1 ;

;	1583			END ;

;	1584	

;	1585	

;	1586	

;	1587	     [DONE] :	EXITLOOP ;

;	1588	     TES ;

;	1589	

;	1590	  MCB_PTR[MCB$B_ERROR_ON] = TRUE ;		! Restore error handler

;	1591							! state.

;	1592	  IF  NOT .MCB_PTR [MCB$L_REPLYCODE]		! If an error was

;	1593	  THEN						! encountered then exit



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 15-1

; Digital Equipment Corporation

;

;	1594		(.MCB_PTR [MCB$A_EXIT_RT]) () ;		! via the error handler

;	1595							!   do NOT return from

;	1596							!   this call.

;	1597	  END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 16

; Digital Equipment Corporation

;

;	1598	!+

;	1599	! The command message must either contain the data necessary to

;	1600	! identify the program to be loaded, or a boot password which

;	1601	! enables the Server node to request this information from the 

;	1602	! Target node.  This data is labelled 'program data' by the

;	1603	! NICE spec. and its ultimate purpose is to identify the (loader)

;	1604	! file to be downline loaded.

;	1605	!-

;	1606	   BOOT_NEEDED = TRUE ;	! Assume boot is needed to get 'program

;	1607				! data'.

;	1608	

;	1609	SELECTONE  .OPTION <2,2,0> OF

;	1610	  SET

;	1611	  [0] :		! Get the default 'program data' from the data 

;	1612			! base.  Assume secondary loader.

;	1613		BEGIN

;	1614		PGM_TYPE  = NIC$K_SECLDR ;

;	1615		IF .RND_REC [RND$B_SECLDR]	! Null loader name means

;	1616		   EQL 0			! no default exists.

;	1617		THEN

;	1618		    BEGIN

;	1619		    REPLY_CODE = NIC$_DATBASERR ;

;	1620		    (.MCB_PTR[MCB$A_EXIT_RT]) () ;	! Call the error handler

;	1621		    END ;				! -- DO NOT RETURN

;	1622	

;	1623		_MOV_FIELD			! Move the boot password

;     P 1624		  (BUFF = AUX0_DDSC,		! Buffer holding record

;     P 1625		   STRT = RND_REC		! Start address of field

;     P 1626			    [RND$T_SECLDR],

;     P 1627		   SIZE = .RND_REC		! Length of field

;     P 1628			    [RND$B_SECLDR],

;     P 1629		   DEST = PGM_DDSC		! Destination of field

;     P 1630		  ) ;

;	1631		BOOT_NEEDED = FALSE ;		! Boot not needed since

;	1632						! we have 'program data'

;	1633		END ;

;	1634	

;	1635	  [1] : ! Get the default password from the data base

;	1636	

;	1637		_MOV_FIELD			! Move the boot password

;     P 1638		  (BUFF = AUX0_DDSC,		! Buffer holding record

;     P 1639		   STRT = RND_REC		! Start address of field

;     P 1640			    [RND$B_BOOTPW],	! to move.

;     P 1641		   SIZE = .RND_REC		! Length of field, i.e.,

;     P 1642			    [RND$B_BOOTPW] + 1,	! the entire counted str

;     P 1643		   DEST = BTPW_DDSC		! Destination of field

;     P 1644		  ) ;

;	1645	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 17

; Digital Equipment Corporation

;

;	1646	  [2] :	! Extract the 'program data' from the command message

;	1647	

;	1648		BEGIN

;	1649		READ_PGM_REQ () ;		! Return the program to

;	1650						! be loaded in PGM_DDSC

;	1651		BOOT_NEEDED = FALSE ;		! do not boot target

;	1652						! to get the 'program

;	1653		END ;				! data'.

;	1654	

;	1655	

;	1656	  [3] :	! Extract the password from the command message

;	1657	

;	1658		EXTSTR  (8, BTPW_DDSC) ;	! Extract entire counted

;	1659						! string, text portion

;	1660						! is 8 bytes max.

;	1661	  TES ;

;	1662	

;	1663	

;	1664	!+

;	1665	! If the file containing the operating system image is not

;	1666	! given then use the default from the data base.

;	1667	!-

;	1668	

;	1669	IF  .OPTION <4,1,0>

;	1670	THEN

;	1671		BEGIN

;	1672		LOCAL	TMP : BYTE ;

;	1673		EXTB (TMP) ;			! get length of the

;	1674						! following string

;	1675		EXT_USTR (.TMP, OPSYS_DDSC) ;

;	1676		END

;	1677	ELSE

;	1678		_MOV_FIELD

;     P 1679		  (BUFF = AUX0_DDSC,		! Buffer holding record

;     P 1680		   STRT = RND_REC		! Start address of field

;     P 1681			     [RND$T_DLLFILE],

;     P 1682		   SIZE = .RND_REC		! Length of field

;     P 1683			     [RND$B_DLLFILE],

;     P 1684		   DEST = OPSYS_DDSC		! Destination of field

;     P 1685		  ) ;

;	1686	IF .PGM_TYPE EQL NIC$K_OPSYS		! If the program to be

;	1687	THEN					!  loaded initially is

;	1688	    BEGIN				!  the operating system,

;	1689	    CH$MOVE (.OPSYS_DDSC [STR_LNG],	!  then the program

;	1690		     .OPSYS_DDSC [STR_PTR],	!  name returned by

;	1691		     .PGM_DDSC [STR_PTR]	!  READ_PGM_REQ is not

;	1692		    ) ;				!  correct, replace it.

;	1693	    PGM_DDSC [STR_LNG]

;	1694			 = .OPSYS_DDSC [STR_LNG] ;

;	1695	    END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 18

; Digital Equipment Corporation

;

;	1696	!+

;	1697	! Extract the 'system parameters' or use the defaults

;	1698	!-

;	1699	

;	1700	IF .OPTION <5,1,0>

;	1701	THEN

;	1702		! extract parameters from message after verifying their

;	1703		! validity.

;	1704	

;	1705		BEGIN

;	1706		LOCAL	TMP ;

;	1707		IF NOT VERIFY_SYSPAR (.P_IM, TMP)   ! TMP returns field

;	1708		THEN				    ! length

;	1709		    BEGIN

;	1710		    REPLY_CODE = NIC$_ILLMSGFMT ;

;	1711		    (.MCB_PTR[MCB$A_EXIT_RT]) () ;  ! Call the error handler

;	1712		    END			  	    ! -- do NOT return.

;	1713		ELSE

;	1714		    EXT_USTR (.TMP, SYSPAR_DDSC) ;

;	1715		END

;	1716	ELSE

;	1717		BEGIN	! use the default parameters

;	1718	

;	1719		LOCAL 	TMP ;

;	1720		TMP = CH$PTR (.SYSPAR_DDSC [BUF_PTR]) ;

;	1721	

;	1722		!+

;	1723		! Enter the 'target name' parameter code and the

;	1724		! counted target name string.

;	1725	

;	1726		CH$WCHAR_A (1, TMP) ;

;	1727		TMP = CH$MOVE  (.TND_DDSC [STR_LNG],

;	1728				.TND_DDSC [STR_PTR],

;	1729				.TMP

;	1730			      ) ;

;	1731		!+

;	1732		! Enter the 'host name' parameter code and the

;	1733		! counted host name string - local node is defalult host.

;	1734	

;	1735		CH$WCHAR_A (3, TMP) ;

;	1736		TMP = CH$MOVE  (.LND_DDSC [STR_LNG],

;	1737				.LND_DDSC [STR_PTR],

;	1738				.TMP

;	1739			       ) ;

;	1740		!+

;	1741		! Enter the 'end of parameters' marker and adjust the

;	1742		! system parameter string descriptor.

;	1743	

;	1744		CH$WCHAR_A (0, TMP) ;

;	1745	

;	1746		SYSPAR_DDSC [STR_PTR] = .SYSPAR_DDSC [BUF_PTR] ;

;	1747		SYSPAR_DDSC [STR_LNG] = .TMP - .SYSPAR_DDSC [BUF_PTR] ;

;	1748	

;	1749		END ;

;	1750	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 18-1

; Digital Equipment Corporation

;

;	1751	MESSAGE (CHECK_I, 0) ;		! Check to see if superfulous bytes

;	1752					! remain at end of message.

;	1753	END ;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00000 P.AAA:  .BYTE   0, 5, 2, 4, 9					      ;

					      00005	    .BLKB   3

					      00008 P.AAB:  .BYTE   8, 9						      ;

					      0000A	    .BLKB   2

					      0000C P.AAC:  .BYTE   0, 5, 1, 3, 9					      ;

					      00011	    .BLKB   3

					      00014 P.AAD:  .BYTE   1, 3, 6, 7, 9					      ;

					      00019	    .BLKB   3







							    .PSECT  $CODE$,NOWRT,2



					 01FC 00095 	    .ENTRY  PARSE_DLL, Save R2,R3,R4,R5,R6,R7,R8		      ; 1292

		         58	0000G  CF  9E 00097 	    MOVAB   TND_DDSC, R8					      ;

		         5E	       08  C2 0009C 	    SUBL2   #8, SP						      ;

		         56	0000G  CF  D0 0009F 	    MOVL    AUX0_DDSC+12, R6					      ; 1359

				0000G  CF  9F 000A4 	    PUSHAB  LND_DDSC						      ; 1378

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

				       07  DD 000AA 	    PUSHL   #7							      ;

		  0000G  CF	       04  FB 000AC 	    CALLS   #4, ACP						      ;

    0000G  CF	         02	       00  EF 000B1 	    EXTZV   #0, #2, OPTION, R0					      ; 1423

				       50     000B7									      ;

	   03	         00	       50  CF 000B8 	    CASEL   R0, #0, #3						      ;

	 0016	       000F	     0008     000BC 1$:     .WORD   2$-1$,-						      ;

				     001D     000C2		    3$-1$,-						      ;

								    4$-1$,-						      ;

								    5$-1$						      ;

		         57	0000'  CF  9E 000C4 2$:     MOVAB   P.AAA, CTL_VEC					      ; 1418

				       13  11 000C9 	    BRB     6$							      ; 1423

		         57	0000'  CF  9E 000CB 3$:     MOVAB   P.AAB, CTL_VEC					      ; 1419

				       0C  11 000D0 	    BRB     6$							      ; 1423

		         57	0000'  CF  9E 000D2 4$:     MOVAB   P.AAC, CTL_VEC					      ; 1420

				       05  11 000D7 	    BRB     6$							      ; 1423

		         57	0000'  CF  9E 000D9 5$:     MOVAB   P.AAD, CTL_VEC					      ; 1421

				  41   A9  94 000DE 6$:     CLRB    65(MCB_PTR)						      ; 1438

		         03	       69  E8 000E1 7$:     BLBS    (MCB_PTR), 8$					      ; 1440

				     0118  31 000E4 	    BRW     27$							      ;

		         50	       87  9A 000E7 8$:     MOVZBL  (CTL_VEC)+, R0					      ; 1442

	   09	         00	       50  CF 000EA 	    CASEL   R0, #0, #9						      ;

	 0036	       0027	     001A     000EE 9$:     .WORD   11$-9$,-						      ;

	 00A1	       0078	     0069     000F4		    12$-9$,-						      ;

	 0014	       00F7	     00B3     000FA		    13$-9$,-						      ;

				     0111     00100		    17$-9$,-						      ;

								    18$-9$,-						      ;

								    22$-9$,-						      ;

								    23$-9$,-						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 18-2

; Digital Equipment Corporation

;

								    25$-9$,-						      ;

								    10$-9$,-						      ;

								    27$-9$						      ;

		    00   B9	       02  CE 00102 10$:    MNEGL   #2, @0(MCB_PTR)					      ; 1446

				       D9  11 00106 	    BRB     7$							      ; 1442

				       7E  D4 00108 11$:    CLRL    -(SP)						      ; 1454

				       58  DD 0010A 	    PUSHL   R8							      ;

				       03  DD 0010C 	    PUSHL   #3							      ;

		  0000G  CF	       03  FB 0010E 	    CALLS   #3, EXTND						      ;

				       CC  11 00113 	    BRB     7$							      ; 1442

				       7E  D4 00115 12$:    CLRL    -(SP)						      ; 1461

				0000G  CF  9F 00117 	    PUSHAB  SND_DDSC						      ;

				       02  DD 0011B 	    PUSHL   #2							      ;

		  0000G  CF	       03  FB 0011D 	    CALLS   #3, EXTND						      ;

				       63  11 00122 	    BRB     20$							      ;

				00B0   C6  95 00124 13$:    TSTB    176(R6)						      ; 1470

				       1A  13 00128 	    BEQL    15$							      ;

				0000G  CF  9F 0012A 	    PUSHAB  SND_DDSC						      ; 1478

		         7E	00B0   C6  9A 0012E 	    MOVZBL  176(R6), -(SP)					      ;

				       6E  D6 00133 	    INCL    (SP)						      ;

				00B0   C6  9F 00135 	    PUSHAB  176(R6)						      ;

				0000G  CF  9F 00139 	    PUSHAB  AUX0_DDSC						      ;

		  0000G  CF	       04  FB 0013D 	    CALLS   #4, MOV_FIELD					      ;

				       9D  11 00142 14$:    BRB     7$							      ; 1470

    0000G  DF	  0000G  DF	0000G  CF  28 00144 15$:    MOVC3   LND_DDSC, @LND_DDSC+4, @SND_DDSC+4			      ; 1482

		  0000G  CF	0000G  CF  D0 0014E 	    MOVL    LND_DDSC, SND_DDSC					      ; 1486

				       8A  11 00155 16$:    BRB     7$							      ; 1442

				       7E  D4 00157 17$:    CLRL    -(SP)						      ; 1495

				0000G  CF  9F 00159 	    PUSHAB  LN_DDSC						      ;

				       03  DD 0015D 	    PUSHL   #3							      ;

		  0000G  CF	       03  FB 0015F 	    CALLS   #3, EXTLN						      ;

				       0F  11 00164 	    BRB     19$							      ;

				0000G  CF  9F 00166 18$:    PUSHAB  LN_DDSC						      ; 1509

				00B7   C6  9F 0016A 	    PUSHAB  183(R6)						      ; 1511

				       7E  D4 0016E 	    CLRL    -(SP)						      ; 1509

		  0000G  CF	       03  FB 00170 	    CALLS   #3, CVTLN						      ;

		         12	       50  E9 00175 19$:    BLBC    R0, 21$						      ;

				0000G  CF  9F 00178 	    PUSHAB  CDB_LN_DDSC						      ; 1516

				0000G  CF  DD 0017C 	    PUSHL   LN_DDSC+4						      ;

				       02  DD 00180 	    PUSHL   #2							      ;

		  0000G  CF	       03  FB 00182 	    CALLS   #3, CVTLN						      ;

		         72	       50  E8 00187 20$:    BLBS    R0, 26$						      ;

		         69	       18  CE 0018A 21$:    MNEGL   #24, (MCB_PTR)					      ; 1523

				       6D  11 0018D 	    BRB     26$							      ; 1442

				       58  DD 0018F 22$:    PUSHL   R8							      ; 1537

				  01   A6  9F 00191 	    PUSHAB  1(R6)						      ;

				0000G  CF  9F 00194 	    PUSHAB  AUX0_DDSC						      ;

				       01  DD 00198 	    PUSHL   #1							      ;

		  0000G  CF	       04  FB 0019A 	    CALLS   #4, GET_REC						      ;

				       5B  11 0019F 	    BRB     26$							      ; 1442

				0000G  CF  9F 001A1 23$:    PUSHAB  CDB_LN_DDSC						      ; 1552

				00B7   C6  9F 001A5 	    PUSHAB  183(R6)						      ;

				0000G  CF  9F 001A9 	    PUSHAB  AUX0_DDSC						      ;

				       01  DD 001AD 	    PUSHL   #1							      ;

		  0000G  CF	       04  FB 001AF 	    CALLS   #4, GET_REC						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 18-3

; Digital Equipment Corporation

;

		         8B	       50  E9 001B4 	    BLBC    R0, 14$						      ;

		         54	0000G  CF  D0 001B7 	    MOVL    SND_DDSC+4, R4					      ; 1560

      FF   8F	         64	0000G  CF  2D 001BC 	    CMPC5   SND_DDSC, (R4), #-1, LND_DDSC, (R4)			      ;

		         64	0000G  CF     001C3									      ;

				       06  12 001C7 	    BNEQ    24$							      ;

				00B0   C6  95 001C9 	    TSTB    176(R6)						      ; 1563

				       86  13 001CD 	    BEQL    16$							      ;

		         50	00B0   C6  9A 001CF 24$:    MOVZBL  176(R6), R0						      ; 1566

				       50  D6 001D4 	    INCL    R0							      ;

      FF   8F	  00B0   C6	       50  2D 001D6 	    CMPC5   R0, 176(R6), #-1, SND_DDSC, (R4)			      ;

		         64	0000G  CF     001DD									      ;

				       BE  12 001E1 	    BNEQ    23$							      ;

				       17  11 001E3 	    BRB     26$							      ; 1569

		         50	  01   A6  9A 001E5 25$:    MOVZBL  1(R6), R0						      ; 1577

				       50  D6 001E9 	    INCL    R0							      ;

      0C   B8	    01   A6	       50  28 001EB 	    MOVC3   R0, 1(R6), @TND_DDSC+12				      ;

		    04   A8	  0C   A8  D0 001F1 	    MOVL    TND_DDSC+12, TND_DDSC+4				      ; 1581

		         68	  01   A6  9A 001F6 	    MOVZBL  1(R6), TND_DDSC					      ; 1582

				       68  D6 001FA 	    INCL    TND_DDSC						      ;

				     FEE2  31 001FC 26$:    BRW     7$							      ; 1442

		    41   A9	       01  90 001FF 27$:    MOVB    #1, 65(MCB_PTR)					      ; 1590

		         04	       69  E8 00203 	    BLBS    (MCB_PTR), 28$					      ; 1592

		    04   B9	       00  FB 00206 	    CALLS   #0, @4(MCB_PTR)					      ; 1594

		  0000G  CF	       01  D0 0020A 28$:    MOVL    #1, BOOT_NEEDED					      ; 1606

    0000G  CF	         02	       02  EF 0020F 	    EXTZV   #2, #2, OPTION, R2					      ; 1609

				       52     00215									      ;

				       26  12 00216 	    BNEQ    30$							      ;

				0000G  CF  94 00218 	    CLRB    PGM_TYPE						      ; 1614

				  0A   A6  95 0021C 	    TSTB    10(R6)						      ; 1616

				       07  12 0021F 	    BNEQ    29$							      ;

		         69	       1C  CE 00221 	    MNEGL   #28, (MCB_PTR)					      ; 1619

		    04   B9	       00  FB 00224 	    CALLS   #0, @4(MCB_PTR)					      ; 1620

				0000G  CF  9F 00228 29$:    PUSHAB  PGM_DDSC						      ; 1630

		         7E	  0A   A6  9A 0022C 	    MOVZBL  10(R6), -(SP)					      ;

				  0B   A6  9F 00230 	    PUSHAB  11(R6)						      ;

				0000G  CF  9F 00233 	    PUSHAB  AUX0_DDSC						      ;

		  0000G  CF	       04  FB 00237 	    CALLS   #4, MOV_FIELD					      ;

				       27  11 0023C 	    BRB     32$							      ; 1631

		         01	       52  D1 0023E 30$:    CMPL    R2, #1						      ; 1609

				       18  12 00241 	    BNEQ    31$							      ;

				0000G  CF  9F 00243 	    PUSHAB  BTPW_DDSC						      ; 1644

		         7E	  42   A6  9A 00247 	    MOVZBL  66(R6), -(SP)					      ;

				       6E  D6 0024B 	    INCL    (SP)						      ;

				  42   A6  9F 0024D 	    PUSHAB  66(R6)						      ;

				0000G  CF  9F 00250 	    PUSHAB  AUX0_DDSC						      ;

		  0000G  CF	       04  FB 00254 	    CALLS   #4, MOV_FIELD					      ;

				       20  11 00259 	    BRB     34$							      ; 1609

		         02	       52  D1 0025B 31$:    CMPL    R2, #2						      ;

				       0B  12 0025E 	    BNEQ    33$							      ;

		  0000V  CF	       00  FB 00260 	    CALLS   #0, READ_PGM_REQ					      ; 1649

				0000G  CF  D4 00265 32$:    CLRL    BOOT_NEEDED						      ; 1651

				       10  11 00269 	    BRB     34$							      ; 1609

		         03	       52  D1 0026B 33$:    CMPL    R2, #3						      ;

				       0B  12 0026E 	    BNEQ    34$							      ;

				0000G  CF  9F 00270 	    PUSHAB  BTPW_DDSC						      ; 1658



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 18-4

; Digital Equipment Corporation

;

				       08  DD 00274 	    PUSHL   #8							      ;

		  0000G  CF	       02  FB 00276 	    CALLS   #2, EXTSTR						      ;

	   17	  0000G  CF	       04  E1 0027B 34$:    BBC     #4, OPTION, 35$					      ; 1669

				  04   AE  9F 00281 	    PUSHAB  TMP							      ; 1673

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

				0000G  CF  9F 00289 	    PUSHAB  OPSYS_DDSC						      ; 1675

		         7E	  08   AE  9A 0028D 	    MOVZBL  TMP, -(SP)						      ;

		  0000G  CF	       02  FB 00291 	    CALLS   #2, EXT_USTR					      ;

				       14  11 00296 	    BRB     36$							      ; 1669

				0000G  CF  9F 00298 35$:    PUSHAB  OPSYS_DDSC						      ; 1685

		         7E	  26   A6  9A 0029C 	    MOVZBL  38(R6), -(SP)					      ;

				  27   A6  9F 002A0 	    PUSHAB  39(R6)						      ;

				0000G  CF  9F 002A3 	    PUSHAB  AUX0_DDSC						      ;

		  0000G  CF	       04  FB 002A7 	    CALLS   #4, MOV_FIELD					      ;

		         02	0000G  CF  91 002AC 36$:    CMPB    PGM_TYPE, #2					      ; 1686

				       11  12 002B1 	    BNEQ    37$							      ;

    0000G  DF	  0000G  DF	0000G  CF  28 002B3 	    MOVC3   OPSYS_DDSC, @OPSYS_DDSC+4, @PGM_DDSC+4		      ; 1689

		  0000G  CF	0000G  CF  D0 002BD 	    MOVL    OPSYS_DDSC, PGM_DDSC				      ; 1694

	   23	  0000G  CF	       05  E1 002C4 37$:    BBC     #5, OPTION, 39$					      ; 1700

				4800   8F  BB 002CA 	    PUSHR   #^M<R11,SP>						      ; 1707

		  0000V  CF	       02  FB 002CE 	    CALLS   #2, VERIFY_SYSPAR					      ;

		         09	       50  E8 002D3 	    BLBS    R0, 38$						      ;

		         69	       04  CE 002D6 	    MNEGL   #4, (MCB_PTR)					      ; 1710

		    04   B9	       00  FB 002D9 	    CALLS   #0, @4(MCB_PTR)					      ; 1711

				       3D  11 002DD 	    BRB     40$							      ; 1707

				0000G  CF  9F 002DF 38$:    PUSHAB  SYSPAR_DDSC						      ; 1714

				  04   AE  DD 002E3 	    PUSHL   TMP							      ;

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

				       2F  11 002EB 	    BRB     40$							      ; 1700

		         56	0000G  CF  D0 002ED 39$:    MOVL    SYSPAR_DDSC+12, TMP					      ; 1720

		         86	       01  90 002F2 	    MOVB    #1, (TMP)+						      ; 1726

	   66	    04   B8	       68  28 002F5 	    MOVC3   TND_DDSC, @TND_DDSC+4, (TMP)			      ; 1727

		         56	       53  D0 002FA 	    MOVL    R3, TMP						      ;

		         86	       03  90 002FD 	    MOVB    #3, (TMP)+						      ; 1735

	   66	  0000G  DF	0000G  CF  28 00300 	    MOVC3   LND_DDSC, @LND_DDSC+4, (TMP)			      ; 1736

		         56	       53  D0 00308 	    MOVL    R3, TMP						      ;

				       86  94 0030B 	    CLRB    (TMP)+						      ; 1744

		  0000G  CF	0000G  CF  D0 0030D 	    MOVL    SYSPAR_DDSC+12, SYSPAR_DDSC+4			      ; 1746

    0000G  CF	         56	0000G  CF  C3 00314 	    SUBL3   SYSPAR_DDSC+12, TMP, SYSPAR_DDSC			      ; 1747

		         7E	       03  7D 0031C 40$:    MOVQ    #3, -(SP)						      ; 1751

		  0000G  CF	       02  FB 0031F 	    CALLS   #2, MESSAGE						      ;

					   04 00324 	    RET     							      ; 1292



; Routine Size:  656 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 19

; Digital Equipment Corporation

;

;	1754	GLOBAL ROUTINE  READ_PGM_REQ : LNKMSG =

;	1755	

;	1756	!++

;	1757	! FUNCTIONAL DESCRIPTION:

;	1758	!

;	1759	!	This routine parses the 'program request' field of a

;	1760	!	NICE message and determines the name of the file being

;	1761	!	requested.

;	1762	!

;	1763	! FORMAL PARAMETERS:

;	1764	!

;	1765	!	NONE

;	1766	!

;	1767	! IMPLICIT INPUTS:

;	1768	!

;	1769	!	The message containing the program request field is

;	1770	!	assumed to be opened for parsing by the 'NICMSG' 

;	1771	!	subroutines.

;	1772	!

;	1773	!	The database for the target node is found in AUX0_DDSC.

;	1774	!

;	1775	! IMPLICIT OUTPUTS:

;	1776	!

;	1777	!	DEV_TYPE, CPU_TYPE, PGM_TYPE, and PGM_DDSC return,

;	1778	!	respectively, the device, cpu, and program type codes,

;	1779	!	and the uncounted string containing the name of the 

;	1780	!	program to be loaded.

;	1781	!

;	1782	! ROUTINE VALUE:

;	1783	! COMPLETION CODES:

;	1784	!

;	1785	!	Both R0 and the MCB$L_REPLYCODE field of the MCB pointed to by 

;	1786	!	R9 return :

;	1787	!		NIC$_ILLPARVAL	- if one of the program request fields

;	1788	!				  contains data which is unrecognized.

;	1789	!		NIC$_SUCCESS	- otherwise.

;	1790	!

;	1791	! SIDE EFFECTS:

;	1792	!

;	1793	!	P_IM (i.e., R11) is advanced to the first byte following

;	1794	!	the program request field.

;	1795	!

;	1796	!	If an error is encountered the error handler is called.

;	1797	!

;	1798	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 20

; Digital Equipment Corporation

;

;	1799	BEGIN

;	1800	LOCAL 	 PTR, SFTW_ID_LNG : BYTE ;

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

;	1802	BIND	 RND_BF = .AUX0_DDSC [STR_PTR] : BLOCK [RND$C_SIZE, BYTE] ;

;	1803	

;	1804	IF  EXTB (DEV_TYPE)		! Line device type at

;	1805					! target.

;	1806	THEN IF   EXTB (CPU_TYPE)	! target cpu type

;	1807	     THEN IF EXTB (PGM_TYPE)	! type of program to be

;	1808					! loaded.

;	1809		  THEN  EXTB (SFTW_ID_LNG) ;

;	1810	!+

;	1811	! The last field is a counted string containing the 'software

;	1812	! i.d.' of the program to be loaded.  This field is unsupported

;	1813	! for all current DECnet products and must be null.  The actual

;	1814	! software i.d. is determined below.

;	1815	!-

;	1816	

;	1817	!+

;	1818	! Verify that the 'program data' information is supported.

;	1819	!-

;	1820	

;	1821	IF  .MCB_PTR[MCB$L_REPLYCODE]

;	1822	THEN

;	1823	    IF  .SFTW_ID_LNG NEQ 0		! Software i.d. field

;	1824			OR		 	! must be null

;	1825		.CPU_TYPE NEQ NIC$K_TYPE11	! Support downline

;	1826			OR			! loads of PDP11's only

;	1827		.DEV_TYPE  GTRU NIC$K_MAXLNTYPE ! Device type legal ?

;	1828			OR

;	1829		.PGM_TYPE GTRU NIC$K_OPSYS	 ! The operating system

;	1830						 ! code has the maximum

;	1831						 ! defined value.

;	1832	    THEN

;	1833	        MCB_PTR[MCB$L_REPLYCODE] = NIC$_ILLPARVAL ;

;	1834	

;	1835	IF  NOT .MCB_PTR[MCB$L_REPLYCODE]

;	1836	THEN

;	1837	    BEGIN

;	1838	    (.MCB_PTR[MCB$A_EXIT_RT])() ;	! Call the error handler

;	1839	    RETURN				! Done.

;	1840	    END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 21

; Digital Equipment Corporation

;

;	1841	!+

;	1842	! If the program to be loaded is the operating system, then

;	1843	! use the value stored in variable OPSYS_DDSC,  Otherwise,

;	1844	! use the loader file name stored in the data base -- if the

;	1845	! name is null, construct the default name from the DEV_TYPE and

;	1846	! PGM_TYPE variables.

;	1847	!-

;	1848	   PTR = CH$PTR (.PGM_DDSC [BUF_PTR]) ;

;	1849	

;	1850	CASE .PGM_TYPE  FROM 0 TO NIC$K_OPSYS OF

;	1851	  SET

;	1852	  [NIC$K_OPSYS] :	! operating system

;	1853	

;	1854	    PTR = CH$MOVE 

;	1855		   (.OPSYS_DDSC [STR_LNG], .OPSYS_DDSC [STR_PTR], .PTR) ;

;	1856	

;	1857	  [NIC$K_SECLDR] :	! secondary loader

;	1858	

;	1859	    IF .RND_BF [RND$B_SECLDR] NEQ 0

;	1860	    THEN				! Use name from database

;	1861		PTR = CH$MOVE

;	1862		      (.RND_BF[RND$B_SECLDR],RND_BF[RND$T_SECLDR],.PTR)

;	1863	    ELSE

;	1864		BEGIN					! Build the name

;	1865		BIND  LN_NAME = LN$AG_NAMES 

;	1866				[.DEV_TYPE/2, Z4] : LTE ;

;	1867		PTR = CH$MOVE (3, UPLIT BYTE ('SEC'),

;	1868				 .PGM_DDSC [BUF_PTR]) ;

;	1869		PTR = CH$MOVE (.LN_NAME [LTE$B_LDRNAMSIZ],

;	1870			       .LN_NAME [LTE$A_LDRNAME],

;	1871				.PTR

;	1872				) ;

;	1873		PTR = CH$MOVE (4, UPLIT BYTE ('.SYS'), .PTR) ;

;	1874		END ;

;	1875	

;	1876	  [NIC$K_TERLDR] :	! Tertiary loader

;	1877	

;	1878	    IF .RND_BF [RND$B_TERLDR] NEQ 0

;	1879	    THEN				! Use name from database

;	1880		PTR = CH$MOVE

;	1881		      (.RND_BF[RND$B_TERLDR],RND_BF[RND$T_TERLDR],.PTR)

;	1882	    ELSE

;	1883		BEGIN					! Build the name

;	1884		BIND  LN_NAME = LN$AG_NAMES 

;	1885				[.DEV_TYPE/2, Z4] : LTE ;

;	1886		PTR = CH$MOVE (3, UPLIT BYTE ('TER'),

;	1887				 .PGM_DDSC [BUF_PTR]) ;

;	1888		PTR = CH$MOVE (.LN_NAME [LTE$B_LDRNAMSIZ],

;	1889			       .LN_NAME [LTE$A_LDRNAME],

;	1890				.PTR

;	1891				) ;

;	1892		PTR = CH$MOVE (4, UPLIT BYTE ('.SYS'), .PTR) ;

;	1893		END ;

;	1894	  TES ;

;	1895	!+



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 21-1

; Digital Equipment Corporation

;

;	1896	! Update descriptor to reflect name just entered

;	1897	!-

;	1898	  PGM_DDSC [STR_LNG] = .PTR - .PGM_DDSC [BUF_PTR] ;

;	1899	  PGM_DDSC [STR_PTR] = .PGM_DDSC [BUF_PTR] ;

;	1900	

;	1901	RETURN (.MCB_PTR[MCB$L_REPLYCODE]) ;

;	1902	END ;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      0001C P.AAE:  .ASCII  \SEC\						      ;

					      0001F	    .BLKB   1

					      00020 P.AAF:  .ASCII  \.SYS\						      ;

					      00024 P.AAG:  .ASCII  \TER\						      ;

					      00027	    .BLKB   1

					      00028 P.AAH:  .ASCII  \.SYS\						      ;







							    .PSECT  $CODE$,NOWRT,2



					 01FC 00325 	    .ENTRY  READ_PGM_REQ, Save R2,R3,R4,R5,R6,R7,R8		      ; 1754

		         5E	       08  C2 00327 	    SUBL2   #8, SP						      ;

		         58	0000G  CF  D0 0032A 	    MOVL    AUX0_DDSC+4, R8					      ; 1799

				0000G  CF  9F 0032F 	    PUSHAB  DEV_TYPE						      ; 1804

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

		         20	       50  E9 00338 	    BLBC    R0, 1$						      ;

				0000G  CF  9F 0033B 	    PUSHAB  CPU_TYPE						      ; 1806

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

		         14	       50  E9 00344 	    BLBC    R0, 1$						      ;

				0000G  CF  9F 00347 	    PUSHAB  PGM_TYPE						      ; 1807

		  0000G  CF	       01  FB 0034B 	    CALLS   #1, EXTB						      ;

		         08	       50  E9 00350 	    BLBC    R0, 1$						      ;

				  04   AE  9F 00353 	    PUSHAB  SFTW_ID_LNG						      ; 1809

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

		         20	       69  E9 0035B 1$:     BLBC    (MCB_PTR), 4$					      ; 1821

				  04   AE  95 0035E 	    TSTB    SFTW_ID_LNG						      ; 1823

				       15  12 00361 	    BNEQ    2$							      ;

		         01	0000G  CF  91 00363 	    CMPB    CPU_TYPE, #1					      ; 1825

				       0E  12 00368 	    BNEQ    2$							      ;

		         1E	0000G  CF  91 0036A 	    CMPB    DEV_TYPE, #30					      ; 1827

				       07  1A 0036F 	    BGTRU   2$							      ;

		         02	0000G  CF  91 00371 	    CMPB    PGM_TYPE, #2					      ; 1829

				       03  1B 00376 	    BLEQU   3$							      ;

		         69	       20  CE 00378 2$:     MNEGL   #32, (MCB_PTR)					      ; 1833

		         07	       69  E8 0037B 3$:     BLBS    (MCB_PTR), 5$					      ; 1835

		    04   B9	       00  FB 0037E 4$:     CALLS   #0, @4(MCB_PTR)					      ; 1838

				     00A8  31 00382 	    BRW     13$							      ; 1839

		         6E	0000G  CF  D0 00385 5$:     MOVL    PGM_DDSC+12, (SP)					      ; 1848

		         56	       6E  D0 0038A 	    MOVL    (SP), PTR						      ;

	   02	         00	0000G  CF  8F 0038D 	    CASEB   PGM_TYPE, #0, #2					      ; 1850

	 0006	       004C	     0010     00393 6$:     .WORD   8$-6$,-						      ;

								    10$-6$,-						      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 21-2

; Digital Equipment Corporation

;

								    7$-6$						      ;

	   66	  0000G  DF	0000G  CF  28 00399 7$:     MOVC3   OPSYS_DDSC, @OPSYS_DDSC+4, (PTR)			      ; 1855

				       76  11 003A1 	    BRB     12$							      ;

				  0A   A8  95 003A3 8$:     TSTB    10(R8)						      ; 1859

				       0B  13 003A6 	    BEQL    9$							      ;

		         50	  0A   A8  9A 003A8 	    MOVZBL  10(R8), R0						      ; 1862

	   66	    0B   A8	       50  28 003AC 	    MOVC3   R0, 11(R8), (PTR)					      ;

				       66  11 003B1 	    BRB     12$							      ;

		         50	0000G  CF  9A 003B3 9$:     MOVZBL  DEV_TYPE, R0					      ; 1866

		         50	       02  C6 003B8 	    DIVL2   #2, R0						      ;

		         57	0000GCF40  7E 003BB 	    MOVAQ   LN$AG_NAMES[R0], R7					      ;

      00   BE	  0000'  CF	       03  28 003C1 	    MOVC3   #3, P.AAE, @0(SP)					      ; 1867

		         56	       53  D0 003C8 	    MOVL    R3, PTR						      ;

		         50	  03   A7  9A 003CB 	    MOVZBL  3(R7), R0						      ; 1869

	   66	    04   B7	       50  28 003CF 	    MOVC3   R0, @4(R7), (PTR)					      ;

		         56	       53  D0 003D4 	    MOVL    R3, PTR						      ;

	   66	  0000'  CF	       04  28 003D7 	    MOVC3   #4, P.AAF, (PTR)					      ; 1873

				       3A  11 003DD 	    BRB     12$							      ;

				  18   A8  95 003DF 10$:    TSTB    24(R8)						      ; 1878

				       0B  13 003E2 	    BEQL    11$							      ;

		         50	  18   A8  9A 003E4 	    MOVZBL  24(R8), R0						      ; 1881

	   66	    19   A8	       50  28 003E8 	    MOVC3   R0, 25(R8), (PTR)					      ;

				       2A  11 003ED 	    BRB     12$							      ;

		         50	0000G  CF  9A 003EF 11$:    MOVZBL  DEV_TYPE, R0					      ; 1885

		         50	       02  C6 003F4 	    DIVL2   #2, R0						      ;

		         58	0000GCF40  7E 003F7 	    MOVAQ   LN$AG_NAMES[R0], R8					      ;

      00   BE	  0000'  CF	       03  28 003FD 	    MOVC3   #3, P.AAG, @0(SP)					      ; 1886

		         56	       53  D0 00404 	    MOVL    R3, PTR						      ;

		         50	  03   A8  9A 00407 	    MOVZBL  3(R8), R0						      ; 1888

	   66	    04   B8	       50  28 0040B 	    MOVC3   R0, @4(R8), (PTR)					      ;

		         56	       53  D0 00410 	    MOVL    R3, PTR						      ;

	   66	  0000'  CF	       04  28 00413 	    MOVC3   #4, P.AAH, (PTR)					      ; 1892

		         56	       53  D0 00419 12$:    MOVL    R3, PTR						      ;

    0000G  CF	         56	       6E  C3 0041C 	    SUBL3   (SP), PTR, PGM_DDSC					      ; 1898

		  0000G  CF	0000G  CF  D0 00422 	    MOVL    PGM_DDSC+12, PGM_DDSC+4				      ; 1899

		         50	       69  D0 00429 	    MOVL    (MCB_PTR), R0					      ; 1901

					   04 0042C 	    RET     							      ;

				       50  D4 0042D 13$:    CLRL    R0							      ; 1754

					   04 0042F 	    RET     							      ;



; Routine Size:  267 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 22

; Digital Equipment Corporation

;

;	1903	ROUTINE  SERVER_DLG (FCT, RCV_DDSC_AD, XMT_DDSC_AD)  : LNKMSG NOVALUE =

;	1904	

;	1905	!++

;	1906	! FUNCTIONAL DESCRIPTION:

;	1907	!

;	1908	!	This routine is responsible for conducting dialogues with the

;	1909	!	server node.

;	1910	!

;	1911	! FORMAL PARAMETERS:

;	1912	!

;	1913	!	RCV_DDSC_AD  -  The address of the DDSC of the currently empty 

;	1914	!			buffer to be used for receiving server messages.

;	1915	!	XMT_DDSC_AD  -  The address of the DDSC of the currently empty 

;	1916	!			buffer to be used for sending messages to the 

;	1917	!			server.

;	1918	!	FCT	     -	Specifies the requested dialogue type :

;	1919	!

;	1920	!		NIC$K_LDGETREQ	Load the target via the server

;	1921	!				and return the request for the

;	1922	!				next program to be loaded.

;	1923	!

;	1924	!		NIC$K_LDNOREQ	Load the target via the server,

;	1925	!				do not return the pgm request.

;	1926	!

;	1927	!		NIC$K_BTGETREQ	Boot the target via the server,

;	1928	!				return the program request.

;	1929	!		

;	1930	!		NIC$K_BTNOREQ	Boot the target via the server,

;	1931	!				do not return the pgm request.

;	1932	!

;	1933	!

;	1934	! IMPLICIT INPUTS:

;	1935	!

;	1936	!	LN_DDSC		- Names the line, as known to the

;	1937	!			  server, which connects the server with

;	1938	!			  its target node.

;	1939	!	CHANNEL		- Contains the channel number for the

;	1940	!			  NICE dialogue between the server and

;	1941	!			  the host (this node).

;	1942	!

;	1943	!

;	1944	!	If the requested function is a load, then the following

;	1945	!	information is assumed.

;	1946	!

;	1947	!	SYSPAR_DDSC	- Names the target's system parameters,

;	1948	!			  e.g., the target name, target number,

;	1949	!			  target's host name.

;	1950	!	XFER_ADDR	- Contains the 32 bit transfer address 

;	1951	!			  of the program being loaded.

;	1952	!	BASE_ADDR	- Contains the 32 base address of the

;	1953	!			  prorgam being loaded.

;	1954	!	IMAGE_LB	- This process contains in its virtual

;	1955	!			  address space the complete image to be

;	1956	!			  loaded.  This is its lower bound.

;	1957	!	IMAGE_UB	- This is the upper bound.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 22-1

; Digital Equipment Corporation

;

;	1958	!

;	1959	!	If the function being requested is the a trigger target

;	1960	!	bootstrap, then the following is assumed.

;	1961	!

;	1962	!	BTPW_DDSC	- The target's boot password.

;	1963	!

;	1964	! IMPLICIT OUTPUTS:

;	1965	!

;	1966	!	If FCT calls for the the return of the program request,

;	1967	!	then routine READ_PGM_REQ is called.  Consult that

;	1968	!	routine's header for implicit output details.

;	1969	!

;	1970	! ROUTINE VALUE:

;	1971	! COMPLETION CODES:

;	1972	!

;	1973	!	NONE

;	1974	!

;	1975	! SIDE EFFECTS:

;	1976	!

;	1977	!	The error handler is assumed to be enabled.  If

;	1978	!	any errors are encountered then the error handler is

;	1979	!	called, and the calling routine is not returned to.

;	1980	!

;	1981	!	Buffers are opened and closed using routine MESSAGE, in

;	1982	!	order to allow message construction and parsing.  NO

;	1983	!	buffers are assumed to be opened on entrance to this

;	1984	!	SERVER_DLG.

;	1985	!

;	1986	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 23

; Digital Equipment Corporation

;

;	1987	BEGIN

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

;	1989	LOCAL	 IMAGE_LNG, IMAGE_PTR ;

;	1990	LOCAL	 CTL_VEC, STATUS, STATE, DLG_IN_PROGRESS ;

;	1991	BIND	 XMT_DDSC = .XMT_DDSC_AD : DDSC ;

;	1992	

;	1993	

;	1994	!+

;	1995	! Build labels for the major case statement below.

;	1996	!-

;	1997	

;	1998	LITERAL	SEND = 0,	    RCV = 1,		POST = 2,

;	1999		WAIT = 3,	    READ_REPLY = 4,	NEW_STATE = 5,

;	2000		BLD_SETBASE = 6,    BLD_SYSPAR = 7,	BLD_EOD = 8,

;	2001		BLD_MEMIMAGE = 9,   READ_EOD = 10,	DONE = 11 ;

;	2002	

;	2003	!+

;	2004	! Build the message which directs the server to either boot the

;	2005	! target, or to begin the downline load dialogue.  Start by 

;	2006	! building the common message header.

;	2007	!-

;	2008	

;	2009	MESSAGE	(OPEN_O, XMT_DDSC) ;

;	2010	INSB	(NIC$K_LNSRV) ;		    ! Insert the NICE fct code

;	2011	INSB	(SELECT  .FCT OF	    ! Insert the NICE option code

;	2012		  SET

;	2013		  [NIC$K_LDGETREQ,

;	2014		   NIC$K_LDNOREQ] :  0 ;    ! establish load dialogue

;	2015		  [NIC$K_BTGETREQ] : 3 ;    !  trigger boot - get pgm req

;	2016		  [NIC$K_BTNOREQ] :  4 ;    !  trigger boot - no pgm req

;	2017		  TES

;	2018		) ;

;	2019	INSLN	(LN_DDSC) ;		    ! Insert name of the line to the

;	2020					    ! target node.

;	2021	

;	2022	!+

;	2023	! Complete the message according to the function being requested

;	2024	! and setup the control vector for the second half of this

;	2025	! routine.

;	2026	!-

;	2027	

;	2028	SELECT  .FCT  OF

;	2029				

;	2030	    SET

;	2031	    [NIC$K_BTGETREQ,

;	2032	     NIC$K_BTNOREQ] :	! Boot the target.

;	2033		

;	2034		BEGIN

;	2035		INSSTR (BTPW_DDSC) ;		! Insert boot password

;	2036	

;	2037		CTL_VEC = UPLIT BYTE (SEND,RCV,READ_REPLY,DONE) ;

;	2038		END ;

;	2039	

;	2040	

;	2041	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 23-1

; Digital Equipment Corporation

;

;	2042	    [NIC$K_LDGETREQ,

;	2043	     NIC$K_LDNOREQ] :	! Establish downline load dialogue

;	2044		

;	2045		BEGIN

;	2046		INSB	(.PGM_TYPE) ;		! Enter type of program

;	2047	

;	2048		CTL_VEC = UPLIT BYTE (SEND,RCV,READ_REPLY,NEW_STATE) ;

;	2049		END ;

;	2050	

;	2051	

;	2052	    TES ;

;	2053	

;	2054	MESSAGE (CLOSE_O, 0) ;		! Close the output message.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 24

; Digital Equipment Corporation

;

;	2055	!+

;	2056	! Send the message to the server node and process its reply.

;	2057	!-

;	2058	   STATUS = NIC$_SUCCESS ;

;	2059	   STATE = 0 ;			! Indicates the phase of the load.

;	2060	   DLG_IN_PROGRESS = FALSE ;	! When set to true this indicates that

;	2061					! a load dialogue is in progress with

;	2062					! the server.  This dialogue does not 

;	2063					! include the initial request to the 

;	2064					! server to start the dialogue, or the 

;	2065					! server's initial reply.

;	2066	WHILE .STATUS

;	2067	DO

;	2068	    BEGIN

;	2069	    LOCAL	PTR ;

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

;	2071	      SET

;	2072	      [NEW_STATE] :

;	2073		    !+

;	2074		    ! Start the program load by sending the 'base address'

;	2075		    ! message, followed by a series of 'memory image' messages,

;	2076		    ! and concluding with an 'end of dialogue' message.

;	2077		    !

;	2078		    ! First post a receive.  If the server wishes to interrupt

;	2079		    ! the load, it may send an 'end of dialogue' message at any

;	2080		    ! time.  This condition (i.e., the completion of the posted

;	2081		    ! receive) is signalled to this routine by TLK_TO_SRV by

;	2082		    ! returning the value  NIC$_ILLMSGSEQ when the function 

;	2083		    ! SRV$_SEND is requested (in this case no message is 

;	2084		    ! actually sent).  It is then necessary to read the received

;	2085		    ! message (via SRV$_WAIT_RCV) to determine the reason for 

;	2086		    ! the interrupt and to then send an 'end of dialoque' 

;	2087		    ! message to the server.

;	2088		    !-

;	2089		    SELECTONE .STATE  OF

;	2090		      SET

;	2091		      [0] : BEGIN

;	2092			    STATE	= 1 ;

;	2093			    IMAGE_PTR	= .IMAGE_LB ;

;	2094			    CTL_VEC	= UPLIT BYTE (POST,BLD_SETBASE,SEND,NEW_STATE) ;

;	2095			    DLG_IN_PROGRESS = TRUE ;

;	2096			    END ;

;	2097	

;	2098		      [1] : BEGIN

;	2099			    IMAGE_LNG = MINU (.XMT_DDSC [BUF_LNG] - 2,

;	2100					      .IMAGE_UB-.IMAGE_PTR) ;

;	2101			    IF .IMAGE_LNG GTRU 0

;	2102			    THEN

;	2103				CTL_VEC = UPLIT BYTE (BLD_MEMIMAGE,SEND,NEW_STATE)

;	2104			    ELSE

;	2105				CTL_VEC = UPLIT BYTE (BLD_SYSPAR,SEND,WAIT,

;	2106						      BLD_EOD,SEND,READ_EOD,DONE) ;

;	2107			    END ;

;	2108		      TES ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 25

; Digital Equipment Corporation

;

;	2109	      [BLD_SETBASE] :	! Build the 'set base address' message

;	2110	

;	2111		    BEGIN

;	2112		    PTR = CH$PTR (.XMT_DDSC [BUF_PTR]) ;

;	2113		    XMT_DDSC [STR_PTR] = .PTR ;

;	2114		    CH$WCHAR_A (NIC$K_SETBASE, PTR) ;

;	2115		    PTR = CH$MOVE (4, BASE_ADDR, .PTR) ;

;	2116		    XMT_DDSC [STR_LNG] = .PTR - .XMT_DDSC [STR_PTR] ;

;	2117		    END ;

;	2118	

;	2119	

;	2120	      [BLD_MEMIMAGE] :	! Build the 'memory image' message

;	2121	

;	2122		    BEGIN

;	2123		    PTR = CH$PTR (.XMT_DDSC [BUF_PTR]) ;

;	2124		    XMT_DDSC [STR_PTR] = .PTR ;

;	2125		    CH$WCHAR_A	  (NIC$K_MEMIMAGE, PTR) ;

;	2126		    CH$WCHAR_A	  (.CPU_TYPE, PTR) ;

;	2127		    PTR = CH$MOVE (.IMAGE_LNG, .IMAGE_PTR, .PTR) ;

;	2128		    XMT_DDSC [STR_LNG] = .PTR - .XMT_DDSC [STR_PTR] ;

;	2129		    IMAGE_PTR = .IMAGE_PTR + .IMAGE_LNG ;

;	2130		    END ;

;	2131	

;	2132	

;	2133	      [BLD_SYSPAR] :	! Build the 'system parameter and 

;	2134				! transfer address' message.

;	2135		    BEGIN

;	2136		    PTR = CH$PTR (.XMT_DDSC [BUF_PTR]) ;

;	2137		    XMT_DDSC [STR_PTR] = .PTR ;

;	2138		    CH$WCHAR_A (NIC$K_SYSPAR, PTR) ;

;	2139		    PTR = CH$MOVE (.SYSPAR_DDSC [STR_LNG],

;	2140				   .SYSPAR_DDSC [STR_PTR],

;	2141				   .PTR

;	2142				  ) ;

;	2143		    PTR = CH$MOVE (4, XFER_ADDR, .PTR) ;

;	2144		    XMT_DDSC [STR_LNG] = .PTR - .XMT_DDSC [STR_PTR] ;

;	2145		    END ;

;	2146	

;	2147	

;	2148	      [BLD_EOD] :	! Build the 'end of dialoque' message

;	2149	

;	2150		    BEGIN

;	2151		    PTR = CH$PTR (.XMT_DDSC [BUF_PTR]) ;

;	2152		    XMT_DDSC [STR_PTR] = .PTR ;

;	2153		    CH$WCHAR_A (NIC$K_EOD, PTR) ;

;	2154		    CH$WCHAR_A (NIC$_SUCCESS, PTR) ;

;	2155		    XMT_DDSC [STR_LNG] = .PTR - .XMT_DDSC [STR_PTR] ;

;	2156		    END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 26

; Digital Equipment Corporation

;

;	2157		[SEND] :	! Send the message to the server

;	2158	

;	2159		    BEGIN

;	2160		    STATUS = TLK_TO_SRV (SRV$_SEND, .XMT_DDSC_AD) ;

;	2161		    !+

;	2162		    ! If the response was NIC$_ILLMSGSEQ then the message was

;	2163		    ! not sent because the receive posted earlier has arrived.

;	2164		    ! Finish the housekeeping on this receive by issuing a

;	2165		    ! SRV$_WAIT, then build and send an 'end of dialogue'

;	2166		    ! message, and finally process the received message.  All

;	2167		    ! this is done by resetting the control vector.

;	2168		    !-

;	2169		    IF  .STATUS EQL NIC$_ILLMSGSEQ

;	2170		    THEN

;	2171			IF  .DLG_IN_PROGRESS

;	2172			THEN

;	2173			    BEGIN

;	2174			    CTL_VEC = UPLIT BYTE (WAIT,BLD_EOD,SEND,READ_EOD,DONE) ;

;	2175			    STATUS = NIC$_SUCCESS ;	! Continue

;	2176			    END ;

;	2177		    END ;

;	2178	

;	2179	

;	2180	

;	2181	      [POST] :	! Post a receive

;	2182	

;	2183		    STATUS = TLK_TO_SRV (SRV$_POST_RCV, .RCV_DDSC_AD) ;

;	2184	

;	2185	

;	2186	

;	2187	      [WAIT] :	! Wait for the posted receive to complete

;	2188	

;	2189		    STATUS = TLK_TO_SRV (SRV$_WAIT_RCV, 0) ;

;	2190	

;	2191	

;	2192	

;	2193	      [RCV] :	! Issue a receive and wait for reply.

;	2194	

;	2195		    STATUS = TLK_TO_SRV (SRV$_RCV, .RCV_DDSC_AD) ;

;	2196	

;	2197	

;	2198	

;	2199	      [READ_REPLY] :	! Read the initial reply message

;	2200				! Remember -- the error handler is enabled

;	2201		    BEGIN

;	2202		    LOCAL	TMP : SIGNED BYTE ;

;	2203		    MESSAGE (OPEN_I, .RCV_DDSC_AD) ;

;	2204		    EXTB (TMP) ;			! Get NICE status code

;	2205		    IF  .TMP EQL NIC$_SUCCESS

;	2206		    THEN

;	2207			BEGIN

;	2208			IF  .FCT EQL NIC$K_BTGETREQ	! Expect pgm request ?

;	2209			THEN

;	2210			    READ_PGM_REQ () ;

;	2211			MESSAGE (CHECK_I, 0) ;		! Check for end of msg



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 26-1

; Digital Equipment Corporation

;

;	2212			END

;	2213		    ELSE

;	2214			!+

;	2215			! All NICE failure codes are stored internal to this 

;	2216			! program as double their NICE protocol values so that

;	2217			! their low bit can be used for true/false testing.

;	2218			! Therefore, double the error code just received.

;	2219			!-

;	2220			    STATUS = .TMP * 2 ;

;	2221		    END ;

;	2222	

;	2223	

;	2224	

;	2225	      [READ_EOD] :	! Read the reply following the dialogue

;	2226				! Remember -- the error handler is enabled

;	2227		    BEGIN

;	2228		    LOCAL    TMP : SIGNED BYTE ;

;	2229		    MESSAGE (OPEN_I, .RCV_DDSC_AD) ;

;	2230		    EXTB (TMP) ;			! dialoque message

;	2231							! type

;	2232		    IF .TMP NEQ NIC$K_EOD		! End of data msg expected

;	2233		    THEN

;	2234			STATUS = NIC$_ILLMSGSEQ

;	2235		    ELSE

;	2236			BEGIN

;	2237			EXTB (TMP) ;			! NICE return code

;	2238			IF  .TMP EQL NIC$_SUCCESS

;	2239			THEN

;	2240			    BEGIN

;	2241			    IF .FCT EQL NIC$K_LDGETREQ	! Expect program request ?

;	2242			    THEN

;	2243				READ_PGM_REQ () ;

;	2244			    MESSAGE (CHECK_I, 0) ;	! Check for end of msg

;	2245			    END

;	2246			ELSE

;	2247			    !+

;	2248			    ! All NICE error codes (not NIC$_SUCCESS) are stored

;	2249			    ! internally as double their NICE protocol value so

;	2250			    ! that they can be used for true/false testing.  

;	2251			    ! Therefore double this error code.

;	2252			    !-

;	2253				STATUS = .TMP * 2 ;

;	2254			END ;

;	2255		    END ;

;	2256	

;	2257	

;	2258	      [DONE] :	EXITLOOP ;

;	2259	

;	2260	      TES ;

;	2261	    END ;

;	2262	

;	2263	IF NOT .STATUS

;	2264	THEN

;	2265	    BEGIN

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



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 26-2

; Digital Equipment Corporation

;

;	2267	    (.MCB_PTR[MCB$A_EXIT_RT]) () ;

;	2268	    END ;

;	2269	

;	2270	END ;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      0002C P.AAI:  .BYTE   0, 1, 4, 11						      ;

					      00030 P.AAJ:  .BYTE   0, 1, 4, 5						      ;

					      00034 P.AAK:  .BYTE   2, 6, 0, 5						      ;

					      00038 P.AAL:  .BYTE   9, 0, 5						      ;

					      0003B	    .BLKB   1

					      0003C P.AAM:  .BYTE   7, 0, 3, 8, 0, 10, 11				      ;

					      00043	    .BLKB   1

					      00044 P.AAN:  .BYTE   3, 8, 0, 10, 11					      ;

					      00049	    .BLKB   3







							    .PSECT  $CODE$,NOWRT,2



					 01FC 00430 SERVER_DLG:

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

		         5E	       20  C2 00432 	    SUBL2   #32, SP						      ;

		         56	  0C   AC  D0 00435 	    MOVL    XMT_DDSC_AD, R6					      ; 1987

				       56  DD 00439 	    PUSHL   R6							      ; 2009

				       05  DD 0043B 	    PUSHL   #5							      ;

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

				       0E  DD 00442 	    PUSHL   #14							      ; 2010

		  0000G  CF	       01  FB 00444 	    CALLS   #1, INSB						      ;

		         6E	  04   AC  D0 00449 	    MOVL    FCT, (SP)						      ; 2011

		         50	       01  CE 0044D 	    MNEGL   #1, R0						      ;

				       6E  D5 00450 	    TSTL    (SP)						      ;

				       07  19 00452 	    BLSS    1$							      ;

		         01	       6E  D1 00454 	    CMPL    (SP), #1						      ;

				       02  14 00457 	    BGTR    1$							      ;

				       50  D4 00459 	    CLRL    R0							      ;

		         02	       6E  D1 0045B 1$:     CMPL    (SP), #2						      ;

				       03  12 0045E 	    BNEQ    2$							      ;

		         50	       03  D0 00460 	    MOVL    #3, R0						      ;

		         03	       6E  D1 00463 2$:     CMPL    (SP), #3						      ;

				       03  12 00466 	    BNEQ    3$							      ;

		         50	       04  D0 00468 	    MOVL    #4, R0						      ;

				       50  DD 0046B 3$:     PUSHL   R0							      ;

		  0000G  CF	       01  FB 0046D 	    CALLS   #1, INSB						      ;

				0000G  CF  9F 00472 	    PUSHAB  LN_DDSC						      ; 2019

		  0000G  CF	       01  FB 00476 	    CALLS   #1, INSLN						      ;

		         02	       6E  D1 0047B 	    CMPL    (SP), #2						      ; 2028

				       14  19 0047E 	    BLSS    4$							      ;

		         03	       6E  D1 00480 	    CMPL    (SP), #3						      ;

				       0F  14 00483 	    BGTR    4$							      ;

				0000G  CF  9F 00485 	    PUSHAB  BTPW_DDSC						      ; 2035

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



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 26-3

; Digital Equipment Corporation

;

		    14   AE	0000'  CF  9E 0048E 	    MOVAB   P.AAI, CTL_VEC					      ; 2037

				       6E  D5 00494 4$:     TSTL    (SP)						      ; 2028

				       15  19 00496 	    BLSS    5$							      ;

		         01	       6E  D1 00498 	    CMPL    (SP), #1						      ;

				       10  14 0049B 	    BGTR    5$							      ;

		         7E	0000G  CF  9A 0049D 	    MOVZBL  PGM_TYPE, -(SP)					      ; 2046

		  0000G  CF	       01  FB 004A2 	    CALLS   #1, INSB						      ;

		    14   AE	0000'  CF  9E 004A7 	    MOVAB   P.AAJ, CTL_VEC					      ; 2048

		         7E	       06  7D 004AD 5$:     MOVQ    #6, -(SP)						      ; 2054

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

		         58	       01  D0 004B5 	    MOVL    #1, STATUS						      ; 2058

				  0C   AE  7C 004B8 	    CLRQ    DLG_IN_PROGRESS					      ; 2060

		         03	       58  E8 004BB 6$:     BLBS    STATUS, 7$						      ; 2066

				     018B  31 004BE 	    BRW     37$							      ;

		         50	  14   BE  9A 004C1 7$:     MOVZBL  @CTL_VEC, R0					      ; 2070

				  14   AE  D6 004C5 	    INCL    CTL_VEC						      ;

	   0B	         00	       50  CF 004C8 	    CASEL   R0, #0, #11						      ;

	 00F8	       0104	     00D3     004CC 8$:     .WORD   19$-8$,-						      ;

	 0018	       0113	     00FF     004D2		    22$-8$,-						      ;

	 00BF	       009E	     0066     004D8		    20$-8$,-						      ;

	 017D	       0136	     0079     004DE		    21$-8$,-						      ;

								    25$-8$,-						      ;

								    9$-8$,-						      ;

								    13$-8$,-						      ;

								    15$-8$,-						      ;

								    17$-8$,-						      ;

								    14$-8$,-						      ;

								    27$-8$,-						      ;

								    36$-8$						      ;

				  10   AE  D5 004E4 9$:     TSTL    STATE						      ; 2089

				       16  12 004E7 	    BNEQ    10$							      ;

		    10   AE	       01  D0 004E9 	    MOVL    #1, STATE						      ; 2092

		    08   AE	0000G  CF  D0 004ED 	    MOVL    IMAGE_LB, IMAGE_PTR					      ; 2093

		    14   AE	0000'  CF  9E 004F3 	    MOVAB   P.AAK, CTL_VEC					      ; 2094

		    0C   AE	       01  D0 004F9 	    MOVL    #1, DLG_IN_PROGRESS					      ; 2095

				       BC  11 004FD 	    BRB     6$							      ; 2089

		         01	  10   AE  D1 004FF 10$:    CMPL    STATE, #1						      ;

				       B6  12 00503 	    BNEQ    6$							      ;

	   51	    08   A6	       02  C3 00505 	    SUBL3   #2, 8(R6), R1					      ; 2099

	   50	  0000G  CF	  08   AE  C3 0050A 	    SUBL3   IMAGE_PTR, IMAGE_UB, R0				      ; 2100

		         50	       51  D1 00511 	    CMPL    R1, R0						      ; 2099

				       03  1B 00514 	    BLEQU   11$							      ;

		         51	       50  D0 00516 	    MOVL    R0, R1						      ;

		    04   AE	       51  D0 00519 11$:    MOVL    R1, IMAGE_LNG					      ;

				  04   AE  D5 0051D 	    TSTL    IMAGE_LNG						      ; 2101

				       08  1B 00520 	    BLEQU   12$							      ;

		    14   AE	0000'  CF  9E 00522 	    MOVAB   P.AAL, CTL_VEC					      ; 2103

				       91  11 00528 	    BRB     6$							      ; 2101

		    14   AE	0000'  CF  9E 0052A 12$:    MOVAB   P.AAM, CTL_VEC					      ; 2105

				       89  11 00530 	    BRB     6$							      ; 2089

		         57	  0C   A6  D0 00532 13$:    MOVL    12(R6), PTR						      ; 2112

		    04   A6	       57  D0 00536 	    MOVL    PTR, 4(R6)						      ; 2113

		         87	       01  90 0053A 	    MOVB    #1, (PTR)+						      ; 2114

	   67	  0000G  CF	       04  28 0053D 	    MOVC3   #4, BASE_ADDR, (PTR)				      ; 2115

				       41  11 00543 	    BRB     16$							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 26-4

; Digital Equipment Corporation

;

		         57	  0C   A6  D0 00545 14$:    MOVL    12(R6), PTR						      ; 2123

		    04   A6	       57  D0 00549 	    MOVL    PTR, 4(R6)						      ; 2124

		         87	       02  90 0054D 	    MOVB    #2, (PTR)+						      ; 2125

		         87	0000G  CF  90 00550 	    MOVB    CPU_TYPE, (PTR)+					      ; 2126

	   67	    08   BE	  04   AE  28 00555 	    MOVC3   IMAGE_LNG, @IMAGE_PTR, (PTR)			      ; 2127

		         57	       53  D0 0055B 	    MOVL    R3, PTR						      ;

	   66	         57	  04   A6  C3 0055E 	    SUBL3   4(R6), PTR, (R6)					      ; 2128

		    08   AE	  04   AE  C0 00563 	    ADDL2   IMAGE_LNG, IMAGE_PTR				      ; 2129

				       73  11 00568 	    BRB     24$							      ; 2070

		         57	  0C   A6  D0 0056A 15$:    MOVL    12(R6), PTR						      ; 2136

		    04   A6	       57  D0 0056E 	    MOVL    PTR, 4(R6)						      ; 2137

		         87	       03  90 00572 	    MOVB    #3, (PTR)+						      ; 2138

	   67	  0000G  DF	0000G  CF  28 00575 	    MOVC3   SYSPAR_DDSC, @SYSPAR_DDSC+4, (PTR)			      ; 2139

		         57	       53  D0 0057D 	    MOVL    R3, PTR						      ;

	   67	  0000G  CF	       04  28 00580 	    MOVC3   #4, XFER_ADDR, (PTR)				      ; 2143

		         57	       53  D0 00586 16$:    MOVL    R3, PTR						      ;

				       0D  11 00589 	    BRB     18$							      ; 2144

		         57	  0C   A6  D0 0058B 17$:    MOVL    12(R6), PTR						      ; 2151

		    04   A6	       57  D0 0058F 	    MOVL    PTR, 4(R6)						      ; 2152

		         87	0100   8F  B0 00593 	    MOVW    #256, (PTR)+					      ; 2153

	   66	         57	  04   A6  C3 00598 18$:    SUBL3   4(R6), PTR, (R6)					      ; 2155

				       7D  11 0059D 	    BRB     28$							      ; 2070

				  0C   AC  DD 0059F 19$:    PUSHL   XMT_DDSC_AD						      ; 2160

				       03  DD 005A2 	    PUSHL   #3							      ;

		  0000V  CF	       02  FB 005A4 	    CALLS   #2, TLK_TO_SRV					      ;

		         58	       50  D0 005A9 	    MOVL    R0, STATUS						      ;

	      FFFFFFF8   8F	       58  D1 005AC 	    CMPL    STATUS, #-8						      ; 2169

				       67  12 005B3 	    BNEQ    28$							      ;

		         63	  0C   AE  E9 005B5 	    BLBC    DLG_IN_PROGRESS, 28$				      ; 2171

		    14   AE	0000'  CF  9E 005B9 	    MOVAB   P.AAN, CTL_VEC					      ; 2174

		         58	       01  D0 005BF 	    MOVL    #1, STATUS						      ; 2175

				       79  11 005C2 	    BRB     32$							      ; 2070

				  08   AC  DD 005C4 20$:    PUSHL   RCV_DDSC_AD						      ; 2183

				       7E  D4 005C7 	    CLRL    -(SP)						      ;

				       0A  11 005C9 	    BRB     23$							      ;

		         7E	       01  7D 005CB 21$:    MOVQ    #1, -(SP)						      ; 2189

				       05  11 005CE 	    BRB     23$							      ;

				  08   AC  DD 005D0 22$:    PUSHL   RCV_DDSC_AD						      ; 2195

				       02  DD 005D3 	    PUSHL   #2							      ;

		  0000V  CF	       02  FB 005D5 23$:    CALLS   #2, TLK_TO_SRV					      ;

		         58	       50  D0 005DA 	    MOVL    R0, STATUS						      ;

				       67  11 005DD 24$:    BRB     35$							      ; 2070

				  08   AC  DD 005DF 25$:    PUSHL   RCV_DDSC_AD						      ; 2203

				       01  DD 005E2 	    PUSHL   #1							      ;

		  0000G  CF	       02  FB 005E4 	    CALLS   #2, MESSAGE						      ;

				  1C   AE  9F 005E9 	    PUSHAB  TMP							      ; 2204

		  0000G  CF	       01  FB 005EC 	    CALLS   #1, EXTB						      ;

		         01	  1C   AE  91 005F1 	    CMPB    TMP, #1						      ; 2205

				       05  12 005F5 	    BNEQ    26$							      ;

		         02	       6E  D1 005F7 	    CMPL    (SP), #2						      ; 2208

				       32  11 005FA 	    BRB     30$							      ;

		         58	  1C   AE  98 005FC 26$:    CVTBL   TMP, STATUS						      ; 2220

				       41  11 00600 	    BRB     34$							      ;

				  08   AC  DD 00602 27$:    PUSHL   RCV_DDSC_AD						      ; 2229

				       01  DD 00605 	    PUSHL   #1							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 26-5

; Digital Equipment Corporation

;

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

				  18   AE  9F 0060C 	    PUSHAB  TMP							      ; 2230

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

				  18   AE  95 00614 	    TSTB    TMP							      ; 2232

				       05  13 00617 	    BEQL    29$							      ;

		         58	       08  CE 00619 	    MNEGL   #8, STATUS						      ; 2234

				       28  11 0061C 28$:    BRB     35$							      ; 2232

				  18   AE  9F 0061E 29$:    PUSHAB  TMP							      ; 2237

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

		         01	  18   AE  91 00626 	    CMPB    TMP, #1						      ; 2238

				       13  12 0062A 	    BNEQ    33$							      ;

				       6E  D5 0062C 	    TSTL    (SP)						      ; 2241

				       05  12 0062E 30$:    BNEQ    31$							      ;

		  FCF0   CF	       00  FB 00630 	    CALLS   #0, READ_PGM_REQ					      ; 2243

		         7E	       03  7D 00635 31$:    MOVQ    #3, -(SP)						      ; 2244

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

				       07  11 0063D 32$:    BRB     35$							      ; 2238

		         58	  18   AE  98 0063F 33$:    CVTBL   TMP, STATUS						      ; 2253

		         58	       02  C4 00643 34$:    MULL2   #2, STATUS						      ;

				     FE72  31 00646 35$:    BRW     6$							      ; 2070

		         07	       58  E8 00649 36$:    BLBS    STATUS, 38$						      ; 2263

		         69	       58  D0 0064C 37$:    MOVL    STATUS, (MCB_PTR)					      ; 2266

		    04   B9	       00  FB 0064F 	    CALLS   #0, @4(MCB_PTR)					      ; 2267

					   04 00653 38$:    RET     							      ; 1903



; Routine Size:  548 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 27

; Digital Equipment Corporation

;

;	2271	GLOBAL ROUTINE  CTL_VADDR (FCT) : =

;	2272	

;	2273	!++

;	2274	! FUNCTIONAL DESCRIPTION:

;	2275	!

;	2276	!	This routine maps the file to be downline loaded

;	2277	!	into the process virtual address space.

;	2278	!

;	2279	! FORMAL PARAMETERS:

;	2280	!

;	2281	!	FCT		- Indicates operation to be performed

;	2282	!		

;	2283	!			VA$_FETCH	- If a file is mapped into the

;	2284	!					  end of the virtual address

;	2285	!					  space then close it.

;	2286	!					  Open the new file and map it

;	2287	!					  into the process virtual

;	2288	!					  address space.

;	2289	!

;	2290	!			VA$_DELETE	- If a file is currently mapped

;	2291	!					  into the end of the virtual

;	2292	!					  address space then close the

;	2293	!					  file and shrink the virtual

;	2294	!					  address space.

;	2295	!

;	2296	! IMPLICIT INPUTS:

;	2297	!

;	2298	!	PGM_DDSC	- Describes the filename to be mapped.

;	2299	!

;	2300	!	FAB		- The File Access Block used by RMS

;	2301	!

;	2302	!	EXP_ADDR	_ The virtual address of the NICE

;	2303	!			  process prior to the file mapping.

;	2304	!

;	2305	!	FILE_MAPPED	- A flag which indicates whether or not

;	2306	!			  a file is currently mapped.

;	2307	!

;	2308	!	FILE_VADDR_Q	- A quadword which stores the begining

;	2309	!			  and ending virtual addresses of the 

;	2310	!			  mapped file.

;	2311	! IMPLICIT OUTPUTS:

;	2312	!

;	2313	!	IMAGE_LB	- Points to the first byte in the image.

;	2314	!

;	2315	!	IMAGE_UB	- Points to the first byte following the

;	2316	!			  image.

;	2317	!

;	2318	!	BASE_ADDR	- Holds the runtime image base address.

;	2319	!

;	2320	!	XFER_ADDR	- Holds the image's transfer address.

;	2321	!

;	2322	! ROUTINE VALUE:

;	2323	! COMPLETION CODES:

;	2324	!

;	2325	!	The status returned by $OPEN or $CRMPSC.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 27-1

; Digital Equipment Corporation

;

;	2326	!

;	2327	! SIDE EFFECTS:

;	2328	!

;	2329	!	NONE

;	2330	!

;	2331	!--

;	2332	



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 28

; Digital Equipment Corporation

;

;	2333	BEGIN

;	2334	LOCAL	STATUS ;

;	2335	OWN	FILE_BUF : BLOCK [11+18,BYTE] ;

;	2336	

;	2337	OWN	FILE_MAPPED,

;	2338		FILEFAB		: $FAB (FAC = GET,  FOP = UFO),

;	2339		EXP_VADDR_Q	: VECTOR [2,LONG] ;

;	2340	

;	2341	!+

;	2342	! If a file is currently mapped, then close it and release

;	2343	! its virtual address space.

;	2344	!-

;	2345	

;	2346	IF .FILE_MAPPED

;	2347	THEN

;	2348	    BEGIN

;	2349	    $CLOSE (FAB   = FILEFAB) ;

;	2350	    $DELTVA (INADR = FILE_VADDR_Q) ;

;	2351	    FILE_MAPPED = FALSE ;

;	2352	    END ;

;	2353	

;	2354	!+

;	2355	! If requested, map the new file into the end of the virtual address

;	2356	! space.

;	2357	!-

;	2358	

;	2359	IF .FCT EQL VA$_FETCH

;	2360	THEN

;	2361	    BEGIN

;	2362	    LOCAL  TMP ;

;	2363	

;	2364	    !+

;	2365	    ! Modify the FAB to describe the file about to be opened.

;	2366	    !-

;	2367	

;	2368	    TMP = CH$MOVE (11, UPLIT BYTE('SYS$SYSTEM:'), FILE_BUF) ;

;	2369	    TMP = CH$MOVE (.PGM_DDSC [STR_LNG], .PGM_DDSC [STR_PTR], .TMP) ;

;	2370	

;	2371	    FILEFAB [FAB$L_FNA] = FILE_BUF ;

;	2372	    FILEFAB [FAB$B_FNS] = .TMP - FILE_BUF ;

;	2373	 

;	2374	

;	2375	    !+

;	2376	    ! Now open the file and map it into the end of the process' virtual

;	2377	    ! address space.  NIC$K_MAXFILE is the size in bytes of the maximum

;	2378	    ! allowable sized file to be loaded.

;	2379	    !-

;	2380	

;	2381	    EXP_VADDR_Q [0] = .EXP_ADDR ;

;	2382	    EXP_VADDR_Q [1] = .EXP_ADDR + NIC$K_MAXFILE ;

;	2383	

;	2384	    IF (STATUS = $OPEN (FAB = FILEFAB))

;	2385	    THEN

;	2386		IF (STATUS = $CRMPSC (INADR  = EXP_VADDR_Q,

;     P 2387				      RETADR = FILE_VADDR_Q,



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 28-1

; Digital Equipment Corporation

;

;     P 2388				      CHAN   = .FILEFAB [FAB$L_STV],

;     P 2389				      PAGCNT = 0

;     P 2390				     )

;	2391		  )

;	2392		THEN

;	2393		    BEGIN

;	2394		    BIND	PTR = .FILE_VADDR_Q [0] : VECTOR [1024,WORD] ;

;	2395		    FILE_MAPPED = TRUE ;

;	2396		    BASE_ADDR   = .PTR [L$BSA/2] ;  	! L$BSA is byte offset

;	2397							!  to base address

;	2398		    XFER_ADDR   = .PTR [L$BXFR/2] ;	! L$BXFR is byte offset

;	2399							!  to transfer address

;	2400		    IMAGE_LB    = .FILE_VADDR_Q [0] +	  ! Image starts after 

;	2401		    	          .PTR [L$BBLK/2] * 512 ; !  label blocks

;	2402		    IMAGE_UB    = .FILE_VADDR_Q [1] ;

;	2403		    END ;

;	2404	    END ;

;	2405	

;	2406	RETURN (.STATUS) ;

;	2407	END ;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      0004C P.AAO:  .ASCII  \SYS$SYSTEM:\					      ;

					      00057	    .BLKB   1



							    .PSECT  $OWN$,NOEXE,2



					      00004 FILE_BUF:

							    .BLKB   29

					      00021	    .BLKB   3

					      00024 FILE_MAPPED:

							    .BLKB   4

					      00028 FILEFAB:.BYTE   3							      ;

					      00029 	    .BYTE   80							      ;

					      0002A 	    .WORD   0							      ;

					      0002C 	    .LONG   131072						      ;

					      00030 	    .LONG   0							      ;

					      00034 	    .LONG   0							      ;

					      00038 	    .LONG   0							      ;

					      0003C 	    .WORD   0							      ;

					      0003E 	    .BYTE   2							      ;

					      0003F 	    .BYTE   0							      ;

					      00040 	    .LONG   0							      ;

					      00044 	    .BYTE   0							      ;

					      00045 	    .BYTE   0							      ;

					      00046 	    .BYTE   0							      ;

					      00047 	    .BYTE   2							      ;

					      00048 	    .LONG   0							      ;

					      0004C 	    .LONG   0							      ;

					      00050 	    .LONG   0							      ;

					      00054 	    .LONG   0							      ;

					      00058 	    .LONG   0							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 28-2

; Digital Equipment Corporation

;

					      0005C 	    .BYTE   0							      ;

					      0005D 	    .BYTE   0							      ;

					      0005E 	    .WORD   0							      ;

					      00060 	    .LONG   0							      ;

					      00064 	    .WORD   0							      ;

					      00066 	    .BYTE   0							      ;

					      00067 	    .BYTE   0							      ;

					      00068 	    .LONG   0							      ;

					      0006C 	    .LONG   0							      ;

					      00070 	    .LONG   0, 0						      ;

					      00078 EXP_VADDR_Q:

							    .BLKB   8



							    .GLOBL  SYS$CLOSE, SYS$DELTVA, SYS$OPEN, SYS$CRMPSC



							    .PSECT  $CODE$,NOWRT,2



					 0C7C 00654 	    .ENTRY  CTL_VADDR, Save R2,R3,R4,R5,R6,R10,R11		      ; 2271

		         5A	0000G  CF  9E 00656 	    MOVAB   FILE_VADDR_Q, R10					      ;

		         5B	0000'  CF  9E 0065B 	    MOVAB   FILE_MAPPED, R11					      ;

		         17	       6B  E9 00660 	    BLBC    FILE_MAPPED, 1$					      ; 2346

				  04   AB  9F 00663 	    PUSHAB  FILEFAB						      ; 2349

	      00000000G  9F	       01  FB 00666 	    CALLS   #1, @#SYS$CLOSE					      ;

				       7E  7C 0066D 	    CLRQ    -(SP)						      ; 2350

				       5A  DD 0066F 	    PUSHL   R10							      ;

	      00000000G  9F	       03  FB 00671 	    CALLS   #3, @#SYS$DELTVA					      ;

				       6B  D4 00678 	    CLRL    FILE_MAPPED						      ; 2351

				  04   AC  D5 0067A 1$:     TSTL    FCT							      ; 2359

				       03  13 0067D 	    BEQL    2$							      ;

				     008B  31 0067F 	    BRW     3$							      ;

      E0   AB	  0000'  CF	       0B  28 00682 2$:     MOVC3   #11, P.AAO, FILE_BUF				      ; 2368

		         56	       53  D0 00689 	    MOVL    R3, TMP						      ;

	   66	  0000G  DF	0000G  CF  28 0068C 	    MOVC3   PGM_DDSC, @PGM_DDSC+4, (TMP)			      ; 2369

		         56	       53  D0 00694 	    MOVL    R3, TMP						      ;

		    30   AB	  E0   AB  9E 00697 	    MOVAB   FILE_BUF, FILEFAB+44				      ; 2371

		         50	  E0   AB  9E 0069C 	    MOVAB   FILE_BUF, R0					      ; 2372

      38   AB	         56	       50  83 006A0 	    SUBB3   R0, TMP, FILEFAB+52					      ;

		    54   AB	0000G  CF  D0 006A5 	    MOVL    EXP_ADDR, EXP_VADDR_Q				      ; 2381

      58   AB	  0000G  CF 00401000   8F  C1 006AB 	    ADDL3   #4198400, EXP_ADDR, EXP_VADDR_Q+4			      ; 2382

				  04   AB  9F 006B6 	    PUSHAB  FILEFAB						      ; 2384

	      00000000G  9F	       01  FB 006B9 	    CALLS   #1, @#SYS$OPEN					      ;

		         52	       50  D0 006C0 	    MOVL    R0, STATUS						      ;

		         47	       52  E9 006C3 	    BLBC    STATUS, 3$						      ;

				       7E  7C 006C6 	    CLRQ    -(SP)						      ; 2390

				       7E  7C 006C8 	    CLRQ    -(SP)						      ;

				  10   AB  DD 006CA 	    PUSHL   FILEFAB+12						      ;

				       7E  7C 006CD 	    CLRQ    -(SP)						      ;

				       7E  7C 006CF 	    CLRQ    -(SP)						      ;

				       7E  D4 006D1 	    CLRL    -(SP)						      ;

				       5A  DD 006D3 	    PUSHL   R10							      ;

				  54   AB  9F 006D5 	    PUSHAB  EXP_VADDR_Q						      ;

	      00000000G  9F	       0C  FB 006D8 	    CALLS   #12, @#SYS$CRMPSC					      ;

		         52	       50  D0 006DF 	    MOVL    R0, STATUS						      ;

		         28	       52  E9 006E2 	    BLBC    STATUS, 3$						      ; 2386

		         50	       6A  D0 006E5 	    MOVL    FILE_VADDR_Q, R0					      ; 2393



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 28-3

; Digital Equipment Corporation

;

		         6B	       01  D0 006E8 	    MOVL    #1, FILE_MAPPED					      ; 2395

		  0000G  CF	  08   A0  3C 006EB 	    MOVZWL  8(R0), BASE_ADDR					      ; 2396

		  0000G  CF	00E8   C0  3C 006F1 	    MOVZWL  232(R0), XFER_ADDR					      ; 2398

		         50	00F0   C0  3C 006F8 	    MOVZWL  240(R0), R0						      ; 2401

	   50	         50	       09  78 006FD 	    ASHL    #9, R0, R0						      ; 0000

    0000G  CF	         50	       6A  C1 00701 	    ADDL3   FILE_VADDR_Q, R0, IMAGE_LB				      ; 2400

		  0000G  CF	  04   AA  D0 00707 	    MOVL    FILE_VADDR_Q+4, IMAGE_UB				      ; 2402

		         50	       52  D0 0070D 3$:     MOVL    STATUS, R0						      ; 2406

					   04 00710 	    RET     							      ; 2271



; Routine Size:  189 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 29

; Digital Equipment Corporation

;

;	2408	GLOBAL ROUTINE TLK_TO_SRV (FCT, IO_DDSC_AD) : =

;	2409	

;	2410	!++

;	2411	! FUNCTIONAL DESCRIPTION:

;	2412	!

;	2413	!	This routine controls all I/O activities with the server node.

;	2414	!	It is totally insensitive to the contents of the messages it

;	2415	!	sends or receives.

;	2416	!

;	2417	! FORMAL PARAMETERS:

;	2418	!

;	2419	!	FCT	  - Indicating the requested function as follows :

;	2420	!

;	2421	!		    SRV$_SEND	    Transmit the specified buffer

;	2422	!		    SRV$_RCV	    Issue receive, wait for completion.

;	2423	!		    SRV$_POST_RCV   Issue receive, don't wait for completion.

;	2424	!		    SRV$_WAIT_RCV   Wait for earlier POST_RCV completion.

;	2425	!		    SRV$_CANCELIO   Cancel any I/O which may be pending.

;	2426	!

;	2427	!	IO_DDSC_AD  - The address of a double descriptor of the

;	2428	!		      buffer to be used for functions SRV$_SEND,

;	2429	!		      SRV$_RCV, SRV$_POST_RCV.  The remaining functions

;	2430	!		      ignore this parameter.

;	2431	! IMPLICIT INPUTS:

;	2432	!

;	2433	!	CHANNEL is assumed to contain a valid I/O channel to the server.

;	2434	!

;	2435	! IMPLICIT OUTPUTS:

;	2436	!

;	2437	!	NONE

;	2438	!

;	2439	! ROUTINE VALUE:

;	2440	! COMPLETION CODES:

;	2441	!

;	2442	!	NIC$_SUCCESS	if the operation was successful.

;	2443	!	NIC$_PGM_ERR	if the specified function conflicts with

;	2444	!			any earlier function (a SRV$_WAIT_RCV without

;	2445	!			a pending SRV$_POST_RCV, a SRV$_RCV with a

;	2446	!			SRV$_POST_RCV pending, etc.) or was not a 

;	2447	!			valid functjon code.

;	2448	!	NIC$_NETCOMERR	if the I/O failed.

;	2449	!	NIC$_ILLMSGSEQ	if a posted receive has completed and the value

;	2450	!			of FCT is SRV$_SEND.  The receive completing

;	2451	!			prematurely is a interrupt signal from the

;	2452	!			server node that something has gone wrong.  It 

;	2453	!			is the responsiblitly of a higher level routine

;	2454	!			to determine the nature of this interrupt by 

;	2455	!			issuing a SRV$_WAIT_RCV and then reading the 

;	2456	!			received message.

;	2457	! SIDE EFFECTS:

;	2458	!

;	2459	!	NONE

;	2460	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 30

; Digital Equipment Corporation

;

;	2461	BEGIN

;	2462	LOCAL	STATUS, CTL_VEC, TMP ;

;	2463	BIND	IO_DDSC = .IO_DDSC_AD : DDSC ;

;	2464	OWN	RCVDDSC_AD	: DDSC,

;	2465		RCV_IOSB	: IO_SB,

;	2466		XMT_IOSB	: IO_SB ;

;	2467	

;	2468	CASE .FCT FROM 0 TO SRV$_MAX_FCT OF

;	2469	  SET

;	2470	  [SRV$_SEND] :	    CTL_VEC = UPLIT BYTE (1,2,3,0) ;

;	2471	  [SRV$_POST_RCV] : CTL_VEC = UPLIT BYTE (4,0) ;

;	2472	  [SRV$_WAIT_RCV] : CTL_VEC = UPLIT BYTE (5,6,0) ;

;	2473	  [SRV$_RCV] :	    CTL_VEC = UPLIT BYTE (4,5,6,0) ;

;	2474	  [SRV$_CANCELIO] : CTL_VEC = UPLIT BYTE (7,0) ;

;	2475	  [OUTRANGE]	  : RETURN (NIC$_PGM_ERR) ;

;	2476	  TES ;

;	2477	

;	2478	STATUS = NIC$_SUCCESS ;

;	2479	WHILE .STATUS

;	2480	DO

;	2481	    CASE  CH$RCHAR_A (CTL_VEC)  FROM 0 TO 7 OF

;	2482		SET

;	2483		[0] :	! Normal termination point 

;	2484	

;	2485		    EXITLOOP ;

;	2486	

;	2487	

;	2488		[1] :	! Verify that a posted receive has not arrived

;	2489	

;	2490		    IF .RCV_POSTED 

;	2491		    THEN

;	2492			IF $READEF (EFN=NIC$K_EFNDLLRCV, STATE=TMP) EQL SS$_WASSET

;	2493			THEN

;	2494			    STATUS = NIC$_ILLMSGSEQ ;

;	2495	

;	2496	

;	2497		[2] :	! Transmit the message

;	2498	

;	2499		    BEGIN

;	2500		    LOCAL   TMP ;

;	2501		    TMP = SS$_INSFMEM ;				! Retry if failure

;	2502		    WHILE  .TMP EQL SS$_INSFMEM			! due to lack of

;	2503		    DO						! system pool

;	2504			TMP = $QIOW (FUNC = IO$_WRITEVBLK,

;     P 2505				     CHAN = .CHANNEL,

;     P 2506				     IOSB = XMT_IOSB,

;     P 2507				     P1   = .IO_DDSC [STR_PTR],

;     P 2508				     P2   = .IO_DDSC [STR_LNG]

;     P 2509				    ) ;

;	2510		    IF NOT .TMP THEN STATUS = NIC$_NETCOMERR ;

;	2511		    END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 31

; Digital Equipment Corporation

;

;	2512		[3] :	! Check the transmit STATUS block

;	2513	

;	2514		    IF NOT .XMT_IOSB [IO_STAT]

;	2515		    THEN

;	2516			STATUS = NIC$_NETCOMERR ;

;	2517	

;	2518	

;	2519		[4] :	! Post the receive

;	2520	

;	2521		    IF  .RCV_POSTED

;	2522		    THEN

;	2523			STATUS = NIC$_PGM_ERR

;	2524		    ELSE

;	2525			IF $QIO (FUNC = IO$_READVBLK,

;     P 2526				 CHAN = .CHANNEL,

;     P 2527				 IOSB = RCV_IOSB,

;     P 2528				 EFN  = NIC$K_EFNDLLRCV,

;     P 2529				 P1   = .IO_DDSC [BUF_PTR],

;     P 2530				 P2   = .IO_DDSC [BUF_LNG]

;     P 2531				)

;	2532			THEN

;	2533			    BEGIN

;	2534			    RCV_POSTED = TRUE ;

;	2535			    RCVDDSC_AD = .IO_DDSC_AD ;

;	2536			    END

;	2537			ELSE

;	2538			    STATUS = NIC$_NETCOMERR ;

;	2539	

;	2540	

;	2541		[5] :	! Wait for the posted receive to arrive

;	2542	

;	2543		    IF  NOT .RCV_POSTED 

;	2544		    THEN

;	2545			STATUS = NIC$_PGM_ERR

;	2546		    ELSE

;	2547			BEGIN

;	2548			RCV_POSTED = FALSE ;

;	2549			$WAITFR (EFN = NIC$K_EFNDLLRCV) ;

;	2550			END ;

;	2551	

;	2552	

;	2553		[6] :	! Check the receive status block

;	2554	

;	2555		    IF  NOT .RCV_IOSB [IO_STAT]

;	2556		    THEN

;	2557			STATUS = NIC$_NETCOMERR

;	2558		    ELSE

;	2559			BEGIN

;	2560			BIND	RCV_DDSC = .RCVDDSC_AD : DDSC ;

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

;	2562			RCV_DDSC [STR_LNG] = .RCV_IOSB [IO_CNT] ;

;	2563			END ;

;	2564	

;	2565	

;	2566		[7] : 	! Cancel io



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 31-1

; Digital Equipment Corporation

;

;	2567	

;	2568		    IF  .RCV_POSTED

;	2569		    THEN

;	2570			BEGIN

;	2571			$CANCEL (CHAN = .CHANNEL) ;

;	2572			RCV_POSTED = FALSE ;

;	2573			END ;

;	2574		TES ;

;	2575	

;	2576	RETURN (.STATUS) ;

;	2577	END ;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00058 P.AAP:  .BYTE   1, 2, 3, 0						      ;

					      0005C P.AAQ:  .BYTE   4, 0						      ;

					      0005E	    .BLKB   2

					      00060 P.AAR:  .BYTE   5, 6, 0						      ;

					      00063	    .BLKB   1

					      00064 P.AAS:  .BYTE   4, 5, 6, 0						      ;

					      00068 P.AAT:  .BYTE   7, 0						      ;

					      0006A	    .BLKB   2



							    .PSECT  $OWN$,NOEXE,2



					      00080 RCVDDSC_AD:

							    .BLKB   16

					      00090 RCV_IOSB:

							    .BLKB   8

					      00098 XMT_IOSB:

							    .BLKB   8



							    .GLOBL  SYS$READEF, SYS$QIOW, SYS$QIO, SYS$WAITFR, SYS$CANCEL



							    .PSECT  $CODE$,NOWRT,2



					 0E3C 00711 	    .ENTRY  TLK_TO_SRV, Save R2,R3,R4,R5,R9,R10,R11		      ; 2408

		         59	0000G  CF  9E 00713 	    MOVAB   CHANNEL, R9						      ;

		         5A	0000'  CF  9E 00718 	    MOVAB   P.AAP, R10						      ;

		         5B	0000'  CF  9E 0071D 	    MOVAB   RCV_POSTED, R11					      ;

		         5E	       04  C2 00722 	    SUBL2   #4, SP						      ;

		         52	  08   AC  D0 00725 	    MOVL    IO_DDSC_AD, R2					      ; 2461

	   04	         00	  04   AC  CF 00729 	    CASEL   FCT, #0, #4						      ; 2468

	 001F	       0019	     0013     0072E 1$:     .WORD   3$-1$,-						      ;

		       0025	     000E     00734		    4$-1$,-						      ;

								    5$-1$,-						      ;

								    2$-1$,-						      ;

								    6$-1$						      ;

		         50	       0A  CE 00738 	    MNEGL   #10, R0						      ; 2475

					   04 0073B 	    RET     							      ;

		         55	       6A  9E 0073C 2$:     MOVAB   P.AAP, CTL_VEC					      ; 2470

				       16  11 0073F 	    BRB     7$							      ; 2468

		         55	  04   AA  9E 00741 3$:     MOVAB   P.AAQ, CTL_VEC					      ; 2471



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 31-2

; Digital Equipment Corporation

;

				       10  11 00745 	    BRB     7$							      ; 2468

		         55	  08   AA  9E 00747 4$:     MOVAB   P.AAR, CTL_VEC					      ; 2472

				       0A  11 0074B 	    BRB     7$							      ; 2468

		         55	  0C   AA  9E 0074D 5$:     MOVAB   P.AAS, CTL_VEC					      ; 2473

				       04  11 00751 	    BRB     7$							      ; 2468

		         55	  10   AA  9E 00753 6$:     MOVAB   P.AAT, CTL_VEC					      ; 2474

		         53	       01  D0 00757 7$:     MOVL    #1, STATUS						      ; 2478

		         17	       53  E9 0075A 8$:     BLBC    STATUS, 10$						      ; 2479

		         50	       85  9A 0075D 	    MOVZBL  (CTL_VEC)+, R0					      ; 2481

	   07	         00	       50  CF 00760 	    CASEL   R0, #0, #7						      ;

	 002B	       0013	     00D8     00764 9$:     .WORD   26$-9$,-						      ;

	 0096	       0067	     0060     0076A		    11$-9$,-						      ;

		       00C6	     00AB     00770		    13$-9$,-						      ;

								    16$-9$,-						      ;

								    17$-9$,-						      ;

								    18$-9$,-						      ;

								    21$-9$,-						      ;

								    24$-9$						      ;

				     00C5  31 00774 10$:    BRW     26$							      ; 2485

		         E0	       6B  E9 00777 11$:    BLBC    RCV_POSTED, 8$					      ; 2490

				       5E  DD 0077A 	    PUSHL   SP							      ; 2492

				       02  DD 0077C 	    PUSHL   #2							      ;

	      00000000G  9F	       02  FB 0077E 	    CALLS   #2, @#SYS$READEF					      ;

		         09	       50  D1 00785 	    CMPL    R0, #9						      ;

				       D0  12 00788 	    BNEQ    8$							      ;

		         53	       08  CE 0078A 	    MNEGL   #8, STATUS						      ; 2494

				       CB  11 0078D 12$:    BRB     8$							      ; 2481

		         54	0124   8F  3C 0078F 13$:    MOVZWL  #292, TMP						      ; 2501

	      00000124   8F	       54  D1 00794 14$:    CMPL    TMP, #292						      ; 2502

				       22  12 0079B 	    BNEQ    15$							      ;

				       7E  7C 0079D 	    CLRQ    -(SP)						      ; 2509

				       7E  7C 0079F 	    CLRQ    -(SP)						      ;

				       62  DD 007A1 	    PUSHL   (R2)						      ;

				  04   A2  DD 007A3 	    PUSHL   4(R2)						      ;

				       7E  7C 007A6 	    CLRQ    -(SP)						      ;

				0098   CB  9F 007A8 	    PUSHAB  XMT_IOSB						      ;

				       30  DD 007AC 	    PUSHL   #48							      ;

		         7E	       69  3C 007AE 	    MOVZWL  CHANNEL, -(SP)					      ;

				       7E  D4 007B1 	    CLRL    -(SP)						      ;

	      00000000G  9F	       0C  FB 007B3 	    CALLS   #12, @#SYS$QIOW					      ;

		         54	       50  D0 007BA 	    MOVL    R0, TMP						      ;

				       D5  11 007BD 	    BRB     14$							      ; 2502

		         98	       54  E8 007BF 15$:    BLBS    TMP, 8$						      ; 2510

				       50  11 007C2 	    BRB     22$							      ;

		         91	0098   CB  E8 007C4 16$:    BLBS    XMT_IOSB, 8$					      ; 2514

				       49  11 007C9 	    BRB     22$							      ; 2516

		         2F	       6B  E8 007CB 17$:    BLBS    RCV_POSTED, 19$					      ; 2521

				       7E  7C 007CE 	    CLRQ    -(SP)						      ; 2531

				       7E  7C 007D0 	    CLRQ    -(SP)						      ;

				  08   A2  DD 007D2 	    PUSHL   8(R2)						      ;

				  0C   A2  DD 007D5 	    PUSHL   12(R2)						      ;

				       7E  7C 007D8 	    CLRQ    -(SP)						      ;

				0090   CB  9F 007DA 	    PUSHAB  RCV_IOSB						      ;

				       31  DD 007DE 	    PUSHL   #49							      ;

		         7E	       69  3C 007E0 	    MOVZWL  CHANNEL, -(SP)					      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 31-3

; Digital Equipment Corporation

;

				       02  DD 007E3 	    PUSHL   #2							      ;

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

		         25	       50  E9 007EC 	    BLBC    R0, 22$						      ;

		         6B	       01  D0 007EF 	    MOVL    #1, RCV_POSTED					      ; 2534

		  0080   CB	  08   AC  D0 007F2 	    MOVL    IO_DDSC_AD, RCVDDSC_AD				      ; 2535

				       93  11 007F8 	    BRB     12$							      ; 2525

		         05	       6B  E8 007FA 18$:    BLBS    RCV_POSTED, 20$					      ; 2543

		         53	       0A  CE 007FD 19$:    MNEGL   #10, STATUS						      ; 2545

				       8B  11 00800 	    BRB     12$							      ; 2543

				       6B  D4 00802 20$:    CLRL    RCV_POSTED						      ; 2548

				       02  DD 00804 	    PUSHL   #2							      ; 2549

	      00000000G  9F	       01  FB 00806 	    CALLS   #1, @#SYS$WAITFR					      ;

				       2A  11 0080D 	    BRB     25$							      ; 2481

		         05	0090   CB  E8 0080F 21$:    BLBS    RCV_IOSB, 23$					      ; 2555

		         53	       26  CE 00814 22$:    MNEGL   #38, STATUS						      ; 2557

				       20  11 00817 	    BRB     25$							      ; 2555

		         50	0080   CB  D0 00819 23$:    MOVL    RCVDDSC_AD, R0					      ; 2559

		    04   A0	  0C   A0  D0 0081E 	    MOVL    12(R0), 4(R0)					      ; 2561

		         60	0092   CB  3C 00823 	    MOVZWL  RCV_IOSB+2, (R0)					      ; 2562

				       0F  11 00828 	    BRB     25$							      ; 2481

		         0C	       6B  E9 0082A 24$:    BLBC    RCV_POSTED, 25$					      ; 2568

		         7E	       69  3C 0082D 	    MOVZWL  CHANNEL, -(SP)					      ; 2571

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

				       6B  D4 00837 	    CLRL    RCV_POSTED						      ; 2572

				     FF1E  31 00839 25$:    BRW     8$							      ; 2479

		         50	       53  D0 0083C 26$:    MOVL    STATUS, R0						      ; 2576

					   04 0083F 	    RET     							      ; 2408



; Routine Size:  303 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 32

; Digital Equipment Corporation

;

;	2578	ROUTINE  VERIFY_SYSPAR (SRC_PTR, LENGTH_AD) : =

;	2579	

;	2580	!++

;	2581	! FUNCTIONAL DESCRIPTION:

;	2582	!

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

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

;	2585	!	characcters are moved.  Correctness validation is

;	2586	!	syntax, not content, validation.

;	2587	!

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

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

;	2590	!

;	2591	!	  PARAMETER  ENDMARK

;	2592	!

;	2593	!	where :

;	2594	!

;	2595	!	ENDMARK   = 0

;	2596	!

;	2597	!	PARAMETER = Parameter description consisting of 

;	2598	!

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

;	2600	!

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

;	2602	!

;	2603	!		PARVALUE	  = parameter value according

;	2604	!				    to type and length

;	2605	!

;	2606	!		parameter  length	value

;	2607	!		  type	   in bytes	

;	2608	!		---------  --------	------

;	2609	!

;	2610	!		    1	   1 to 6	ASCII name by which

;	2611	!					node is to be known

;	2612	!

;	2613	!		    2	      2		Binary number by which

;	2614	!					node is to be known

;	2615	!

;	2616	!		    3	   1 to 6	ASCII name of host 

;	2617	!					assigned to target

;	2618	!

;	2619	!

;	2620	! FORMAL PARAMETERS:

;	2621	!

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

;	2623	!			  of the system parameter field.

;	2624	!

;	2625	!	LENGTH_AD	= The address of the longword which

;	2626	!			  returns the length of the field.



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 33

; Digital Equipment Corporation

;

;	2627	! IMPLICIT INPUTS:	NONE

;	2628	!

;	2629	! IMPLICIT OUTPUTS:	NONE

;	2630	!

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

;	2632	!				correctly formed.

;	2633	!			FALSE	Otherwise.

;	2634	!

;	2635	! SIDE EFFECTS:		NONE

;	2636	!

;	2637	!--

;	2638	

;	2639	BEGIN

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

;	2641	

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

;	2643	

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

;	2645	

;	2646	WHILE  .STAT

;	2647	DO

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

;	2649	    SET

;	2650	

;	2651	    [0] : EXITLOOP ;

;	2652	

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

;	2654	

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

;	2656				   ELSE  PFLAGS [.I] = 1 ;

;	2657	

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

;	2659	

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

;	2661		  THEN

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

;	2663		  ELSE

;	2664			STAT = FALSE ;

;	2665	

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

;	2667	

;	2668		  IF CH$RCHAR_A (PTR) EQL 2

;	2669		  THEN

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

;	2671		  ELSE

;	2672			STAT = FALSE ;

;	2673	

;	2674	    [OTHERWISE] :  STAT = FALSE ;

;	2675	

;	2676	    TES ;

;	2677	

;	2678	.LENGTH_AD = .PTR - .SRC_PTR ;

;	2679	

;	2680	RETURN (.STAT) ;

;	2681	END ;



; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 33-1

; Digital Equipment Corporation

;











					 003C 00840 VERIFY_SYSPAR:

							    .WORD   Save R2,R3,R4,R5					      ; 2578

				       7E  D4 00842 	    CLRL    PFLAGS						      ; 2642

		         53	       01  D0 00844 	    MOVL    #1, STAT						      ; 2644

		         52	  04   AC  D0 00847 	    MOVL    SRC_PTR, PTR					      ;

		         66	       53  E9 0084B 1$:     BLBC    STAT, 10$						      ; 2646

		         50	       82  9A 0084E 	    MOVZBL  (PTR)+, I						      ; 2648

		         54	       50  D0 00851 	    MOVL    I, R4						      ;

		         55	       01  D0 00854 	    MOVL    #1, R5						      ;

				       54  D5 00857 	    TSTL    R4							      ;

				       04  12 00859 	    BNEQ    2$							      ;

				       55  D4 0085B 	    CLRL    R5							      ;

				       55  11 0085D 	    BRB     10$							      ; 2651

		         01	       54  D1 0085F 2$:     CMPL    R4, #1						      ; 2648

				       14  19 00862 	    BLSS    4$							      ;

		         03	       54  D1 00864 	    CMPL    R4, #3						      ;

				       0F  14 00867 	    BGTR    4$							      ;

				       55  D4 00869 	    CLRL    R5							      ;

	   04	       6E40	       00  E1 0086B 	    BBC     #0, PFLAGS[I], 3$					      ; 2655

				       53  D4 00870 	    CLRL    STAT						      ;

				       40  11 00872 	    BRB     10$							      ;

		       6E40	       01  90 00874 3$:     MOVB    #1, PFLAGS[I]					      ; 2656

		         01	       54  D1 00878 4$:     CMPL    R4, #1						      ; 2648

				       05  13 0087B 	    BEQL    5$							      ;

		         03	       54  D1 0087D 	    CMPL    R4, #3						      ;

				       15  12 00880 	    BNEQ    7$							      ;

				       55  D4 00882 5$:     CLRL    R5							      ;

		         06	       62  91 00884 	    CMPB    (PTR), #6						      ; 2660

				       0C  1A 00887 	    BGTRU   6$							      ;

		         51	       62  9A 00889 	    MOVZBL  (PTR), R1						      ; 2662

		         51	       52  C0 0088C 	    ADDL2   PTR, R1						      ;

	   52	         51	       01  C1 0088F 	    ADDL3   #1, R1, PTR						      ;

				       02  11 00893 	    BRB     7$							      ; 2660

				       53  D4 00895 6$:     CLRL    STAT						      ; 2664

		         02	       54  D1 00897 7$:     CMPL    R4, #2						      ; 2648

				       11  12 0089A 	    BNEQ    9$							      ;

				       55  D4 0089C 	    CLRL    R5							      ;

		         51	       82  9A 0089E 	    MOVZBL  (PTR)+, R1						      ; 2668

		         02	       51  91 008A1 	    CMPB    R1, #2						      ;

				       05  12 008A4 	    BNEQ    8$							      ;

		         52	       02  C0 008A6 	    ADDL2   #2, PTR						      ; 2670

				       02  11 008A9 	    BRB     9$							      ; 2668

				       53  D4 008AB 8$:     CLRL    STAT						      ; 2672

		         9B	       55  E9 008AD 9$:     BLBC    R5, 1$						      ; 2648

				       53  D4 008B0 	    CLRL    STAT						      ; 2674

				       97  11 008B2 	    BRB     1$							      ; 2646

      08   BC	         52	  04   AC  C3 008B4 10$:    SUBL3   SRC_PTR, PTR, @LENGTH_AD				      ; 2678

		         50	       53  D0 008BA 	    MOVL    STAT, R0						      ; 2680

					   04 008BD 	    RET     							      ; 2578





; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 33-2

; Digital Equipment Corporation

;

; Routine Size:  126 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 02:49:40	DBB3:[NICE.SRC]NICDLL.B32;121					Page 34

; Digital Equipment Corporation

;

;	2682	END				!End of module

;	2683	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

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

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

;  $PLIT$         	   108  NOWRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)









;				LIBRARY STATISTICS

;

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

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]STARLET.L32;1		      2688        31         1       141











; Size:		2238 code + 268 data bytes

; Run Time:	01:04.5

; Elapsed Time:	02:34.0

; Memory Used:	323 pages

; Compilation Complete

