

; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 1

;

;	0001	MODULE SNDSMB (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'A0002C'

;	0004			) =

;	0005	BEGIN

;	0006	

;	0007	!

;	0008	! Copyright (c) 1977

;	0009	! Digital Equipment Corporation, Maynard, Massachusetts 01754

;	0010	!

;	0011	! This software is furnished  under a license for use only on a single

;	0012	! computer  system and  may be  copied only with  the inclusion of the

;	0013	! above copyright notice.  This software, or any other copies thereof,

;	0014	! may not be provided or  otherwise made available to any other person

;	0015	! except for use on such system and to one who agrees to these license

;	0016	! terms.  Title to and  ownership of the  software  shall at all times

;	0017	! remain in DEC.

;	0018	!

;	0019	! The information in this software is subject to change without notice

;	0020	! and should  not be construed  as a commitment  by Digital  Equipment

;	0021	! Corporation.

;	0022	!

;	0023	! DEC assumes  no  responsibility  for  the use or  reliability of its

;	0024	! software on equipment which is not supplied by DEC.

;	0025	

;	0026	!++

;	0027	!

;	0028	! FACILITY:  F11ACP Structure Level 1

;	0029	!

;	0030	! ABSTRACT:

;	0031	!

;	0032	!	This routine constructs and sends a message to the symbiont manager

;	0033	!	to cause a file to be spooled and deleted.

;	0034	!

;	0035	! ENVIRONMENT:

;	0036	!

;	0037	!	STARLET operating system, including privileged system services

;	0038	!	and internal exec routines.

;	0039	!

;	0040	!--

;	0041	!

;	0042	!

;	0043	! AUTHOR:  Andrew C. Goldstein,	 CREATION DATE:  5-Jun-1978  11:23

;	0044	!

;	0045	! REVISION HISTORY:

;	0046	!

;	0047	!   Andrew C. Goldstein, 15-Jun-78  17:54

;	0048	!   A0002 - Use system subroutine to write mailbox

;	0049	!

;	0050	!**

;	0051	

;	0052	

;	0053	LIBRARY 'SYS$LIBRARY:LIB.L32';

;	0054	REQUIRE 'SRC$:FCPDEF.B32';

;	0373	



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 1-1

;

;	0374	

;	0375	FORWARD ROUTINE

;	0376		SEND_SYMBIONT	: NOVALUE,	! main routine

;	0377		SEND_MESSAGE;			! kernel mode routine



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 2

;

;	0378	!+

;	0379	!

;	0380	! Format of the message sent to the symbiont manager to queue a single file.

;	0381	!

;	0382	!-

;	0383	

;	0384	MACRO

;	0385		SMB_IDENT	= 00, 0, 16, 0%,	! message identification code

;	0386		SMB_REPLYMBX	= 02, 0, 16, 0%,	! reply mailbox unit

;	0387		SMB_PRIV	= 04, 0, 00, 0%,	! process privileges (64 bits)

;	0388		SMB_UIC		= 12, 0, 32, 0%,	! sender UIC

;	0389		SMB_USERNAME	= 16, 0, 00, 0%,	! user name + account name

;	0390		SMB_PRIO	= 36, 0, 08, 0%,	! priority

;	0391		SMB_FUNC	= 38, 0, 16, 0%,	! symbiont manager function code

;	0392		SMB_QNAME	= 40, 0, 00, 0%,	! queue name

;	0393		SMB_DEVNAME	= 56, 0, 00, 0%,	! device name

;	0394		SMB_FID		= 72, 0, 00, 0%,	! file ID

;	0395		SMB_DID		= 78, 0, 00, 0%,	! directory ID

;	0396		SMB_FILENAME	= 84, 0, 00, 0%,	! file name

;	0397		SMB_OPTIONS	= 104,0, 08, 0%;	! options byte

;	0398	

;	0399	LITERAL

;	0400		SMB_USER_LEN	= 20,			! length of user + account name

;	0401		SMB_QNAMELEN	= 16,			! length of queue name

;	0402		SMB_DEVNAMELEN	= 16,			! length of device name

;	0403		SMB_FILENAMELEN	= 20,			! length of file name

