

; Bliss-32 7.352	Saturday 22-AUG-1978 03:01:27	DBB3:[PATCH.SRC]PATSIO.B32;2					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE PATSIO (

;	0002			%IF %VARIANT EQL 1

;     L 0003			%THEN

;	0004				ADDRESSING_MODE (EXTERNAL = LONG_RELATIVE, NONEXTERNAL = LONG_RELATIVE),

;	0005			%FI

;	0006			IDENT = 'X01.05') =

;	0007	BEGIN

;	0008	

;	0009	! Copyright (C) 1976,1977

;	0010	! Digital Equipment Corporation, Maynard, Massachusetts 01754

;	0011	!

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

;	0013	! single computer system and may be copied only with the inclusion

;	0014	! of the above copyright notice. This software, or any

;	0015	! other copies thereof, may not be provided or otherwise made

;	0016	! available to any other person except for use on such system

;	0017	! and to one who agrees to these license terms. Title to and

;	0018	! ownership of the software shall at all times remain in DEC.

;	0019	!

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

;	0021	! notice and should not be construed as a commitment by Digital

;	0022	! Equipment Corporation.

;	0023	!

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

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

;	0026	!

;	0027	! FACILITY:	PATCH

;	0028	!

;	0029	!++

;	0030	! FUNCTIONAL DESCRIPTION:

;	0031	!	FAO FORMATTING ROUTINE

;	0032	!

;	0033	! Version:	X01.05

;	0034	!

;	0035	! History:

;	0036	!	Author:

;	0037	!		Carol Peters, 01 Oct 1976: Version 01

;	0038	!

;	0039	!	Modified by:

;	0040	!		Kathleen Morse, 13 Oct 1977: Version 16

;	0041	!

;	0042	! Revision history:

;	0043	!  NO	DATE		PROGRAMMER		PURPOSE

;	0044	!  --	----		----------		-------

;	0045	!  00	13-OCT-77	K.D. MORSE		ADAPT VERSION 14 TO PATCH.

;	0046	!  01	15-DEC-77	K.D. MORSE		ADD JOURNAL OUTPUT

;	0047	!  02	25-APR-78	K.D. MORSE		CONVERT TO NATIVE COMPILER.

;	0048	!  03	18-MAY-78	K.D. MORSE		NO CHANGES FOR VERS 15.

;	0049	!  04	13-JUN-78	K.D. MORSE		ADD FAO COUNTS TO SIGNALS.

;	0050	!  05	29-JUN-78	K.D. MORSE		NO CHANGES FOR VERS 16.

;	0051	!

;	0052	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 03:01:27	DBB3:[PATCH.SRC]PATSIO.B32;2					Page 2

; Digital Equipment Corporation

;

;	0053	FORWARD ROUTINE

;	0054		PAT$FAO_OUT: NOVALUE;					! ROUTINE TO FORMAT AND OUTPUT A STRING

;	0055	

;	0056	LIBRARY 'SYS$LIBRARY:STARLET.L32';

;	0057	REQUIRE 'SRC$:SYSLIT.REQ';

;	0092	REQUIRE 'SRC$:VXSMAC.REQ';

;	0132	REQUIRE 'SRC$:PATPCT.REQ';

;	0148	REQUIRE 'SRC$:PATGEN.REQ';

;	0327	

;	0328	EXTERNAL ROUTINE

;	0329		PAT$WRITEFILE: NOVALUE,					! WRITES TO A FILE

;	0330		SYS$FAOL: ADDRESSING_MODE (ABSOLUTE);			! ROUTINE TO FORMAT AN ASCII STRING

;	0331	

;	0332	EXTERNAL

;	0333		PAT$GL_ERRCODE,						! ERROR CODE

;	0334		PAT$GL_JNLRAB: BLOCK [, BYTE],				! RAB FOR JOURNAL FILE

;	0335		PAT$GL_OUTRAB: BLOCK [, BYTE];			 	! RAB for SYS$OUTPUT



; Bliss-32 7.352	Saturday 22-AUG-1978 03:01:27	DBB3:[PATCH.SRC]PATSIO.B32;2					Page 3

