

; Bliss-32 7.352	Saturday 22-AUG-1978 04:33:18	DBB3:[DEBUG.SRC]DBGSIO.B32;5					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE DBGSIO ( ADDRESSING_MODE (EXTERNAL = LONG_RELATIVE),

;	0002			IDENT = '000016') =

;	0003	BEGIN

;	0004	

;	0005	! Copyright (C) 1976

;	0006	! Digital Equipment Corporation, Maynard, Massachusetts 01754

;	0007	!

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

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

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

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

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

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

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

;	0015	!

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

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

;	0018	! Equipment Corporation.

;	0019	!

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

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

;	0022	!

;	0023	! FACILITY:	DEBUG

;	0024	!

;	0025	!++

;	0026	! FUNCTIONAL DESCRIPTION:

;	0027	!	FAO FORMATTING ROUTINE

;	0028	!

;	0029	! Version:	16

;	0030	!

;	0031	! History:

;	0032	!	Author:

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

;	0034	!

;	0035	!	Modified by:

;	0036	!		Dale Roedger, 14 June 1978:	16

;	0037	!

;	0038	! Revision history:

;	0039	!	06	11-04-77	CP	Change FAO_OUT to use RMS instead

;	0040	!					of QIO calls.

;	0041	!	07	19-04-77	CP	Add code to START_DEBUG to set

;	0042	!					start address to zero and announce

;	0043	!					end of user program if this routine

;	0044	!					is returned from. Also, display

;	0045	!					status code returned.

;	0046	!	08	20-04-77	CP	Change VAXDEB.BEG to be named

;	0047	!					DBGGEN.BEG. Also add DBGPCT.BEG

;	0048	!					for PSECT declarations.

;	0049	!	09	27-04-77	CP	Remove BEGINHERE. Move to

;	0050	!					MARS module, DBGSTART.

;	0051	!	10	05-05-77	CP	If the $PUT fails, set the exit

;	0052	!					flag to true, and exit.

;	0053	!	11	10-06-77	CP	Call SYS$EXIT with status of

;	0054	!					return from RMS instead of with

;	0055	!					no argument.



; Bliss-32 7.352	Saturday 22-AUG-1978 04:33:18	DBB3:[DEBUG.SRC]DBGSIO.B32;5					Page 1-1

; Digital Equipment Corporation

;

;	0056	!	12	05-07-77	CP	Change to new REQ files for

;	0057	!					STARLET system definitions.

;	0058	!					Change status check in $PUT

;	0059	!					to just see whether a success

;	0060	!					code was returned instead of

;	0061	!					actually comparing to RMS$_NORMAL.

;	0062	!	13	07-09-77	CP	Change REQUIRE declarations to

;	0063	!					LIBRARY declarations for system

;	0064	!					wide files.

;	0065	!	14	05-10-77	CP	If $PUT fails, signal

;	0066	!					error handler and expect sys$exit.

;	0067	!	15	27-APR-78	DAR	Modified require and library directives

;	0068	!					for native build.

;	0069	!	16	14-JUN-78	DAR	If $PUT returns RMS$_RSA a $WAIT is

;	0070	!					done and the $PUT is tried over.

;	0071	!--



; Bliss-32 7.352	Saturday 22-AUG-1978 04:33:18	DBB3:[DEBUG.SRC]DBGSIO.B32;5					Page 2

; Digital Equipment Corporation

;

;	0072	! TABLE OF CONTENTS:

;	0073	!

;	0074	FORWARD ROUTINE

;	0075		DBG$FAO_OUT: NOVALUE;		! ROUTINE TO FORMAT AND OUTPUT A STRING

;	0076	

;	0077	!

;	0078	! REQUIRE FILES:

;	0079	!

;	0080	%IF %VARIANT		! True for TEN.

;     L 0081	%THEN

;     U 0082	LIBRARY 'NEW:STARLE';

;     U 0083	

;     U 0084	REQUIRE 'DBGPCT.REQ';

;     U 0085	REQUIRE 'DBGGEN.REQ';