;	0404		SMB_LENGTH	= 106;			! length of message buffer



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 3

;

;	0405	GLOBAL ROUTINE SEND_SYMBIONT (ABD, HEADER, FCB) : NOVALUE =

;	0406	

;	0407	!++

;	0408	!

;	0409	! FUNCTIONAL DESCRIPTION:

;	0410	!

;	0411	!	This routine constructs and sends a message to the symbiont manager

;	0412	!	to cause a file to be spooled and deleted.

;	0413	!

;	0414	!

;	0415	! CALLING SEQUENCE:

;	0416	!	SEND_SYMBIONT (ARG1, ARG2, ARG3)

;	0417	!

;	0418	! INPUT PARAMETERS:

;	0419	!	ARG1: address of buffer descriptor packet

;	0420	!	ARG2: address of file header

;	0421	!	ARG3: address of file control block

;	0422	!

;	0423	! IMPLICIT INPUTS:

;	0424	!	IO_PACKET: address of I/O packet of this request

;	0425	!

;	0426	! OUTPUT PARAMETERS:

;	0427	!	NONE

;	0428	!

;	0429	! IMPLICIT OUTPUTS:

;	0430	!	NONE

;	0431	!

;	0432	! ROUTINE VALUE:

;	0433	!	NONE

;	0434	!

;	0435	! SIDE EFFECTS:

;	0436	!	message sent to symbiont manager, header may be altered

;	0437	!

;	0438	!--

;	0439	

;	0440	BEGIN

;	0441	

;	0442	MAP

;	0443		ABD		: REF BBLOCKVECTOR [,ABD$C_LENGTH], ! buffer descriptor arg

;	0444		HEADER		: REF BBLOCK,	! file header arg

;	0445		FCB		: REF BBLOCK;	! file control block arg

;	0446	

;	0447	LOCAL

;	0448		MSG_BUFFER	: BBLOCK [SMB_LENGTH], ! message buffer

;	0449		DEV_DESC	: VECTOR [2],	! device name string descriptor

;	0450		IDENT_AREA	: REF BBLOCK,	! address of file header ident area

;	0451		UCB		: REF BBLOCK,	! UCB of spooled device

;	0452		VCB		: REF BBLOCK;	! VCB of spooled device

;	0453	

;	0454	EXTERNAL

;	0455		IO_PACKET	: REF BBLOCK,	! I/O packet of user request

;	0456		CURRENT_UCB	: REF BBLOCK;	! UCB of current device

;	0457	

;	0458	EXTERNAL ROUTINE

;	0459		MARK_DIRTY,			! mark buffer for rewrite



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 3-1

;

;	0460		CHECKSUM,			! compute file header checksum

;	0461		MAKE_STRING;			! convert rad-50 file name to string

;	0462	

;	0463	

;	0464	! Jam the system and owner protection fields of the file header to zero, to

;	0465	! guarantee access by the spooler.

;	0466	!

;	0467	

;	0468	(HEADER[FH1$W_FILEPROT])<0,8> = 0;

;	0469	MARK_DIRTY (.HEADER);

;	0470	CHECKSUM (.HEADER);

;	0471	

;	0472	! Now initialize the message buffer and construct the message in it.

;	0473	!

;	0474	

;	0475	CH$FILL (0, SMB_LENGTH, MSG_BUFFER);

;	0476	MSG_BUFFER[SMB_IDENT]	= MSG$_SNDSMB;

;	0477	MSG_BUFFER[SMB_UIC]	= .FCB[FCB$L_FILEOWNER];

;	0478	

;	0479	CH$COPY (.ABD[ABD$C_NAME, ABD$W_COUNT],

;	0480		ABD[ABD$C_NAME, ABD$W_TEXT] + .ABD[ABD$C_NAME, ABD$W_TEXT] + 1,

;	0481		' ', SMB_USER_LEN, MSG_BUFFER[SMB_USERNAME]);

;	0482	

;	0483	MSG_BUFFER[SMB_PRIO]	= 31 - .IO_PACKET[IRP$B_PRI];

;	0484	MSG_BUFFER[SMB_FUNC]	= SMR$K_ENTER;

;	0485	

;	0486	UCB = .IO_PACKET[IRP$L_MEDIA];