; Digital Equipment Corporation

;

;	0336	GLOBAL ROUTINE PAT$FAO_OUT (STRING, ARGUMENTS) : NOVALUE =

;	0337	

;	0338	!++

;	0339	! FUNCTIONAL DESCRIPTION:

;	0340	!

;	0341	!	SETS UP INPUT AND OUTPUT STRING DESCRIPTORS, AND THEN CALLS

;	0342	!	FAO TO FORMAT THE STRING. THEN SENDS THE FORMATTED STRING TO

;	0343	!	THE TERMINAL

;	0344	!

;	0345	!	IF THE OUTPUT FAILS, A FATAL ERROR IS REPORTED.

;	0346	!

;	0347	! CALLING SEQUENCE:

;	0348	!

;	0349	!	PAT$FAO_OUT ()

;	0350	!

;	0351	! INPUTS:

;	0352	!

;	0353	!	STRING		- THE ADDRESS OF A COUNTED CONTROL STRING TO FAO

;	0354	!	ARGUMENTS	- MAY BE ABSENT. ARGUMENTS TO BE APPLIED TO THE

;	0355	!			  FAO CONTROL STRING.

;	0356	!

;	0357	! IMPLICIT INPUTS:

;	0358	!

;	0359	!	NONE

;	0360	!

;	0361	! OUTPUTS:

;	0362	!

;	0363	!	NONE

;	0364	!

;	0365	! IMPLICIT OUTPUTS:

;	0366	!

;	0367	!	NONE

;	0368	!

;	0369	! ROUTINE VALUE:

;	0370	!

;	0371	!	NOVALUE

;	0372	!

;	0373	! SIDE EFFECTS:

;	0374	!

;	0375	!	THE FORMATTED STRING IS OUTPUT ON THE TERMINAL.  ON ERROR, EXITS.

;	0376	!--

;	0377	

;	0378	BEGIN

;	0379		

;	0380	MAP

;	0381		STRING: REF VECTOR [, BYTE];				! FAO CONTROL STRING

;	0382	

;	0383	LOCAL

;	0384		OUT_BUF: VECTOR [TTY_OUT_WIDTH, BYTE],			! FORMATTED MESSAGE BUFFER

;	0385		INP_DESC: VECTOR [2],					! FAO CONTROL STRING DESCRIPTOR

;	0386		OUT_DESC: VECTOR [2];					! FORMATTED MESSAGE DESCRIPTOR

;	0387	

;	0388	!++

;	0389	! SET UP FAO CONTROL STRING DESCRIPTOR AND FORMATTED

;	0390	! MESSAGE STRING DESCRIPTOR.



; Bliss-32 7.352	Saturday 22-AUG-1978 03:01:27	DBB3:[PATCH.SRC]PATSIO.B32;2					Page 3-1

; Digital Equipment Corporation

;

;	0391	!--

;	0392	INP_DESC [0] = .STRING [0];					! SET SIZE OF STRING

;	0393	INP_DESC [1] = STRING [1];					! SET ADDRESS OF STRING

;	0394	OUT_DESC [0] = TTY_OUT_WIDTH;					! SET MAX MESSAGE WIDTH

;	0395	OUT_DESC [1] = OUT_BUF;						! SET MESSAGE ADDRESS

;	0396	

;	0397	!++

;	0398	! FORMAT THE MESSAGE.

;	0399	!--

;	0400	SYS$FAOL (INP_DESC, PAT$GL_OUTRAB [RAB$W_RSZ], OUT_DESC, ARGUMENTS);

;	0401	

;	0402	!++

;	0403	! Output the formatted message.  If this fails, then exit as there

;	0404	! is no way to communicate with the patcher.

;	0405	!--

;	0406	PAT$GL_OUTRAB [RAB$L_RBF] = OUT_BUF;

;	0407	PAT$GL_ERRCODE = $PUT (RAB = PAT$GL_OUTRAB);

;	0408	IF NOT .PAT$GL_ERRCODE