;     U 0086	REQUIRE 'SYSLIT.REQ';

;     U 0087	REQUIRE 'VXSMAC.REQ';

;     U 0088	%ELSE

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

;	0090	

;	0091	REQUIRE 'SRC$:DBGPCT.REQ';

;	0103	REQUIRE 'SRC$:DBGGEN.REQ';

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

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

;	0416	%FI

;	0417	

;	0418	EXTERNAL ROUTINE

;	0419		SYS$FAOL: ADDRESSING_MODE (GENERAL);	! ROUTINE TO FORMAT AN ASCII STRING

;	0420	

;	0421	EXTERNAL

;	0422		dbg$gb_exit_dbg: BYTE,			! flag that says exit from DEBUG

;	0423		DBG$GL_OUTPRAB: BLOCK [, BYTE]; 	! RAB for 'OUTPUT'



; Bliss-32 7.352	Saturday 22-AUG-1978 04:33:18	DBB3:[DEBUG.SRC]DBGSIO.B32;5					Page 3

; Digital Equipment Corporation

;

;	0424	GLOBAL ROUTINE DBG$FAO_OUT (STRING, ARGUMENTS) : NOVALUE =

;	0425	!++

;	0426	! FUNCTIONAL DESCRIPTION:

;	0427	!	SETS UP INPUT AND OUTPUT STRING DESCRIPTORS, CALLS SYS$FAOL TO

;	0428	!	FORMAT THE STRING INTO THE OUTPUT BUFFER, AND THEN PRINTS THE

;	0429	!	MESSAGE ON DBG$OUTPUT.

;	0430	!

;	0431	!	If RMS$_RSA is returned from $PUT the routine issues a $WAIT

;	0432	!	and then attempts the output again.  If that $PUT fails the

;	0433	!	returned status code is signaled to DBG$OUTPUT.

;	0434	!

;	0435	! FORMAL PARAMETERS:

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

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

;	0438	!			  FAO CONTROL STRING.

;	0439	!

;	0440	! IMPLICIT INPUTS:

;	0441	!	NONE

;	0442	!

;	0443	! IMPLICIT OUTPUTS:

;	0444	!	NONE

;	0445	!

;	0446	! ROUTINE VALUE:

;	0447	!	NOVALUE

;	0448	!

;	0449	! SIDE EFFECTS:

;	0450	!	The message is output to DBG$OUTPUT.

;	0451	!--

;	0452	

;	0453		BEGIN

;	0454		

;	0455		MAP

;	0456			STRING: REF VECTOR [, BYTE];

;	0457	

;	0458		LOCAL

;	0459			OUT_BUF: VECTOR [TTY_OUT_WIDTH, BYTE],

;	0460			INP_DESC: VECTOR [2],

;	0461			OUT_DESC: VECTOR [2],

;	0462			STATUS;

;	0463	

;	0464		INP_DESC [0] = .STRING [0];

;	0465		INP_DESC [1] = STRING [1];

;	0466		OUT_DESC [0] = TTY_OUT_WIDTH;

;	0467		OUT_DESC [1] = OUT_BUF;

;	0468		SYS$FAOL (INP_DESC, DBG$GL_OUTPRAB [RAB$W_RSZ], OUT_DESC, ARGUMENTS);

;	0469		DBG$GL_OUTPRAB [RAB$L_RBF] = OUT_BUF;

;	0470	

;	0471		STATUS = $PUT (RAB = DBG$GL_OUTPRAB);

;	0472		IF .STATUS EQL RMS$_RSA		! Record stream active error

;	0473		THEN

;	0474		    BEGIN

;	0475		    !+

;	0476		    ! Wait for current I/O to finish and re-try $PUT

;	0477		    !-

;	0478		    $WAIT (RAB = DBG$GL_OUTPRAB);



; Bliss-32 7.352	Saturday 22-AUG-1978 04:33:18	DBB3:[DEBUG.SRC]DBGSIO.B32;5					Page 3-1