;	0487	VCB = .UCB[UCB$L_VCB];

;	0488	CH$COPY (.VCB[VCB$B_QNAMECNT] + 1,

;	0489		VCB[VCB$B_QNAMECNT],

;	0490		0, SMB_QNAMELEN, MSG_BUFFER[SMB_QNAME]);

;	0491	

;	0492	DEV_DESC[0] = SMB_DEVNAMELEN - 1;

;	0493	DEV_DESC[1] = MSG_BUFFER[SMB_DEVNAME] + 1;

;	0494	$FAO (	DESCRIPTOR ('_!AC!UW'),

;     P 0495		DEV_DESC,

;     P 0496		DEV_DESC,

;     P 0497		BBLOCK [.CURRENT_UCB[UCB$L_DDB], DDB$T_NAME],

;     P 0498		.CURRENT_UCB[UCB$W_UNIT]

;     P 0499		);

;	0500	(MSG_BUFFER[SMB_DEVNAME])<0,8> = .DEV_DESC[0];

;	0501	

;	0502	CH$MOVE (FID$C_LENGTH, FCB[FCB$W_FID], MSG_BUFFER[SMB_FID]);

;	0503	IDENT_AREA = .HEADER + .HEADER[FH1$B_IDOFFSET] * 2;

;	0504	(MSG_BUFFER[SMB_FILENAME])<0,8> = MAKE_STRING (IDENT_AREA[FI1$W_FILENAME] - 6,

;	0505							MSG_BUFFER[SMB_FILENAME] + 1);

;	0506	

;	0507	MSG_BUFFER[SMB_OPTIONS] = SMO$K_DELETE;

;	0508	

;	0509	! The actual send is done in kernel mode, since the channel assignment must

;	0510	! be done as a back door assignment.

;	0511	!

;	0512	

;	0513	KERNEL_CALL (SEND_MESSAGE, MSG_BUFFER);

;	0514	



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 3-2

;