;	0409	THEN

;	0410		SIGNAL (.PAT$GL_ERRCODE);

;	0411	PAT$WRITEFILE(.PAT$GL_OUTRAB[RAB$W_RSZ], OUT_BUF, PAT$GL_JNLRAB);

;	0412	END;





							    .TITLE  PATSIO

							    .IDENT  \X01.05\



							    .GLOBL  PAT$WRITEFILE, SYS$FAOL, PAT$GL_ERRCODE, PAT$GL_JNLRAB

							    .GLOBL  PAT$GL_OUTRAB, SYS$PUT



							    .PSECT  _PAT$CODE,NOWRT,2



					 0C00 00000 	    .ENTRY  PAT$FAO_OUT, Save R10,R11				      ; 0336

		         5A 00000000G  EF  9E 00002 	    MOVAB   PAT$GL_ERRCODE, R10					      ;

		         5B 00000000G  EF  9E 00009 	    MOVAB   PAT$GL_OUTRAB+34, R11				      ;

		         5E	FF70   CE  9E 00010 	    MOVAB   -144(SP), SP					      ;

		    04   AE	  04   BC  9A 00015 	    MOVZBL  @STRING, INP_DESC					      ; 0392

      08   AE	    04   AC	       01  C1 0001A 	    ADDL3   #1, STRING, INP_DESC+4				      ; 0393

		         7E	  84   8F  9A 00020 	    MOVZBL  #132, OUT_DESC					      ; 0394

		    04   AE	  10   AE  9E 00024 	    MOVAB   OUT_BUF, OUT_DESC+4					      ; 0395

				  08   AC  9F 00029 	    PUSHAB  ARGUMENTS						      ; 0400

				  04   AE  9F 0002C 	    PUSHAB  OUT_DESC						      ;

				       5B  DD 0002F 	    PUSHL   R11							      ;

				  14   AE  9F 00031 	    PUSHAB  INP_DESC						      ;

	      00000000G  9F	       04  FB 00034 	    CALLS   #4, @#SYS$FAOL					      ;

		    06   AB	  10   AE  9E 0003B 	    MOVAB   OUT_BUF, PAT$GL_OUTRAB+40				      ; 0406

				  DE   AB  9F 00040 	    PUSHAB  PAT$GL_OUTRAB					      ; 0407

	      00000000G  9F	       01  FB 00043 	    CALLS   #1, @#SYS$PUT					      ;

		         6A	       50  D0 0004A 	    MOVL    R0, PAT$GL_ERRCODE					      ;

		         09	       6A  E8 0004D 	    BLBS    PAT$GL_ERRCODE, 1$					      ; 0408

				       6A  DD 00050 	    PUSHL   PAT$GL_ERRCODE					      ; 0410

	      00000000G  00	       01  FB 00052 	    CALLS   #1, LIB$SIGNAL					      ;

			    00000000G  EF  9F 00059 1$:     PUSHAB  PAT$GL_JNLRAB					      ; 0411

				  14   AE  9F 0005F 	    PUSHAB  OUT_BUF						      ;

		         7E	       6B  3C 00062 	    MOVZWL  PAT$GL_OUTRAB+34, -(SP)				      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 03:01:27	DBB3:[PATCH.SRC]PATSIO.B32;2					Page 3-2

; Digital Equipment Corporation

;

	      00000000G  EF	       03  FB 00065 	    CALLS   #3, PAT$WRITEFILE					      ;

					   04 0006C 	    RET     							      ; 0336



; Routine Size:  109 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 03:01:27	DBB3:[PATCH.SRC]PATSIO.B32;2					Page 4

; Digital Equipment Corporation

;

;	0413	END

;	0414	ELUDOM









							    .GLOBL  LIB$SIGNAL



;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

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

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









;				LIBRARY STATISTICS

;

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

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]STARLET.L32;1		      2688         4         0       110











; Size:		109 code + 0 data bytes

; Run Time:	00:04.5

; Elapsed Time:	00:08.4

; Memory Used:	147 pages

; Compilation Complete