; Digital Equipment Corporation

;

;	0479		    STATUS = $PUT (RAB = DBG$GL_OUTPRAB);

;	0480		    END;

;	0481	

;	0482		IF NOT .STATUS

;	0483		THEN

;	0484		    SIGNAL (.STATUS);

;	0485	

;	0486		END;





							    .TITLE  DBGSIO

							    .IDENT  \000016\



							    .GLOBL  SYS$FAOL, DBG$GB_EXIT_DBG, DBG$GL_OUTPRAB, SYS$PUT

							    .GLOBL  SYS$WAIT



							    .PSECT  DBG$CODE,NOWRT,  SHR,  PIC,0



					 0C04 00000 	    .ENTRY  DBG$FAO_OUT, Save R2,R10,R11			      ; 0424

		         5A 00000000G  9F  9E 00002 	    MOVAB   @#SYS$PUT, R10					      ;

		         5B 00000000G  EF  9E 00009 	    MOVAB   DBG$GL_OUTPRAB, R11					      ;

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

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

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

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

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

				  08   AC  9F 00029 	    PUSHAB  ARGUMENTS						      ; 0468

				  04   AE  9F 0002C 	    PUSHAB  OUT_DESC						      ;

				  22   AB  9F 0002F 	    PUSHAB  DBG$GL_OUTPRAB+34					      ;

				  14   AE  9F 00032 	    PUSHAB  INP_DESC						      ;

	      00000000G  00	       04  FB 00035 	    CALLS   #4, SYS$FAOL					      ;

		    28   AB	  10   AE  9E 0003C 	    MOVAB   OUT_BUF, DBG$GL_OUTPRAB+40				      ; 0469

				       5B  DD 00041 	    PUSHL   R11							      ; 0471

		         6A	       01  FB 00043 	    CALLS   #1, SYS$PUT						      ;

		         52	       50  D0 00046 	    MOVL    R0, STATUS						      ;

	      000182DA   8F	       52  D1 00049 	    CMPL    STATUS, #99034					      ; 0472

				       11  12 00050 	    BNEQ    1$							      ;

				       5B  DD 00052 	    PUSHL   R11							      ; 0478

	      00000000G  9F	       01  FB 00054 	    CALLS   #1, @#SYS$WAIT					      ;

				       5B  DD 0005B 	    PUSHL   R11							      ; 0479

		         6A	       01  FB 0005D 	    CALLS   #1, SYS$PUT						      ;

		         52	       50  D0 00060 	    MOVL    R0, STATUS						      ;

		         09	       52  E8 00063 1$:     BLBS    STATUS, 2$						      ; 0482

				       52  DD 00066 	    PUSHL   STATUS						      ; 0484

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

					   04 0006F 2$:     RET     							      ; 0424



; Routine Size:  112 bytes





;	0487	

;	0488	

;	0489	END

;	0490	ELUDOM



; Bliss-32 7.352	Saturday 22-AUG-1978 04:33:18	DBB3:[DEBUG.SRC]DBGSIO.B32;5					Page 3-2

; Digital Equipment Corporation

;









							    .GLOBL  LIB$SIGNAL



;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  DBG$CODE       	   112  NOWRT,  RD ,  EXE,  SHR,  LCL,  REL,  CON,  PIC,ALIGN(0)

;  $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         6         0       112













;			COMPILER INTERNAL TIMING



;	Phase	    Faults	Cpu-time      Elapsed-time

;	LEXSYN	      245	00:03.2		00:05.4

;	FLOWAN	       22	00:00.1		00:00.1

;	DELAY	       24	00:00.1		00:00.1

;	TNBIND	       25	00:00.1		00:00.1

;	CODE	       37	00:00.2		00:00.2

;	FINAL	       75	00:00.5		00:00.7

;	Total	      428	00:04.3		00:06.6



; Size:		112 code + 0 data bytes

; Run Time:	00:04.5

; Elapsed Time:	00:06.9

; Memory Used:	148 pages

; Compilation Complete