;	0515	END;					! end of routine SEND_SYMBIONT





							    .TITLE  SNDSMB

							    .IDENT  \A0002C\



							    .PSECT  $CODE$,NOWRT,2



		  57  55  21  43  41  21  5F  00000 P.AAB:  .ASCII  \_!AC!UW\						      ;

					      00007	    .BLKB   1

				    00000007  00008 P.AAA:  .LONG   7							      ;

				    00000000' 0000C 	    .ADDRESS P.AAB						      ;



							    .EXTRN  IO_PACKET, CURRENT_UCB, MARK_DIRTY, CHECKSUM, MAKE_STRING

							    .EXTRN  SYS$FAO, SYS$CMKRNL



					 00FC 00010 	    .ENTRY  SEND_SYMBIONT, Save R2,R3,R4,R5,R6,R7		      ; 0405

		         5E 	  8C   AE  9E 00012 	    MOVAB   -116(SP), SP					      ;

		         56 	  08   AC  D0 00016 	    MOVL    HEADER, R6						      ; 0468

				  0A   A6  94 0001A 	    CLRB    10(R6)						      ;

				       56  DD 0001D 	    PUSHL   R6							      ; 0469

		  0000G  CF	       01  FB 0001F 	    CALLS   #1, MARK_DIRTY					      ;

				       56  DD 00024 	    PUSHL   R6							      ; 0470

		  0000G  CF	       01  FB 00026 	    CALLS   #1, CHECKSUM					      ;

	   00 	         6E 	       00  2C 0002B 	    MOVC5   #0, (SP), #0, #106, MSG_BUFFER			      ; 0475

		    08   AE	006A   8F     0002F									      ;

		    08   AE	       04  B0 00034 	    MOVW    #4, MSG_BUFFER					      ; 0476

		         57 	  0C   AC  D0 00038 	    MOVL    FCB, R7						      ; 0477

		    14   AE	  38   A7  D0 0003C 	    MOVL    56(R7), MSG_BUFFER+12				      ;

		         51 	  04   AC  D0 00041 	    MOVL    ABD, R1						      ; 0479

		         50 	       51  D0 00045 	    MOVL    R1, R0						      ; 0480

		         50 	  10   A0  3C 00048 	    MOVZWL  16(R0), R0						      ;

	   20 	    11 A140	  12   A1  2C 0004C 	    MOVC5   18(R1), 17(R1)[R0], #32, #20, MSG_BUFFER+16		      ; 0479

		    18   AE	       14     00053									      ;

		         50 	0000G  CF  D0 00056 	    MOVL    IO_PACKET, R0					      ; 0483

      2C   AE	         1F 	  23   A0  83 0005B 	    SUBB3   35(R0), #31, MSG_BUFFER+36				      ;

		    2E   AE	       08  B0 00061 	    MOVW    #8, MSG_BUFFER+38					      ; 0484

		         50 	  34   A0  D0 00065 	    MOVL    52(R0), UCB						      ; 0486

		         50 	  30   A0  D0 00069 	    MOVL    48(UCB), VCB					      ; 0487

		         51 	  0B   A0  9A 0006D 	    MOVZBL  11(VCB), R1						      ; 0488

				       51  D6 00071 	    INCL    R1							      ;

	   00 	    0B   A0	       51  2C 00073 	    MOVC5   R1, 11(VCB), #0, #16, MSG_BUFFER+40			      ;

		    30   AE	       10     00078									      ;

		         6E 	       0F  D0 0007B 	    MOVL    #15, DEV_DESC					      ; 0492

		    04   AE	  41   AE  9E 0007E 	    MOVAB   MSG_BUFFER+57, DEV_DESC+4				      ; 0493

		         50 	0000G  CF  D0 00083 	    MOVL    CURRENT_UCB, R0					      ; 0499

		         7E 	  48   A0  3C 00088 	    MOVZWL  72(R0), -(SP)					      ;

	   7E 	    24   A0	       14  C1 0008C 	    ADDL3   #20, 36(R0), -(SP)					      ;

				  08   AE  9F 00091 	    PUSHAB  DEV_DESC						      ;

				  0C   AE  9F 00094 	    PUSHAB  DEV_DESC						      ;

				FF6D   CF  9F 00097 	    PUSHAB  P.AAA						      ;

	      00000000G  9F	       05  FB 0009B 	    CALLS   #5, @#SYS$FAO					      ;

		    40   AE	       6E  90 000A2 	    MOVB    DEV_DESC, MSG_BUFFER+56				      ; 0500

      50   AE	    20   A7	       06  28 000A6 	    MOVC3   #6, 32(R7), MSG_BUFFER+72				      ; 0502

		         50 	       66  9A 000AC 	    MOVZBL  (R6), R0						      ; 0503



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 3-3

;

		         50 	     6640  3E 000AF 	    MOVAW   (R6)[R0], IDENT_AREA				      ;

				  5D   AE  9F 000B3 	    PUSHAB  MSG_BUFFER+85					      ; 0505

				  FA   A0  9F 000B6 	    PUSHAB  -6(IDENT_AREA)					      ; 0504

		  0000G  CF	       02  FB 000B9 	    CALLS   #2, MAKE_STRING					      ;

		    5C   AE	       50  90 000BE 	    MOVB    R0, MSG_BUFFER+84					      ;

		    70   AE	       01  90 000C2 	    MOVB    #1, MSG_BUFFER+104					      ; 0507

				  08   AE  9F 000C6 	    PUSHAB  MSG_BUFFER						      ; 0513

				       01  DD 000C9 	    PUSHL   #1							      ;

				       5E  DD 000CB 	    PUSHL   SP							      ;

				0000V  CF  9F 000CD 	    PUSHAB  SEND_MESSAGE					      ;

	      00000000G  9F	       04  FB 000D1 	    CALLS   #4, @#SYS$CMKRNL					      ;

					   04 000D8 	    RET     							      ; 0405



; Routine Size:  201 bytes







; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 4

;

;	0516	ROUTINE SEND_MESSAGE (MESSAGE) =

;	0517	

;	0518	!++

;	0519	!

;	0520	! FUNCTIONAL DESCRIPTION:

;	0521	!

;	0522	!	This routine assigns a channel to the job controller mailbox and sends

;	0523	!	the message to print a file.

;	0524	!

;	0525	!

;	0526	! CALLING SEQUENCE:

;	0527	!	SEND_MESSAGE (ARG1)

;	0528	!

;	0529	! INPUT PARAMETERS:

;	0530	!	ARG1: address of message buffer

;	0531	!

;	0532	! IMPLICIT INPUTS:

;	0533	!

;	0534	! OUTPUT PARAMETERS:

;	0535	!	NONE

;	0536	!

;	0537	! IMPLICIT OUTPUTS:

;	0538	!	NONE

;	0539	!

;	0540	! ROUTINE VALUE:

;	0541	!	1

;	0542	!

;	0543	! SIDE EFFECTS:

;	0544	!	message sent to symbiont manager

;	0545	!

;	0546	!--

;	0547	

;	0548	BEGIN

;	0549	

;	0550	LINKAGE

;	0551		L_WRTMAILBOX	= JSB (REGISTER = 3, REGISTER = 4, REGISTER = 5) :

;	0552				  NOPRESERVE (2)

;	0553				  NOTUSED (6, 7, 8, 9, 10, 11);

;	0554	

;	0555	LOCAL

;	0556		X;				! dummy variable

;	0557	

;	0558	EXTERNAL

;	0559		SYS$GL_JOBCTLMB	: BBLOCK ADDRESSING_MODE (ABSOLUTE);

;	0560						! job controller mailbox

;	0561	

;	0562	EXTERNAL ROUTINE

;	0563		EXE$WRTMAILBOX	: L_WRTMAILBOX ADDRESSING_MODE (GENERAL);

;	0564						! system subroutine to write mailbox

;	0565	

;	0566	

;	0567	! The job controller mailbox is inaccessible through the normal QIO

;	0568	! mechanism; we use the system subroutine to write it. First touch the

;	0569	! message to fault in the page(s).

;	0570	!



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 4-1

;

;	0571	

;	0572	X = ..MESSAGE;

;	0573	X = .(.MESSAGE+SMB_LENGTH-4);

;	0574	

;	0575	IF .SYS$GL_JOBCTLMB[UCB$W_REFC] NEQ 0

;	0576	THEN EXE$WRTMAILBOX (SMB_LENGTH, .MESSAGE, SYS$GL_JOBCTLMB);

;	0577	

;	0578	RETURN 1;

;	0579	

;	0580	END;					! end of routine SEND_MESSAGE







							    .EXTRN  SYS$GL_JOBCTLMB, EXE$WRTMAILBOX



					 003C 000D9 SEND_MESSAGE:

							    .WORD   Save R2,R3,R4,R5					      ; 0516

		         51 	  04   BC  D0 000DB 	    MOVL    @MESSAGE, X						      ; 0572

		         50 	  04   AC  D0 000DF 	    MOVL    MESSAGE, R0						      ; 0573

		         51 	  66   A0  D0 000E3 	    MOVL    102(R0), X						      ;

			    00000000G  9F  B5 000E7 	    TSTW    @#SYS$GL_JOBCTLMB+80				      ; 0575

				       15  13 000ED 	    BEQL    1$							      ;

		         53 	  6A   8F  9A 000EF 	    MOVZBL  #106, R3						      ; 0576

		         54 	  04   AC  D0 000F3 	    MOVL    MESSAGE, R4						      ;

		         55 00000000G  8F  D0 000F7 	    MOVL    #SYS$GL_JOBCTLMB, R5				      ;

			    00000000G  00  16 000FE 	    JSB     EXE$WRTMAILBOX					      ;

		         50 	       01  D0 00104 1$:     MOVL    #1, R0						      ; 0578

					   04 00107 	    RET     							      ; 0516



; Routine Size:  47 bytes





;	0581	

;	0582	END

;	0583	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

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









;				LIBRARY STATISTICS

;

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

;	File				     Total    Loaded   Percent      Read

;



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:45	DBB3:[F11A.SRC]SNDSMB.B32;16					Page 4-2

;

;  DBA4:[SYSLIB]LIB.L32;1		      5582        23         0       242











; Size:		248 code + 16 data bytes

; Run Time:	00:07.4

; Elapsed Time:	00:15.1

; Memory Used:	297 pages

; Compilation Complete

