

; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE DSPBLI (	

;	0002			IDENT = 'V01'

;	0003			) =

;	0004	BEGIN

;	0005	

;	0006	!

;	0007	! COPYRIGHT (C) 1977

;	0008	! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

;	0009	!

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

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

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

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

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

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

;	0016	! REMAIN IN DEC.

;	0017	!

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

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

;	0020	! CORPORATION.

;	0021	!

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

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

;	0024	

;	0025	!++

;	0026	! FACILITY: Performance Measurement Display Program

;	0027	!

;	0028	! ABSTRACT:

;	0029	!

;	0030	!	This module contains the user interface and initialization

;	0031	!	routines for the STARLET performance measurement display

;	0032	!	utility.

;	0033	!

;	0034	! ENVIRONMENT:

;	0035	!

;	0036	! AUTHOR: Henry M. Levy	, CREATION DATE: 28-April-1977

;	0037	!

;	0038	! MODIFIED BY:

;	0039	!

;	0040	! 	, : VERSION

;	0041	! 01	- 

;	0042	!--



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 2

; Digital Equipment Corporation

;

;	0043	!

;	0044	! SPECIAL LINKAGE FOR DISPLAY ROUTINES

;	0045	! Initialization routines are called with the Display Control Block

;	0046	! address in register 9.  For display or collection routines,

;	0047	! R10 contains the address of the current data vector.

;	0048	!

;	0049	

;	0050	LINKAGE

;	0051		INITYPE = CALL( REGISTER = 9 ) ,

;	0052		DSPTYPE = CALL( REGISTER = 9 , REGISTER = 10 ) ,

;	0053		JSBTYPE = JSB( REGISTER = 0 ) ;

;	0054	

;	0055	!

;	0056	! TABLE OF CONTENTS:

;	0057	!

;	0058	

;	0059	FORWARD ROUTINE

;	0060		ASK,			! prompt user terminal

;	0061		AVGINI: INITYPE,	! initialization for average value display

;	0062		COUNTPROCS,		! count number of processes

;	0063		CVTNUM,			! convert ascii to binary

;	0064		FAOOUT,			! format and output string

;	0065		FIND_VAL,		! look up string in table and return associated value

;	0066		HHISTINI: INITYPE,	! initialization for horizontal bar graph

;	0067		HORIZ_LINE: JSBTYPE,	! output VT55 horizontal line

;	0068		GRAPH6INI: INITYPE ,	! initialization for six value graph

;	0069		NEWTIME: JSBTYPE ,	! output new time on screen

;	0070		OUTPUT ,		! output with no carriage control or format

;	0071		POSITION ,		! position cursor

;	0072		QUERY,			! handle user interface

;	0073		TOPTEN: DSPTYPE,	! cpu time users display

;	0074		TOPTENINI: INITYPE,	! init for top 'ten' cpu time users

;	0075		TWOCOLINI: INITYPE,	! two column ascii display initialization

;	0076		USERINI: INITYPE,	! users initialization

;	0077		USERS: DSPTYPE,		! users display

;	0078		VERT_LINE: JSBTYPE,	! output VT55 vertical line

;	0079		VHISTINI: INITYPE;	! init for vertical VT55 graph

;	0080	

;	0081	!

;	0082	! INCLUDE FILES:

;	0083	!

;	0084	

;	0085	LIBRARY 'SYS$LIBRARY:LIB.L32';	! system service macros and user definitions

;	0086	

;	0087	BUILTIN EMUL ;			! define EMUL VAX hardware function

;	0088	

;	0089	!

;	0090	! MACROS:

;	0091	!

;	0092	

;	0093	MACRO

;	0094	

;	0095		!

;	0096		! Macro to check for VT55 terminal type and exit with false

;	0097		! if not.  An error message is printed informing the user.



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 2-1

; Digital Equipment Corporation

;

;	0098		!

;	0099	

;	0100		CHECK_FOR_VT55 = ( IF .VTTYPE NEQ 55

;     M 0101				   THEN

;     M 0102					BEGIN

;     M 0103					FAOOUT( NOTVT55 ) ;

;     M 0104					EMUL( UPLIT(2) , UPLIT(-10*1000*1000) ,

;     M 0105					       UPLIT(0) , INTERVAL) ;

;     M 0106					$SETIMR( DAYTIM=INTERVAL , EFN=1 );

;     M 0107					$WAITFR( EFN=1 );

;     M 0108					RETURN FALSE ;

;     M 0109					END; ) %;

;	0110	

;	0111	!

;	0112	! Data structure definition macros

;	0113	!

;	0114	

;	0115	MACRO

;	0116		DCB_L_TITLE = 0,0,32,0 %,

;	0117		DCB_L_COUNT = 4,0,32,0 %,

;	0118		DCB_L_ITMSTR = 8,0,32,0 %,

;	0119		DCB_L_INIT = 12,0,32,0 %,

;	0120		DCB_L_COLLECT = 16,0,32,0 %,

;	0121		DCB_L_DISPLAY = 20,0,32,0 %,

;	0122		DCB_W_MIN = 24,0,16,0 %,

;	0123		DCB_W_RANGE = 26,0,16,0 %,

;	0124	

;	0125		IDB_L_SNAME = 0,0,32,0 %,

;	0126		IDB_L_LNAME = 4,0,32,0 %,

;	0127		IDB_W_ISIZE = 8,0,16,0 %,

;	0128		IDB_W_TYPE = 10,0,16,0 %,

;	0129		IDB_L_ADDR = 12,0,32,0 %,

;	0130		IDB_C_LENGTH = 16 %,

;	0131	

;	0132	!

;	0133	! Counted ascii string macro

;	0134	!

;	0135	CSTRING[] = (UPLIT BYTE(%CHARCOUNT(%STRING(%REMAINING)),

;     M 0136			%STRING(%REMAINING)) )%,

;	0137	

;	0138	

;	0139	VALNAME(NAME,MIN,DCBADR)[] =  LONG(DCBADR) , BYTE(MIN)  , %ASCIC NAME ,

;     M 0140			VALNAME(%REMAINING)  %,

;	0141	

;	0142	VALTABLE[] = (UPLIT BYTE ( VALNAME(%REMAINING) ,LONG (0) ) )%;

;	0143	

;	0144	

;	0145	!

;	0146	! EQUATED SYMBOLS:

;	0147	!

;	0148	

;	0149	!

;	0150	! Error codes

;	0151	!

;	0152	



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 2-2

; Digital Equipment Corporation

;

;	0153	LITERAL

;	0154	!

;	0155	! Special command values

;	0156	!

;	0157	

;	0158		ALT_CMD = -1 ,			! change alternate character set

;	0159		CYCLE_CMD = -3 ,		! cycle through displays

;	0160		EXIT_CMD = -5 ,			! indicates user wishes to exit

;	0161		HELP_CMD = -7 ,			! user wishes instructions

;	0162		VT55_CMD = -9 ,			! set terminal to VT55

;	0163	

;	0164	!

;	0165	! Define maximum processes for TOPUSERS 

;	0166	!

;	0167	

;	0168		MAXPROCS = 200 ,

;	0169	

;	0170	!

;	0171	! Special characters and graphics codes

;	0172	!

;	0173	

;	0174		BADCMD = -2 ,			! invalid command

;	0175		NOTUNQ = -4 ,			! response not unique

;	0176		NULLRSP = -6 ,			! no user response entered

;	0177	

;	0178		BELL = 7 ,

;	0179		ESC = 27 ,

;	0180		ALTSET = ('F' ^ 8) + ESC,	! alternate graphics set

;	0181		CR = 13 ,			! carriage return

;	0182		CURSOR = ('Y' ^ 8) + ESC,	! position cursor command

;	0183		DEFAULT_INT = 3 ,		! default interval in seconds

;	0184		ERASE = ('J' ^ 8) + ESC,	! erase entire screen

;	0185		ERASEEOL = ('K' ^ 8) + ESC,	! erase to end of line

;	0186		FALSE = 0 ,

;	0187		HOME = ('H' ^ 8) + ESC,		! return cursor to top

;	0188		LF = 10 ,			! line feed

;	0189		REGSET = ('G' ^ 8) + ESC,	! normal graphics set

;	0190		STARTPOS = 32 ,			! first column or row for position

;	0191						! command is octal'40'

;	0192		TRUE = 1 ;

;	0193	

;	0194	!

;	0195	! OWN STORAGE:

;	0196	!

;	0197	

;	0198	OWN

;	0199		BARCHAR: BYTE INITIAL('a'),	! character used for graphs

;	0200		CURPIX ,			! current process index for user's display

;	0201		INSIZE ,			! size of user input

;	0202		INBUF: VECTOR[100,BYTE] , 	! user input buffer

;	0203		PRCCNT ;			! count of processes for 'USERS' display

;	0204	

;	0205	!

;	0206	! Messages

;	0207	!



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 2-3

; Digital Equipment Corporation

;

;	0208	

;	0209	BIND

;	0210	

;	0211	AVGSTR05 = CSTRING( '!3(/)!7(_)       VALUE      AVG!/'),

;	0212	AVGSTR10 = CSTRING( '!#*' , %CHAR(LF) , '!AC' ),

;	0213	AVGSTR20 = CSTRING('!8UL !8UL.!2ZL'),

;	0214	CRSTR = CSTRING(%CHAR(CR)),

;	0215	ERRMSG1 = CSTRING('INVALID DISPLAY NAME, TYPE "HELP" FOR HELP'),

;	0216	ERRMSG2 = CSTRING('COMMAND NOT UNIQUE'),

;	0217	

;	0218	CLRSTR = CSTRING(%CHAR(ESC),'H',%CHAR(ESC),'J'),

;	0219	DELSTR = CSTRING(%CHAR(ESC),'J'),

;	0220	GRAPHICS_ON = CSTRING( %CHAR(ESC) , '1' ),

;	0221	GRAPHICS_OFF = CSTRING( %CHAR(ESC) , '2' ) ,

;	0222	HLPMSG1 = CSTRING('!2(/) COMMANDS ARE:!/!/',

;     P 0223		'	CTRL-C  -  back to DISPLAY command level!/',

;     P 0224		'	C(YCLE) - cycle between displays!/',

;     P 0225		'	E(XIT) - exit display program!/',

;     P 0226		'	F(CP) - file primitive statistics'),

;	0227	HLPMSG2 = CSTRING(

;     P 0228		'	H(ELP) - type this message!/',

;     P 0229		'	I(ORATES) - I/O system rates per second!/',

;     P 0230		'	M(2) - time in processor modes (VT52)'),

;	0231	HLPMSG3 = CSTRING(

;     P 0232		'	M5 - time in processor modes (VT55)!/',

;     P 0233		'	PA(GE) - page fault statistics!/',

;     P 0234		'	PO(OL) - nonpaged pool statistics'),

;	0235	HLPMSG4 = CSTRING(

;     P 0236		'	S(2) - count of processes in scheduling states (VT52)!/',

;     P 0237		'	S5 - count of processes in scheduling states (VT55)!/',

;     P 0238		'	T(OPUSERS) - top CPU users by percent!/',

;     P 0239		'	U(SERS) - list of system processes and status!/!/'),

;	0240	HOMESTR = CSTRING(%CHAR(ESC),'H'),

;	0241	

;	0242	HSTSTR10 = CSTRING('!2(/)!39* !10<!UL!>!10<!UL!>!10<!UL!>!8<!UL!>!UL'),

;	0243	HSTSTR20 = CSTRING('+ - - - - + - - - - + - - - - + - - - - +'),

;	0244	HSTSTR30 = CSTRING('|         |         |         |         |'),

;	0245	HSTSTR40 = CSTRING( '!#*' , %CHAR(LF) , '!AC' , %CHAR(ESC) , 'K' ,%CHAR(CR)),

;	0246	IORSTR10 = CSTRING(' !4UL  !3UL.!2ZL  !3UL.!2ZL'),

;	0247	IORSTR15 = CSTRING('                        RATE     AVG   '),

;	0248	IORSTR20 = CSTRING('       NAME    VALUE    /SEC    RATE   '),

;	0249	LFSTR = CSTRING(%CHAR(LF)),

;	0250	NOTVT55 = CSTRING(' THIS DISPLAY FOR VT55''S ONLY -- TERMINAL IS NOT A VT55 '),

;	0251	PRCSTR10 = CSTRING('  PROCESSES:                   VAX/VMS PROCESSES           UPTIME:  '),

;	0252	PRCSTR15 = CSTRING(%CHAR(ESC),'Y',%CHAR(32),%CHAR(32+13),'!3UL'),

;	0253	PRCSTR20 = CSTRING('   PID      UIC    STATE  PRI    NAME       SIZE     DIOCNT  FAULTS   CPU TIME'),

;	0254	PRCSTR30 = CSTRING('!XL [!3OW,!3OW] !5AC!5UL !12AC !8<!UL/!UL!> !7UL !7UL  !%T'),

;	0255	PRCSTR40 = CSTRING('!XL [!3OW,!3OW] !5AC!5UL !12AC !8<!UL/!UL!>        SWAPPED OUT', %CHAR(ESC) , 'K' ),

;	0256	REPTSTR = UPLIT BYTE('!#*'),

;	0257	OUTMSG1 = CSTRING(%CHAR(CR),%CHAR(LF),'DISPLAY NAME? '),

;	0258	OUTMSG3 = CSTRING(%CHAR(CR),%CHAR(LF),'INTERVAL BETWEEN DISPLAYS IN SECONDS? '),

;	0259	OUTMSG4 = CSTRING(%CHAR(CR),%CHAR(LF),'UPDATE INTERVAL IN SECONDS? '),

;	0260	

;	0261	SETVT55 = CSTRING( %CHAR(ESC) , '1' , 'A' , %CHAR(%O'77') , 'I' ,

;     P 0262		 %CHAR(%O'57') , %CHAR(ESC) , '2' ),



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 2-4

; Digital Equipment Corporation

;

;	0263	TOPSTR10 = CSTRING(' [!3OW,!3OW]  !16AC!AC' ,%CHAR(ESC),'F','!#*a',%CHAR(ESC),'G',%CHAR(ESC) , 'K!/' ),

;	0264	TOPSTR20 = CSTRING(%CHAR(ESC),'K!/'),

;	0265	VHSTSTR20 = CSTRING( '!UL' ),

;	0266	

;	0267	STATELIST = UPLIT ( 	CSTRING('BAD') ,

;	0268				CSTRING('COLPG') ,

;	0269				CSTRING('MWAIT') ,

;	0270				CSTRING('CEF') ,

;	0271				CSTRING('PFW') ,

;	0272				CSTRING('LEF') ,

;	0273				CSTRING('LEFO') ,

;	0274				CSTRING('HIB') ,

;	0275				CSTRING('HIBO') ,

;	0276				CSTRING('SUSP') ,

;	0277				CSTRING('SUSPO') ,

;	0278				CSTRING('FPG') ,

;	0279				CSTRING('COM') ,

;	0280				CSTRING('COMO') ,

;	0281				CSTRING('CUR')

;	0282				);

;	0283	

;	0284	

;	0285	

;	0286	!

;	0287	! EXTERNAL REFERENCES:

;	0288	!

;	0289	

;	0290	EXTERNAL

;	0291		CURDCB ,		! variable contaning address of current DCB

;	0292		CYCLE_TIME ,		! interval between display cycling for CYCLE 

;	0293		FCPDCB ,		! display control block for file primitive display

;	0294		MODEDCB ,		! display control block for MODES display

;	0295		MODE2DCB,		! display control block for alternate display

;	0296		MODE3DCB,		!

;	0297		PAGEDCB,		! display control block for page display

;	0298		POOLDCB,		! display control block for pool display

;	0299		FAODSC: VECTOR[,LONG] ,	! fao control string descriptor

;	0300		FAOSTK: VECTOR[,LONG] ,	! fao parameter space

;	0301		IORATEDCB ,		! control block for I/O rates display

;	0302		NAMESTR ,		! fao string for output of long names

;	0303		PERFTABLE: VECTOR[,LONG] , ! list of performance item descriptors

;	0304		INTERVAL ,		! quadword update interval

;	0305		TITLESTR ,		! title fao control string

;	0306		TTCHAN: WORD ,		! terminal channel number

;	0307		SCH$GL_MAXPIX: ADDRESSING_MODE(LONG_RELATIVE) , ! max process index

;	0308		SCH$GL_PCBVEC: ADDRESSING_MODE(LONG_RELATIVE) , ! address of PCB pointer list

;	0309		S2DCB ,			! control block for horizontal states display

;	0310		STATEDCB ,		! control block for states display

;	0311		SYSINTRVL ,		! 32 bit interval since last display in 100ns units

;	0312		TOPTENDCB ,		! control block for TOPTEN display

;	0313		USERDCB ,		! control block for users display

;	0314		USRCPUTIM ,		! process cpu time for users display

;	0315		USRDIRIO ,		! process direct I/O's

;	0316		USRPAGEFLTS ,		! process page faults for users display

;	0317		VTTYPE ,		! terminal type indicator



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 2-5

; Digital Equipment Corporation

;

;	0318		VT55XINCR ;		! incr from bar to bar

;	0319	

;	0320	EXTERNAL LITERAL

;	0321		AVG_DISP ,		! display type for average and value display

;	0322		HHIST_DISP ,		! display type for horiz. bar graph

;	0323		MAXBARS ,		! max characters on horizontal histogram

;	0324		VT55CWIDTH,		! max characters on bottom axis

;	0325		VTHEIGHT,		! height of screen

;	0326		VTWIDTH ;		! width of screen

;	0327	

;	0328	EXTERNAL ROUTINE

;	0329		CYCLE ,			! initialization for display cycling

;	0330		GETPHDINFO ,		! routine to get process header informaton

;	0331		UPTIME: JSBTYPE ;	! compute uptime in 64 bit system format

;	0332	!

;	0333	! This table contains the ascii names for the various

;	0334	! displays and the associated dsisplay control block addresses.

;	0335	!

;	0336	

;	0337	BIND

;	0338	

;	0339	!

;	0340	!	Table of command names and associated values.  If the value

;	0341	!	is positive, it is the DCB address for that display.  If

;	0342	!	negative, then it is not a command , but a special request.

;	0343	!

;	0344	

;	0345		DISPLAY_TABLE = VALTABLE(

;     P 0346			'ALT' , 2 , ALT_CMD ,

;     P 0347			'CYCLE' , 1 , CYCLE_CMD ,

;     P 0348			'EXIT' , 1 , EXIT_CMD ,

;     P 0349			'FCP' , 1 , FCPDCB ,

;     P 0350			'HELP' , 1 , HELP_CMD ,

;     P 0351			'?' , 1 , HELP_CMD ,

;     P 0352			'IORATES' , 1 , IORATEDCB ,

;     P 0353			'M2' , 1 ,  MODE2DCB ,

;     P 0354			'M5' , 2 , MODE3DCB ,

;     P 0355			'PAGE' , 2 , PAGEDCB ,

;     P 0356			'POOL' , 2 , POOLDCB ,

;     P 0357			'S2' , 1 , S2DCB ,

;     P 0358			'S5' , 2 , STATEDCB ,

;     P 0359			'TOPUSERS' , 1 , TOPTENDCB ,

;     P 0360			'USERS' , 1 , USERDCB , 

;     P 0361			'VT55' , 4 , VT55_CMD 

;     P 0362		) ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3

; Digital Equipment Corporation

;

;	0363	GLOBAL ROUTINE QUERY =

;	0364	BEGIN

;	0365	

;	0366	!++

;	0367	!

;	0368	! FUNCTIONAL DESCRIPTION:

;	0369	!

;	0370	!	Handle the user interface to DISPLAY.  Set up the parameters

;	0371	!	for the execution phase of the display.

;	0372	!

;	0373	! INPUTS:

;	0374	!

;	0375	!	none

;	0376	!

;	0377	! IMPLICIT INPUTS:

;	0378	!

;	0379	!	INBUF - global input buffer for user responses

;	0380	!	INSIZE - contains length of input string

;	0381	!

;	0382	! OUTPUTS:

;	0383	!

;	0384	!	INTERVAL - quadword interval delta time

;	0385	!

;	0386	! IMPLICIT OUTPUTS:

;	0387	!

;	0388	!	none

;	0389	!

;	0390	! ROUTINE VALUE:

;	0391	!

;	0392	!	TRUE -> continue processing

;	0393	!	FALSE -> user exit requested

;	0394	!

;	0395	! SIDE EFFECTS:

;	0396	!

;	0397	!	none

;	0398	!--

;	0399	

;	0400	LOCAL

;	0401		CODE,					! return code holder

;	0402		DSPTYPE;				! display type indicator

;	0403	

;	0404	

;	0405	!

;	0406	! Determine the name for this display.

;	0407	!

;	0408	

;	0409	WHILE TRUE					! loop until defined

;	0410	DO

;	0411	    BEGIN

;	0412	    ASK( OUTMSG1 ) ;				! output question

;	0413	

;	0414	    !

;	0415	    ! Lookup the command in the command table and take proper action

;	0416	    ! on value returned.

;	0417	    !



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3-1

; Digital Equipment Corporation

;

;	0418	

;	0419	    CURDCB = FIND_VAL( .INSIZE , INBUF , DISPLAY_TABLE ) ;

;	0420	

;	0421	 	SELECTONE .CURDCB OF

;	0422	 	SET

;	0423	

;	0424		[ALT_CMD]:   ! user has different alternate character set

;	0425	

;	0426		    BARCHAR = ( IF .BARCHAR EQL 'a' THEN 's' ELSE 'a' );

;	0427	

;	0428		[BADCMD]:    ! invalid command given , report error

;	0429	

;	0430		    FAOOUT( ERRMSG1 ) ;

;	0431	

;	0432		[CYCLE_CMD]: ! cycle through displays for demonstration

;	0433	

;	0434		    BEGIN

;	0435		    LOCAL TEMP ;			! local for update interval

;	0436		    ASK( OUTMSG3 ) ;			! get interval between displays

;	0437		    IF .INSIZE EQL 0

;	0438	 	    THEN TEMP = 30			! take default if none specified

;	0439		    ELSE TEMP = CVTNUM( .INSIZE , INBUF ) ; ! else convert to binary

;	0440		    EMUL( TEMP , UPLIT(-10*1000*1000) , UPLIT(0) , CYCLE_TIME ) ; 

;	0441		    CYCLE() ;

;	0442		    RETURN TRUE ;

;	0443		    END;

;	0444	

;	0445		[EXIT_CMD]:  ! user requested exit

;	0446	

;	0447		    RETURN FALSE ;			! return exit status

;	0448	

;	0449		[HELP_CMD]:  ! user wishes more information

;	0450	

;	0451		    ( FAOOUT( HLPMSG1 ) ;

;	0452		      FAOOUT( HLPMSG2 ) ;

;	0453		      FAOOUT( HLPMSG3 ) ;

;	0454		      FAOOUT( HLPMSG4 )

;	0455	

;	0456		    );

;	0457	

;	0458		[NOTUNQ]:   ! not enough characters supplied, report

;	0459	

;	0460		    FAOOUT( ERRMSG2 ) ;

;	0461	

;	0462		[NULLRSP]:  ! null response, ignore

;	0463	

;	0464		    TRUE ;

;	0465	

;	0466		[VT55_CMD]: ! set terminal to VT55

;	0467	

;	0468			VTTYPE = 55 ;			! note terminal type

;	0469	

;	0470		[OTHERWISE]: ! must be a display, exit this loop

;	0471	

;	0472		    EXITLOOP ;				! continue normal processing



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3-2

; Digital Equipment Corporation

;

;	0473	

;	0474		TES;

;	0475	

;	0476	

;	0477	    END;					! end of while loop

;	0478	

;	0479	!

;	0480	! The display and display type have been defined

;	0481	! Determine the update interval.

;	0482	!

;	0483	

;	0484	ASK( OUTMSG4 ) ;				! get interval magnitude

;	0485	IF .INSIZE EQL 0				! did user default?

;	0486	THEN

;	0487	    INTERVAL = DEFAULT_INT 			! yes use default value

;	0488	ELSE

;	0489	    INTERVAL = CVTNUM( .INSIZE , INBUF  ) ;	! no, use his value

;	0490	

;	0491	IF .INTERVAL EQL 0 THEN INTERVAL = 1 ;		! force minimal interval to 1

;	0492	EMUL( INTERVAL , UPLIT(-10*1000*1000) , UPLIT(0) , INTERVAL ) ; ! convert to delta time

;	0493	RETURN TRUE;

;	0494	END;





							    .TITLE  DSPBLI

							    .IDENT  \V01\



							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00000 P.AAA:  .BYTE   33							      ;

					      00001 	    .ASCII  \!3(/)!7(_)       VALUE      AVG!/\			      ;

					      00022	    .BLKB   2

					      00024 P.AAB:  .BYTE   7							      ;

					      00025 	    .ASCII  \!#*\<10>\!AC\					      ;

					      0002C P.AAC:  .BYTE   14							      ;

					      0002D 	    .ASCII  \!8UL !8UL.!2ZL\					      ;

					      0003B	    .BLKB   1

					      0003C P.AAD:  .BYTE   1							      ;

					      0003D 	    .ASCII  <13>						      ;

					      0003E	    .BLKB   2

					      00040 P.AAE:  .BYTE   42							      ;

					      00041 	    .ASCII  \INVALID DISPLAY NAME, TYPE "HELP" FOR HELP\	      ;

					      0006B	    .BLKB   1

					      0006C P.AAF:  .BYTE   18							      ;

					      0006D 	    .ASCII  \COMMAND NOT UNIQUE\				      ;

					      0007F	    .BLKB   1

					      00080 P.AAG:  .BYTE   4							      ;

					      00081 	    .ASCII  <27>\H\<27>\J\					      ;

					      00085	    .BLKB   3

					      00088 P.AAH:  .BYTE   2							      ;

					      00089 	    .ASCII  <27>\J\						      ;

					      0008B	    .BLKB   1

					      0008C P.AAI:  .BYTE   2							      ;

					      0008D 	    .ASCII  <27>\1\						      ;

					      0008F	    .BLKB   1



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3-3

; Digital Equipment Corporation

;

					      00090 P.AAJ:  .BYTE   2							      ;

					      00091 	    .ASCII  <27>\2\						      ;

					      00093	    .BLKB   1

					      00094 P.AAK:  .BYTE   -89							      ;

					      00095 	    .ASCII  \!2(/) COMMANDS ARE:!/!/\<9>\CTRL-C  -  back to DISPL\    ;

					      000C5 	    .ASCII  \AY command level!/\<9>\C(YCLE) - cycle between displ\    ;

					      000F5 	    .ASCII  \ays!/\<9>\E(XIT) - exit display program!/\<9>\F(CP\      ;

					      0011F 	    .ASCII  \) - file primitive statistics\			      ;

					      0013C P.AAL:  .BYTE   109							      ;

					      0013D 	    .ASCII  <9>\H(ELP) - type this message!/\<9>\I(ORATES) - I\       ;

					      00168 	    .ASCII  \/O system rates per second!/\<9>\M(2) - time in proc\    ;

					      00198 	    .ASCII  \essor modes (VT52)\				      ;

					      001AA	    .BLKB   2

					      001AC P.AAM:  .BYTE   105							      ;

					      001AD 	    .ASCII  <9>\M5 - time in processor modes (VT55)!/\<9>\PA(G\       ;

					      001D8 	    .ASCII  \E) - page fault statistics!/\<9>\PO(OL) - nonpaged p\    ;

					      00208 	    .ASCII  \ool statistics\					      ;

					      00216	    .BLKB   2

					      00218 P.AAN:  .BYTE   -56							      ;

					      00219 	    .ASCII  <9>\S(2) - count of processes in scheduling states (\     ;

					      0024A 	    .ASCII  \VT52)!/\<9>\S5 - count of processes in scheduling st\    ;

					      0027A 	    .ASCII  \ates (VT55)!/\<9>\T(OPUSERS) - top CPU users by perc\    ;

					      002AA 	    .ASCII  \ent!/\<9>\U(SERS) - list of system processes and sta\    ;

					      002DA 	    .ASCII  \tus!/!/\						      ;

					      002E1	    .BLKB   3

					      002E4 P.AAO:  .BYTE   2							      ;

					      002E5 	    .ASCII  <27>\H\						      ;

					      002E7	    .BLKB   1

					      002E8 P.AAP:  .BYTE   48							      ;

					      002E9 	    .ASCII  \!2(/)!39* !10<!UL!>!10<!UL!>!10<!UL!>!8<!UL!>!UL\	      ;

					      00319	    .BLKB   3

					      0031C P.AAQ:  .BYTE   41							      ;

					      0031D 	    .ASCII  \+ - - - - + - - - - + - - - - + - - - - +\		      ;

					      00346	    .BLKB   2

					      00348 P.AAR:  .BYTE   41							      ;

					      00349 	    .ASCII  \|         |         |         |         |\		      ;

					      00372	    .BLKB   2

					      00374 P.AAS:  .BYTE   10							      ;

					      00375 	    .ASCII  \!#*\<10>\!AC\<27>\K\<13>				      ;

					      0037F	    .BLKB   1

					      00380 P.AAT:  .BYTE   27							      ;

					      00381 	    .ASCII  \ !4UL  !3UL.!2ZL  !3UL.!2ZL\			      ;

					      0039C P.AAU:  .BYTE   39							      ;

					      0039D 	    .ASCII  \                        RATE     AVG   \		      ;

					      003C4 P.AAV:  .BYTE   39							      ;

					      003C5 	    .ASCII  \       NAME    VALUE    /SEC    RATE   \		      ;

					      003EC P.AAW:  .BYTE   1							      ;

					      003ED 	    .ASCII  <10>						      ;

					      003EE	    .BLKB   2

					      003F0 P.AAX:  .BYTE   56							      ;

					      003F1 	    .ASCII  \ THIS DISPLAY FOR VT55'S ONLY -- TERMINAL IS NOT A VT5\  ;

					      00427 	    .ASCII  \5 \						      ;

					      00429	    .BLKB   3

					      0042C P.AAY:  .BYTE   68							      ;

					      0042D 	    .ASCII  \  PROCESSES:                   VAX/VMS PROCESSES      \  ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3-4

; Digital Equipment Corporation

;

					      00463 	    .ASCII  \     UPTIME:  \					      ;

					      00471	    .BLKB   3

					      00474 P.AAZ:  .BYTE   8							      ;

					      00475 	    .ASCII  <27>\Y -!3UL\					      ;

					      0047D	    .BLKB   3

					      00480 P.ABA:  .BYTE   78							      ;

					      00481 	    .ASCII  \   PID      UIC    STATE  PRI    NAME       SIZE     D\  ;

					      004B7 	    .ASCII  \IOCNT  FAULTS   CPU TIME\				      ;

					      004CF	    .BLKB   1

					      004D0 P.ABB:  .BYTE   58							      ;

					      004D1 	    .ASCII  \!XL [!3OW,!3OW] !5AC!5UL !12AC !8<!UL/!UL!> !7UL !7UL \  ;

					      00507 	    .ASCII  \ !%T\						      ;

					      0050B	    .BLKB   1

					      0050C P.ABC:  .BYTE   64							      ;

					      0050D 	    .ASCII  \!XL [!3OW,!3OW] !5AC!5UL !12AC !8<!UL/!UL!>        SWA\  ;

					      00543 	    .ASCII  \PPED OUT\<27>\K\					      ;

					      0054D	    .BLKB   3

					      00550 P.ABD:  .ASCII  \!#*\						      ;

					      00553	    .BLKB   1

					      00554 P.ABE:  .BYTE   16							      ;

					      00555 	    .ASCII  <13><10>\DISPLAY NAME? \				      ;

					      00565	    .BLKB   3

					      00568 P.ABF:  .BYTE   40							      ;

					      00569 	    .ASCII  <13><10>\INTERVAL BETWEEN DISPLAYS IN SECONDS? \	      ;

					      00591	    .BLKB   3

					      00594 P.ABG:  .BYTE   30							      ;

					      00595 	    .ASCII  <13><10>\UPDATE INTERVAL IN SECONDS? \		      ;

					      005B3	    .BLKB   1

					      005B4 P.ABH:  .BYTE   8							      ;

					      005B5 	    .ASCII  <27>\1A?I/\<27>\2\					      ;

					      005BD	    .BLKB   3

					      005C0 P.ABI:  .BYTE   34							      ;

					      005C1 	    .ASCII  \ [!3OW,!3OW]  !16AC!AC\<27>\F!#*a\<27>\G\<27>\K!/\       ;

					      005E3	    .BLKB   1

					      005E4 P.ABJ:  .BYTE   4							      ;

					      005E5 	    .ASCII  <27>\K!/\						      ;

					      005E9	    .BLKB   3

					      005EC P.ABK:  .BYTE   3							      ;

					      005ED 	    .ASCII  \!UL\						      ;

					      005F0 P.ABM:  .BYTE   3							      ;

					      005F1 	    .ASCII  \BAD\						      ;

					      005F4 P.ABN:  .BYTE   5							      ;

					      005F5 	    .ASCII  \COLPG\						      ;

					      005FA	    .BLKB   2

					      005FC P.ABO:  .BYTE   5							      ;

					      005FD 	    .ASCII  \MWAIT\						      ;

					      00602	    .BLKB   2

					      00604 P.ABP:  .BYTE   3							      ;

					      00605 	    .ASCII  \CEF\						      ;

					      00608 P.ABQ:  .BYTE   3							      ;

					      00609 	    .ASCII  \PFW\						      ;

					      0060C P.ABR:  .BYTE   3							      ;

					      0060D 	    .ASCII  \LEF\						      ;

					      00610 P.ABS:  .BYTE   4							      ;

					      00611 	    .ASCII  \LEFO\						      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3-5

; Digital Equipment Corporation

;

					      00615	    .BLKB   3

					      00618 P.ABT:  .BYTE   3							      ;

					      00619 	    .ASCII  \HIB\						      ;

					      0061C P.ABU:  .BYTE   4							      ;

					      0061D 	    .ASCII  \HIBO\						      ;

					      00621	    .BLKB   3

					      00624 P.ABV:  .BYTE   4							      ;

					      00625 	    .ASCII  \SUSP\						      ;

					      00629	    .BLKB   3

					      0062C P.ABW:  .BYTE   5							      ;

					      0062D 	    .ASCII  \SUSPO\						      ;

					      00632	    .BLKB   2

					      00634 P.ABX:  .BYTE   3							      ;

					      00635 	    .ASCII  \FPG\						      ;

					      00638 P.ABY:  .BYTE   3							      ;

					      00639 	    .ASCII  \COM\						      ;

					      0063C P.ABZ:  .BYTE   4							      ;

					      0063D 	    .ASCII  \COMO\						      ;

					      00641	    .BLKB   3

					      00644 P.ACA:  .BYTE   3							      ;

					      00645 	    .ASCII  \CUR\						      ;

					      00648 P.ABL:  .ADDRESS  P.ABM , P.ABN , P.ABO , P.ABP , P.ABQ , P.ABR , -       ;

								    P.ABS , P.ABT , P.ABU , P.ABV , P.ABW , P.ABX , P.ABY , - ;

								    P.ABZ , P.ACA					      ;

					      00684 P.ACB:  .LONG   -1							      ;

					      00688 	    .BYTE   2							      ;

					      00689 	    .ASCII  <3>\ALT\						      ;

					      0068D 	    .LONG   -3							      ;

					      00691 	    .BYTE   1							      ;

					      00692 	    .ASCII  <5>\CYCLE\						      ;

					      00698 	    .LONG   -5							      ;

					      0069C 	    .BYTE   1							      ;

					      0069D 	    .ASCII  <4>\EXIT\						      ;

					      006A2 	    .ADDRESS  FCPDCB						      ;

					      006A6 	    .BYTE   1							      ;

					      006A7 	    .ASCII  <3>\FCP\						      ;

					      006AB 	    .LONG   -7							      ;

					      006AF 	    .BYTE   1							      ;

					      006B0 	    .ASCII  <4>\HELP\						      ;

					      006B5 	    .LONG   -7							      ;

					      006B9 	    .BYTE   1							      ;

					      006BA 	    .ASCII  <1>\?\						      ;

					      006BC 	    .ADDRESS  IORATEDCB						      ;

					      006C0 	    .BYTE   1							      ;

					      006C1 	    .ASCII  <7>\IORATES\					      ;

					      006C9 	    .ADDRESS  MODE2DCB						      ;

					      006CD 	    .BYTE   1							      ;

					      006CE 	    .ASCII  <2>\M2\						      ;

					      006D1 	    .ADDRESS  MODE3DCB						      ;

					      006D5 	    .BYTE   2							      ;

					      006D6 	    .ASCII  <2>\M5\						      ;

					      006D9 	    .ADDRESS  PAGEDCB						      ;

					      006DD 	    .BYTE   2							      ;

					      006DE 	    .ASCII  <4>\PAGE\						      ;

					      006E3 	    .ADDRESS  POOLDCB						      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3-6

; Digital Equipment Corporation

;

					      006E7 	    .BYTE   2							      ;

					      006E8 	    .ASCII  <4>\POOL\						      ;

					      006ED 	    .ADDRESS  S2DCB						      ;

					      006F1 	    .BYTE   1							      ;

					      006F2 	    .ASCII  <2>\S2\						      ;

					      006F5 	    .ADDRESS  STATEDCB						      ;

					      006F9 	    .BYTE   2							      ;

					      006FA 	    .ASCII  <2>\S5\						      ;

					      006FD 	    .ADDRESS  TOPTENDCB						      ;

					      00701 	    .BYTE   1							      ;

					      00702 	    .ASCII  <8>\TOPUSERS\					      ;

					      0070B 	    .ADDRESS  USERDCB						      ;

					      0070F 	    .BYTE   1							      ;

					      00710 	    .ASCII  <5>\USERS\						      ;

					      00716 	    .LONG   -9							      ;

					      0071A 	    .BYTE   4							      ;

					      0071B 	    .ASCII  <4>\VT55\						      ;

					      00720 	    .BYTE   0							      ;

					      00721 	    .LONG   0							      ;

					      00725	    .BLKB   3

					      00728 P.ACC:  .LONG   -10000000						      ;

					      0072C P.ACD:  .LONG   0							      ;

					      00730 P.ACE:  .LONG   -10000000						      ;

					      00734 P.ACF:  .LONG   0							      ;



							    .PSECT  $OWN$,NOEXE,2



					      00000 BARCHAR:.ASCII  \a\							      ;

					      00001	    .BLKB   3

					      00004 CURPIX: .BLKB   4

					      00008 INSIZE: .BLKB   4

					      0000C INBUF:  .BLKB   100

					      00070 PRCCNT: .BLKB   4



						    AVGSTR05=		P.AAA

						    AVGSTR10=		P.AAB

						    AVGSTR20=		P.AAC

						    CRSTR=		P.AAD

						    ERRMSG1=		P.AAE

						    ERRMSG2=		P.AAF

						    CLRSTR=		P.AAG

						    DELSTR=		P.AAH

						    GRAPHICS_ON=	P.AAI

						    GRAPHICS_OFF=	P.AAJ

						    HLPMSG1=		P.AAK

						    HLPMSG2=		P.AAL

						    HLPMSG3=		P.AAM

						    HLPMSG4=		P.AAN

						    HOMESTR=		P.AAO

						    HSTSTR10=		P.AAP

						    HSTSTR20=		P.AAQ

						    HSTSTR30=		P.AAR

						    HSTSTR40=		P.AAS

						    IORSTR10=		P.AAT

						    IORSTR15=		P.AAU



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3-7

; Digital Equipment Corporation

;

						    IORSTR20=		P.AAV

						    LFSTR=		P.AAW

						    NOTVT55=		P.AAX

						    PRCSTR10=		P.AAY

						    PRCSTR15=		P.AAZ

						    PRCSTR20=		P.ABA

						    PRCSTR30=		P.ABB

						    PRCSTR40=		P.ABC

						    REPTSTR=		P.ABD

						    OUTMSG1=		P.ABE

						    OUTMSG3=		P.ABF

						    OUTMSG4=		P.ABG

						    SETVT55=		P.ABH

						    TOPSTR10=		P.ABI

						    TOPSTR20=		P.ABJ

						    VHSTSTR20=		P.ABK

						    STATELIST=		P.ABL

						    DISPLAY_TABLE=	P.ACB

							    .GLOBL  CURDCB, CYCLE_TIME, FCPDCB, MODEDCB, MODE2DCB

							    .GLOBL  MODE3DCB, PAGEDCB, POOLDCB, FAODSC, FAOSTK, IORATEDCB

							    .GLOBL  NAMESTR, PERFTABLE, INTERVAL, TITLESTR, TTCHAN

							    .GLOBL  SCH$GL_MAXPIX, SCH$GL_PCBVEC, S2DCB, STATEDCB

							    .GLOBL  SYSINTRVL, TOPTENDCB, USERDCB, USRCPUTIM, USRDIRIO

							    .GLOBL  USRPAGEFLTS, VTTYPE, VT55XINCR, AVG_DISP, HHIST_DISP

							    .GLOBL  MAXBARS, VT55CWIDTH, VTHEIGHT, VTWIDTH, CYCLE

							    .GLOBL  GETPHDINFO, UPTIME



							    .PSECT  $CODE$,NOWRT,2



					 0F0C 00000 	    .ENTRY  QUERY, Save R2,R3,R8,R9,R10,R11			      ; 0363

		         58	0000V  CF  9E 00002 	    MOVAB   ASK, R8						      ;

		         59	0000V  CF  9E 00007 	    MOVAB   FAOOUT, R9						      ;

		         5A	0000G  CF  9E 0000C 	    MOVAB   INTERVAL, R10					      ;

		         5B	0000'  CF  9E 00011 	    MOVAB   INBUF, R11						      ;

				0000'  CF  9F 00016 1$:     PUSHAB  OUTMSG1						      ;

		         68	       01  FB 0001A 	    CALLS   #1, ASK						      ; 0412

				0000'  CF  9F 0001D 	    PUSHAB  DISPLAY_TABLE					      ; 0363

				       5B  DD 00021 	    PUSHL   R11							      ; 0419

				  FC   AB  DD 00023 	    PUSHL   INSIZE						      ;

		  0000V  CF	       03  FB 00026 	    CALLS   #3, FIND_VAL					      ;

		  0000G  CF	       50  D0 0002B 	    MOVL    R0, CURDCB						      ;

		         52	0000G  CF  D0 00030 	    MOVL    CURDCB, R2						      ; 0421

	      FFFFFFFF   8F	       52  D1 00035 	    CMPL    R2, #-1						      ;

				       17  12 0003C 	    BNEQ    4$							      ;

		    61   8F	  F4   AB  91 0003E 	    CMPB    BARCHAR, #97					      ; 0426

				       06  12 00043 	    BNEQ    2$							      ;

		         50	  73   8F  9A 00045 	    MOVZBL  #115, R0						      ;

				       04  11 00049 	    BRB     3$							      ;

		         50	  61   8F  9A 0004B 2$:     MOVZBL  #97, R0						      ;

		    F4   AB	       50  90 0004F 3$:     MOVB    R0, BARCHAR						      ;

				       C1  11 00053 	    BRB     1$							      ; 0421

	      FFFFFFFE   8F	       52  D1 00055 4$:     CMPL    R2, #-2						      ;

				       06  12 0005C 	    BNEQ    5$							      ;

				0000'  CF  9F 0005E 	    PUSHAB  ERRMSG1						      ; 0363

				       77  11 00062 	    BRB     11$							      ; 0430



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3-8

; Digital Equipment Corporation

;

	      FFFFFFFD   8F	       52  D1 00064 5$:     CMPL    R2, #-3						      ; 0421

				       31  12 0006B 	    BNEQ    8$							      ;

				0000'  CF  9F 0006D 	    PUSHAB  OUTMSG3						      ; 0363

		         68	       01  FB 00071 	    CALLS   #1, ASK						      ; 0436

		         50	  FC   AB  D0 00074 	    MOVL    INSIZE, R0						      ; 0437

				       05  12 00078 	    BNEQ    6$							      ;

		         53	       1E  D0 0007A 	    MOVL    #30, TEMP						      ; 0438

				       0C  11 0007D 	    BRB     7$							      ; 0437

				0801   8F  BB 0007F 6$:     PUSHR   #^M<R0,R11>						      ; 0439

		  0000V  CF	       02  FB 00083 	    CALLS   #2, CVTNUM						      ;

		         53	       50  D0 00088 	    MOVL    R0, TEMP						      ;

    0000'  CF	  0000'  CF	       53  7A 0008B 7$:     EMUL    TEMP, P.ACC, P.ACD, CYCLE_TIME			      ; 0440

				0000G  CF     00093									      ;

		  0000G  CF	       00  FB 00096 	    CALLS   #0, CYCLE						      ; 0441

				     008A  31 0009B 	    BRW     18$							      ; 0442

	      FFFFFFFB   8F	       52  D1 0009E 8$:     CMPL    R2, #-5						      ; 0421

				       03  12 000A5 	    BNEQ    9$							      ;

				     0082  31 000A7 	    BRW     19$							      ;

	      FFFFFFF9   8F	       52  D1 000AA 9$:     CMPL    R2, #-7						      ;

				       1B  12 000B1 	    BNEQ    10$							      ;

				0000'  CF  9F 000B3 	    PUSHAB  HLPMSG1						      ; 0363

		         69	       01  FB 000B7 	    CALLS   #1, FAOOUT						      ; 0451

				0000'  CF  9F 000BA 	    PUSHAB  HLPMSG2						      ; 0363

		         69	       01  FB 000BE 	    CALLS   #1, FAOOUT						      ; 0452

				0000'  CF  9F 000C1 	    PUSHAB  HLPMSG3						      ; 0363

		         69	       01  FB 000C5 	    CALLS   #1, FAOOUT						      ; 0453

				0000'  CF  9F 000C8 	    PUSHAB  HLPMSG4						      ; 0363

				       0D  11 000CC 	    BRB     11$							      ; 0454

	      FFFFFFFC   8F	       52  D1 000CE 10$:    CMPL    R2, #-4						      ; 0421

				       09  12 000D5 	    BNEQ    12$							      ;

				0000'  CF  9F 000D7 	    PUSHAB  ERRMSG2						      ; 0363

		         69	       01  FB 000DB 11$:    CALLS   #1, FAOOUT						      ; 0460

				       17  11 000DE 	    BRB     13$							      ; 0421

	      FFFFFFFA   8F	       52  D1 000E0 12$:    CMPL    R2, #-6						      ;

				       0E  13 000E7 	    BEQL    13$							      ;

	      FFFFFFF7   8F	       52  D1 000E9 	    CMPL    R2, #-9						      ;

				       08  12 000F0 	    BNEQ    14$							      ;

		  0000G  CF	       37  D0 000F2 	    MOVL    #55, VTTYPE						      ; 0468

				     FF1C  31 000F7 13$:    BRW     1$							      ; 0421

				0000'  CF  9F 000FA 14$:    PUSHAB  OUTMSG4						      ; 0363

		         68	       01  FB 000FE 	    CALLS   #1, ASK						      ; 0484

		         50	  FC   AB  D0 00101 	    MOVL    INSIZE, R0						      ; 0485

				       05  12 00105 	    BNEQ    15$							      ;

		         6A	       03  D0 00107 	    MOVL    #3, INTERVAL					      ; 0487

				       0C  11 0010A 	    BRB     16$							      ; 0485

				0801   8F  BB 0010C 15$:    PUSHR   #^M<R0,R11>						      ; 0489

		  0000V  CF	       02  FB 00110 	    CALLS   #2, CVTNUM						      ;

		         6A	       50  D0 00115 	    MOVL    R0, INTERVAL					      ;

				       6A  D5 00118 16$:    TSTL    INTERVAL						      ; 0491

				       03  12 0011A 	    BNEQ    17$							      ;

		         6A	       01  D0 0011C 	    MOVL    #1, INTERVAL					      ;

    0000'  CF	  0000'  CF	       6A  7A 0011F 17$:    EMUL    INTERVAL, P.ACE, P.ACF, INTERVAL			      ; 0492

				       6A     00127									      ;

		         50	       01  D0 00128 18$:    MOVL    #1, R0						      ; 0493

					   04 0012B 	    RET     							      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 3-9

; Digital Equipment Corporation

;

				       50  D4 0012C 19$:    CLRL    R0							      ; 0363

					   04 0012E 	    RET     							      ;



; Routine Size:  303 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 4

; Digital Equipment Corporation

;

;	0495	ROUTINE FIND_VAL( SIZE , BUFFER , TABLE ) =

;	0496	BEGIN

;	0497	

;	0498	!++

;	0499	!

;	0500	! FUNCTIONAL DESCRIPTION:

;	0501	!

;	0502	!	Locate the associated value for the string in the supplied buffer.

;	0503	!

;	0504	! INPUTS:

;	0505	!

;	0506	!	SIZE - length of the input buffer

;	0507	!	BUFFER - address of string buffer

;	0508	!	TABLE - address of the table to scan for the string

;	0509	!

;	0510	! IMPLICIT INPUTS:

;	0511	!

;	0512	!	none

;	0513	!

;	0514	! OUTPUTS:

;	0515	!

;	0516	!	none

;	0517	!

;	0518	! IMPLICIT OUTPUTS:

;	0519	!

;	0520	!	none

;	0521	!

;	0522	! ROUTINE VALUE:

;	0523	!

;	0524	!	NULLRSP -> zero length string supplied

;	0525	!	BADCMD -> name not found

;	0526	!	NOTUNQ -> name not unique

;	0527	!	value -> associated value for located name

;	0528	!

;	0529	! SIDE EFFECTS:

;	0530	!

;	0531	!	none

;	0532	!

;	0533	!--

;	0534	

;	0535	LOCAL

;	0536		POINTER,				! pointer to current location

;	0537							! in supplied table

;	0538		SYMLEN,					! length of current string

;	0539							! in table

;	0540		SYMMIN ,				! min acceptable name length

;	0541		SYMVAL ;				! value of current string

;	0542	

;	0543	IF .SIZE LEQ 0 THEN RETURN NULLRSP ;		! exit if no response

;	0544	POINTER = .TABLE ;				! point to table

;	0545	

;	0546	WHILE TRUE 

;	0547	DO

;	0548	    BEGIN

;	0549	    SYMVAL = .(.POINTER) ;			! get symbol value



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 4-1

; Digital Equipment Corporation

;

;	0550	    POINTER = .POINTER + 4 ;			! point to cstring

;	0551	    IF .SYMVAL EQL 0 THEN RETURN BADCMD ;	! leave if value is zero

;	0552	    SYMMIN = .(.POINTER)<0,8> ;			! get min characters

;	0553	    POINTER = .POINTER + 1 ;

;	0554	    SYMLEN = .(.POINTER)<0,8> ;			! pick up string length

;	0555	    POINTER = .POINTER + 1 ;			! point to string itself

;	0556	    IF CH$EQL( .SIZE , .BUFFER ,

;	0557			.SIZE , .POINTER )

;	0558	    THEN

;	0559		EXITLOOP

;	0560		    ( IF .SIZE GEQ .SYMMIN		! check for unique name

;	0561		      THEN TRUE				! name ok , leave with value

;	0562		      ELSE SYMVAL = NOTUNQ 		! not enough chars.

;	0563		    ) ;

;	0564	    POINTER = .POINTER + .SYMLEN ;		! else scan to next value

;	0565	    END;

;	0566	

;	0567	!

;	0568	! SYMVAL either has the associated value, or error code if

;	0569	! the table was completely scanned.

;	0570	!

;	0571	

;	0572	RETURN .SYMVAL ;

;	0573	END;











					 01FC 0012F FIND_VAL:

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

		         55	  04   AC  D0 00131 	    MOVL    SIZE, R5						      ; 0543

				       04  14 00135 	    BGTR    1$							      ;

		         50	       06  CE 00137 	    MNEGL   #6, R0						      ;

					   04 0013A 	    RET     							      ;

		         54	  0C   AC  D0 0013B 1$:     MOVL    TABLE, POINTER					      ; 0544

		         56	       84  D0 0013F 2$:     MOVL    (POINTER)+, SYMVAL					      ; 0549

				       04  12 00142 	    BNEQ    3$							      ; 0551

		         50	       02  CE 00144 	    MNEGL   #2, R0						      ;

					   04 00147 	    RET     							      ;

		         58	       84  9A 00148 3$:     MOVZBL  (POINTER)+, SYMMIN					      ; 0552

		         57	       84  9A 0014B 	    MOVZBL  (POINTER)+, SYMLEN					      ; 0554

	   64	    08   BC	       55  29 0014E 	    CMPC3   R5, @BUFFER, (POINTER)				      ; 0556

				       0A  12 00153 	    BNEQ    4$							      ;

		         58	       55  D1 00155 	    CMPL    R5, SYMMIN						      ; 0560

				       0A  18 00158 	    BGEQ    5$							      ;

		         56	       04  CE 0015A 	    MNEGL   #4, SYMVAL						      ; 0562

				       05  11 0015D 	    BRB     5$							      ; 0559

		         54	       57  C0 0015F 4$:     ADDL2   SYMLEN, POINTER					      ; 0564

				       DB  11 00162 	    BRB     2$							      ; 0546

		         50	       56  D0 00164 5$:     MOVL    SYMVAL, R0						      ; 0572

					   04 00167 	    RET     							      ; 0495



; Routine Size:  57 bytes





; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 4-2

; Digital Equipment Corporation

;





; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 5

; Digital Equipment Corporation

;

;	0574	GLOBAL ROUTINE AVGINI( DCB ) : INITYPE =

;	0575	BEGIN

;	0576	

;	0577	!++

;	0578	!

;	0579	! FUNCTIONAL DESCRIPTION:

;	0580	!

;	0581	!	Initialization for display of current and average values.

;	0582	!	This is an ASCII display and involves no graphics.

;	0583	!

;	0584	! INPUTS:

;	0585	!

;	0586	!	DCB - address of display control block for this display

;	0587	!

;	0588	! IMPLICIT INPUTS:

;	0589	!

;	0590	!	FAODSC - descriptor for the fao string which is used at runtime

;	0591	!		 to output the values.  The fao string is built by this

;	0592	!		 routine.

;	0593	!

;	0594	! OUTPUTS:

;	0595	!

;	0596	!	none

;	0597	!

;	0598	! IMPLICIT OUTPUTS:

;	0599	!

;	0600	!	The buffer pointed to by FAODSC is filled, and the descriptor

;	0601	!	contains the correct length.  

;	0602	!

;	0603	! ROUTINE VALUE:

;	0604	!

;	0605	!	none

;	0606	!

;	0607	! SIDE EFFECTS:

;	0608	!

;	0609	!	none

;	0610	!--

;	0611	

;	0612	LOCAL

;	0613		BLANKS,					! number of leading blanks for title

;	0614		ITEMS,					! count of data items

;	0615		ITMHGT,					! spacing for output lines

;	0616		ITMSTR,					! pointer to first item token

;	0617		LFCOUNT,				! number of line feeds to output

;	0618		POINTER,				! pointer into fao control string buffer

;	0619		TITLE,					! address of title cstring

;	0620		XPOS,					! column address

;	0621		YPOS;					! row address

;	0622	MAP

;	0623		DCB: REF BLOCK[,BYTE] ,			! address dcb structure

;	0624		ITMSTR: REF VECTOR[,BYTE] ;		! item byte string

;	0625	

;	0626	TITLE = .DCB[DCB_L_TITLE] ;			! get title cstring address

;	0627	BLANKS = (VTWIDTH - .(.TITLE)<0,8>)/2 ;		! compute leading spaces to center

;	0628	



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 5-1

; Digital Equipment Corporation

;

;	0629	!

;	0630	! Clear the screen, output the title and the header line.

;	0631	!

;	0632	

;	0633	FAOOUT( TITLESTR , .BLANKS , .TITLE ) ;

;	0634	FAOOUT( AVGSTR05 );				! output column headings

;	0635	

;	0636	ITEMS = .DCB[DCB_L_COUNT] ;			! number of items to output

;	0637	ITMHGT = (VTHEIGHT-5)/.ITEMS ;			! compute lines per item

;	0638	LFCOUNT = 0 ;					! no leading line feeds on first time through

;	0639	ITMSTR = .DCB[DCB_L_ITMSTR] ;			! get address of item byte string

;	0640	

;	0641	INCR I FROM 0 TO .ITEMS-1

;	0642	DO

;	0643	    BEGIN

;	0644	    LOCAL

;	0645		IDB: REF BLOCK[,BYTE] ,

;	0646		NAME ,

;	0647		NEXT ;

;	0648	

;	0649	    !

;	0650	    ! Find the IDB for this item.  Output the long name

;	0651	    ! string, preceeded by the correct number of line feeds to 

;	0652	    ! space them out evenly.

;	0653	    !

;	0654	

;	0655	    NEXT = .ITMSTR[.I] ;				! get next token

;	0656	    IDB = PERFTABLE[ .NEXT * (IDB_C_LENGTH/4) ] ;	! addr of IDB

;	0657	    NAME = .IDB[IDB_L_LNAME] ;				! address of name string

;	0658	    FAOOUT( AVGSTR10 , .LFCOUNT , .NAME );		! output name string

;	0659	    LFCOUNT = .ITMHGT - 1 ;				! line feeds for all but first one

;	0660								! subtract one for LF from previous output

;	0661	    END;

;	0662	

;	0663	!

;	0664	! Build the FAO control string to insert the value

;	0665	! and average value for the items at run time.

;	0666	!

;	0667	

;	0668	YPOS = STARTPOS + 6 ;				! first row

;	0669	XPOS = STARTPOS + 59 ;				! starting column

;	0670	POINTER = .FAODSC[1] ;				! address of FAO buffer

;	0671	

;	0672	INCR I FROM 0 TO .ITEMS-1

;	0673	DO

;	0674	    BEGIN

;	0675	    (.POINTER)<0,16> = CURSOR ;			! insert position command

;	0676	    ( POINTER = .POINTER + 2 )<0,8> = .YPOS ;	! insert row number

;	0677	    ( POINTER = .POINTER + 1 )<0,8> = .XPOS ;	! insert column number

;	0678	    YPOS = .YPOS + .ITMHGT ;			! next Y position

;	0679	    POINTER = .POINTER + 1 ;			! update to skip last inserted byte

;	0680	    CH$MOVE( .AVGSTR20<0,8> , AVGSTR20+1 , .POINTER ) ; ! move conversion control string

;	0681	    POINTER = .POINTER + .AVGSTR20<0,8> ;	! update pointer

;	0682	    END;

;	0683	



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 5-2

; Digital Equipment Corporation

;

;	0684	!

;	0685	! Insert length of created string into descriptor.

;	0686	!

;	0687	

;	0688	FAODSC[0] = .POINTER - .FAODSC[1] ;

;	0689	RETURN TRUE ;					! return with no errors

;	0690	END;











					 0FFC 00168 	    .ENTRY  AVGINI, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 0574

		         51	       69  D0 0016A 	    MOVL    (DCB), TITLE					      ; 0626

		         50	       61  9A 0016D 	    MOVZBL  (TITLE), R0						      ; 0627

	   50 00000000G  8F	       50  C3 00170 	    SUBL3   R0, #VTWIDTH, R0					      ;

		         50	       02  C6 00178 	    DIVL2   #2, BLANKS						      ;

				       03  BB 0017B 	    PUSHR   #^M<R0,R1>						      ; 0633

				0000G  CF  9F 0017D 	    PUSHAB  TITLESTR						      ;

		  0000V  CF	       03  FB 00181 	    CALLS   #3, FAOOUT						      ;

				0000'  CF  9F 00186 	    PUSHAB  AVGSTR05						      ; 0574

		  0000V  CF	       01  FB 0018A 	    CALLS   #1, FAOOUT						      ; 0634

		         5A	  04   A9  D0 0018F 	    MOVL    4(DCB), ITEMS					      ; 0636

	   56 00000000G  8F	       5A  C7 00193 	    DIVL3   ITEMS, #VTHEIGHT-5, ITMHGT				      ; 0637

				       54  D4 0019B 	    CLRL    LFCOUNT						      ; 0638

		         52	  08   A9  D0 0019D 	    MOVL    8(DCB), ITMSTR					      ; 0639

		         53	       01  CE 001A1 	    MNEGL   #1, I						      ; 0641

				       22  11 001A4 	    BRB     2$							      ;

		         50	     6342  9A 001A6 1$:     MOVZBL  (I)[ITMSTR], NEXT					      ; 0655

		         50	       04  C4 001AA 	    MULL2   #4, R0						      ; 0656

		         50	0000GCF40  DE 001AD 	    MOVAL   PERFTABLE[R0], IDB					      ;

		         50	  04   A0  D0 001B3 	    MOVL    4(IDB), NAME					      ; 0657

				       50  DD 001B7 	    PUSHL   NAME						      ; 0658

				       54  DD 001B9 	    PUSHL   LFCOUNT						      ;

				0000'  CF  9F 001BB 	    PUSHAB  AVGSTR10						      ; 0574

		  0000V  CF	       03  FB 001BF 	    CALLS   #3, FAOOUT						      ; 0658

		         54	  FF   A6  9E 001C4 	    MOVAB   -1(ITMHGT), LFCOUNT					      ; 0659

	   DA	         53	       5A  F2 001C8 2$:     AOBLSS  ITEMS, I, 1$					      ; 0641

		         57	       26  D0 001CC 	    MOVL    #38, YPOS						      ; 0668

		         5B	  5B   8F  9A 001CF 	    MOVZBL  #91, XPOS						      ; 0669

		         59	0000G  CF  D0 001D3 	    MOVL    FAODSC+4, POINTER					      ; 0670

		         58	       01  CE 001D8 	    MNEGL   #1, I						      ; 0672

				       21  11 001DB 	    BRB     4$							      ;

		         89	591B   8F  B0 001DD 3$:     MOVW    #22811, (POINTER)+					      ; 0675

		         89	       57  90 001E2 	    MOVB    YPOS, (POINTER)+					      ; 0676

		         89	       5B  90 001E5 	    MOVB    XPOS, (POINTER)+					      ; 0677

		         57	       56  C0 001E8 	    ADDL2   ITMHGT, YPOS					      ; 0678

		         50	0000'  CF  9A 001EB 	    MOVZBL  AVGSTR20, R0					      ; 0680

	   69	  0000'  CF	       50  28 001F0 	    MOVC3   R0, AVGSTR20+1, (POINTER)				      ;

		         50	0000'  CF  9A 001F6 	    MOVZBL  AVGSTR20, R0					      ; 0681

		         59	       50  C0 001FB 	    ADDL2   R0, POINTER						      ;

	   DB	         58	       5A  F2 001FE 4$:     AOBLSS  ITEMS, I, 3$					      ; 0672

    0000G  CF	         59	0000G  CF  C3 00202 	    SUBL3   FAODSC+4, POINTER, FAODSC				      ; 0688

		         50	       01  D0 0020A 	    MOVL    #1, R0						      ; 0689

					   04 0020D 	    RET     							      ; 0574



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 5-3

; Digital Equipment Corporation

;



; Routine Size:  166 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 6

; Digital Equipment Corporation

;

;	0691	GLOBAL ROUTINE TWOCOLINI( DCB ) : INITYPE =

;	0692	BEGIN

;	0693	

;	0694	!++

;	0695	!

;	0696	! FUNCTIONAL DESCRIPTION:

;	0697	!

;	0698	!	Initialization for two column display of system rates.

;	0699	!

;	0700	! INPUTS:

;	0701	!

;	0702	!	DCB - address of display control block

;	0703	!

;	0704	! IMPLICIT INPUTS:

;	0705	!

;	0706	!	FAODSC - descriptor for the fao buffer which is built for

;	0707	!		use at runtime

;	0708	!

;	0709	! OUTPUTS:

;	0710	!

;	0711	!	none

;	0712	!

;	0713	! IMPLICIT OUTPUTS:

;	0714	!

;	0715	!	Buffer pointed to by FAODSC is filled with a control string

;	0716	!

;	0717	! ROUTINE VALUE:

;	0718	!

;	0719	!	None

;	0720	!

;	0721	! SIDE EFFECTS:

;	0722	!

;	0723	!	none

;	0724	!--

;	0725	

;	0726	LOCAL

;	0727		BLANKS,				! number of leading blanks for title

;	0728		ITEMS,				! number of data items

;	0729		ITMHGT ,			! spacing for output lines

;	0730		ITMSTR ,			! pointer to first item token

;	0731		POINTER ,			! pointer to fao control string

;	0732		TITLE ,				! address of title string

;	0733		XPOS ,				! column address

;	0734		YPOS ;				! row address

;	0735	MAP

;	0736		DCB: REF BLOCK[,BYTE] ,

;	0737		ITMSTR: REF VECTOR[,BYTE] ;

;	0738	

;	0739	TITLE = .DCB[DCB_L_TITLE] ;		! get title cstring

;	0740	BLANKS = (VTWIDTH - .(.TITLE)<0,8>)/2 ;	! compute leading spaces

;	0741	FAOOUT( TITLESTR , .BLANKS , .TITLE );	! output title

;	0742	POSITION( 0 , 3 ) ;			! output header line

;	0743	OUTPUT( IORSTR15 ) ; OUTPUT ( IORSTR15 ) ; ! output both column headings

;	0744	POSITION( 0 , 4 ) ;

;	0745	OUTPUT( IORSTR20 ) ; OUTPUT ( IORSTR20 ) ; ! output both column headings



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 6-1

; Digital Equipment Corporation

;

;	0746	

;	0747	ITEMS = .DCB[DCB_L_COUNT] ;		! number of items in display

;	0748	ITMHGT = (VTHEIGHT-6)/((.ITEMS+1)/2) ;	! compute item spacing

;	0749	ITMSTR = .DCB[DCB_L_ITMSTR] ;		! address byte string

;	0750	

;	0751	YPOS = 6 ;				! first column and row

;	0752	XPOS = 1 ;

;	0753	

;	0754	!

;	0755	! Loop through item list outputting the name string for each item

;	0756	! and building the fao control string to output the data.

;	0757	!

;	0758	

;	0759	POINTER = .FAODSC[1] ;			! init fao buffer pointer

;	0760	

;	0761	INCR I FROM 0 TO .ITEMS-1

;	0762	DO

;	0763	    BEGIN

;	0764	    LOCAL	

;	0765		IDB: REF BLOCK[,BYTE] ,

;	0766		NAME ,

;	0767		NEXT ;

;	0768	

;	0769	    NEXT = .ITMSTR[.I] ;		! get next byte descriptor

;	0770	    IDB = PERFTABLE[.NEXT*(IDB_C_LENGTH/4)] ; ! address item descriptor block

;	0771	    NAME = .IDB[IDB_L_LNAME] ;		! get long name string

;	0772	    POSITION( .XPOS , .YPOS ) ;		! position to proper row and column

;	0773	    OUTPUT( .NAME ) ;			! output name string

;	0774	

;	0775	    !

;	0776	    ! Build up the fao control string

;	0777	    !

;	0778	

;	0779	    (.POINTER)<0,16> = CURSOR ;		! cursor position command

;	0780	    (POINTER = .POINTER+2)<0,8> = .YPOS+32 ; ! insert row to position to

;	0781	    (POINTER = .POINTER+1)<0,8> = .XPOS+14+32; ! insert column position

;	0782	    POINTER = .POINTER + 1 ;		! skip xpos byte

;	0783	    CH$MOVE( .IORSTR10<0,8> , IORSTR10+1 , .POINTER ) ; ! move fao control information

;	0784	    POINTER = .POINTER + .IORSTR10<0,8> ; ! update pointer

;	0785	

;	0786	    YPOS = .YPOS + .ITMHGT ;		! next yposition

;	0787	    IF .I EQL ((.ITEMS+1)/2)-1		! check for second column

;	0788	    THEN

;	0789		BEGIN

;	0790		YPOS = 6 ;			! reset to top row

;	0791		XPOS = 40 ;			! go to second column

;	0792		END ;

;	0793	    END;

;	0794	

;	0795	!

;	0796	! Insert length of created string into descriptor

;	0797	!

;	0798	

;	0799	FAODSC[0] = .POINTER - .FAODSC[1] ;

;	0800	RETURN TRUE;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 6-2

; Digital Equipment Corporation

;

;	0801	END;











					 0FFC 0020E 	    .ENTRY  TWOCOLINI, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 0691

		         5E	       0C  C2 00210 	    SUBL2   #12, SP						      ;

		         51	       69  D0 00213 	    MOVL    (DCB), TITLE					      ; 0739

		         50	       61  9A 00216 	    MOVZBL  (TITLE), R0						      ; 0740

	   50 00000000G  8F	       50  C3 00219 	    SUBL3   R0, #VTWIDTH, R0					      ;

		         50	       02  C6 00221 	    DIVL2   #2, BLANKS						      ;

				       03  BB 00224 	    PUSHR   #^M<R0,R1>						      ; 0741

				0000G  CF  9F 00226 	    PUSHAB  TITLESTR						      ;

		  0000V  CF	       03  FB 0022A 	    CALLS   #3, FAOOUT						      ;

				       03  DD 0022F 	    PUSHL   #3							      ; 0742

				       7E  D4 00231 	    CLRL    -(SP)						      ;

		  0000V  CF	       02  FB 00233 	    CALLS   #2, POSITION					      ;

				0000'  CF  9F 00238 	    PUSHAB  IORSTR15						      ; 0691

		  0000V  CF	       01  FB 0023C 	    CALLS   #1, OUTPUT						      ; 0743

				0000'  CF  9F 00241 	    PUSHAB  IORSTR15						      ; 0691

		  0000V  CF	       01  FB 00245 	    CALLS   #1, OUTPUT						      ; 0743

				       04  DD 0024A 	    PUSHL   #4							      ; 0744

				       7E  D4 0024C 	    CLRL    -(SP)						      ;

		  0000V  CF	       02  FB 0024E 	    CALLS   #2, POSITION					      ;

				0000'  CF  9F 00253 	    PUSHAB  IORSTR20						      ; 0691

		  0000V  CF	       01  FB 00257 	    CALLS   #1, OUTPUT						      ; 0745

				0000'  CF  9F 0025C 	    PUSHAB  IORSTR20						      ; 0691

		  0000V  CF	       01  FB 00260 	    CALLS   #1, OUTPUT						      ; 0745

		         6E	  04   A9  D0 00265 	    MOVL    4(DCB), ITEMS					      ; 0747

	   57	         6E	       01  C1 00269 	    ADDL3   #1, ITEMS, R7					      ; 0748

		         57	       02  C6 0026D 	    DIVL2   #2, R7						      ;

      04   AE 00000000G  8F	       57  C7 00270 	    DIVL3   R7, #VTHEIGHT-6, ITMHGT				      ;

		         56	  08   A9  D0 00279 	    MOVL    8(DCB), ITMSTR					      ; 0749

		         58	       06  D0 0027D 	    MOVL    #6, YPOS						      ; 0751

		         5B	       01  D0 00280 	    MOVL    #1, XPOS						      ; 0752

		         59	0000G  CF  D0 00283 	    MOVL    FAODSC+4, POINTER					      ; 0759

		         5A	       01  CE 00288 	    MNEGL   #1, I						      ; 0761

				       56  11 0028B 	    BRB     2$							      ;

		         50	     6A46  9A 0028D 1$:     MOVZBL  (I)[ITMSTR], NEXT					      ; 0769

		         50	       04  C4 00291 	    MULL2   #4, R0						      ; 0770

		         50	0000GCF40  DE 00294 	    MOVAL   PERFTABLE[R0], IDB					      ;

		         52	  04   A0  D0 0029A 	    MOVL    4(IDB), NAME					      ; 0771

				       58  DD 0029E 	    PUSHL   YPOS						      ; 0772

				       5B  DD 002A0 	    PUSHL   XPOS						      ;

		  0000V  CF	       02  FB 002A2 	    CALLS   #2, POSITION					      ;

				       52  DD 002A7 	    PUSHL   NAME						      ; 0773

		  0000V  CF	       01  FB 002A9 	    CALLS   #1, OUTPUT						      ;

		         89	591B   8F  B0 002AE 	    MOVW    #22811, (POINTER)+					      ; 0779

	   89	         58	       20  81 002B3 	    ADDB3   #32, YPOS, (POINTER)+				      ; 0780

	   89	         5B	       2E  81 002B7 	    ADDB3   #46, XPOS, (POINTER)+				      ; 0781

		         50	0000'  CF  9A 002BB 	    MOVZBL  IORSTR10, R0					      ; 0783

	   69	  0000'  CF	       50  28 002C0 	    MOVC3   R0, IORSTR10+1, (POINTER)				      ;

		         50	0000'  CF  9A 002C6 	    MOVZBL  IORSTR10, R0					      ; 0784

		         59	       50  C0 002CB 	    ADDL2   R0, POINTER						      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 6-3

; Digital Equipment Corporation

;

		         58	  04   AE  C0 002CE 	    ADDL2   ITMHGT, YPOS					      ; 0786

		    08   AE	  FF   A7  9E 002D2 	    MOVAB   -1(R7), 8(SP)					      ; 0787

		    08   AE	       5A  D1 002D7 	    CMPL    I, 8(SP)						      ;

				       06  12 002DB 	    BNEQ    2$							      ;

		         58	       06  D0 002DD 	    MOVL    #6, YPOS						      ; 0790

		         5B	       28  D0 002E0 	    MOVL    #40, XPOS						      ; 0791

	   A6	         5A	       6E  F2 002E3 2$:     AOBLSS  ITEMS, I, 1$					      ; 0761

    0000G  CF	         59	0000G  CF  C3 002E7 	    SUBL3   FAODSC+4, POINTER, FAODSC				      ; 0799

		         50	       01  D0 002EF 	    MOVL    #1, R0						      ; 0800

					   04 002F2 	    RET     							      ; 0691



; Routine Size:  229 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 7

; Digital Equipment Corporation

;

;	0802	GLOBAL ROUTINE HHISTINI ( DCB ) : INITYPE =

;	0803	BEGIN

;	0804	

;	0805	!++

;	0806	!

;	0807	! FUNCTIONAL DESCRIPTION:

;	0808	!

;	0809	!	Initialization routine for horizontal vbar graph

;	0810	!	display.  The title, and all of the item descriptors

;	0811	!	are output, as well as a grid for the bar graph

;	0812	!

;	0813	! INPUTS:

;	0814	!

;	0815	!	DCB - address of display control block

;	0816	!

;	0817	! IMPLICIT INPUTS:

;	0818	!

;	0819	!	FAODSC - descriptor for the fao string which is used at

;	0820	!		 runtime.  The string is built in the buffer

;	0821	!		 described by this descriptor.

;	0822	!

;	0823	! OUTPUTS;

;	0824	!

;	0825	!	none

;	0826	!

;	0827	! IMPLICIT OUTPUTS:

;	0828	!

;	0829	!	none

;	0830	!

;	0831	! ROUTINE VALUE:

;	0832	!

;	0833	!	none

;	0834	!

;	0835	! SIDE EFFECTS:

;	0836	!

;	0837	!	none

;	0838	!

;	0839	!--

;	0840	

;	0841	LOCAL

;	0842		BLANKS,					! leading blanks for title string

;	0843		ITEMS ,					! count of data items

;	0844		ITMHGT,					! spacing for output lines

;	0845		ITMSTR,					! ponter to first item token

;	0846		LBLINCR,				! number increment for axis label

;	0847		LFCOUNT,				! number of line feeds to output

;	0848		MIN,					! lowest value in range

;	0849		POINTER,				! pointer into fao control string buffer

;	0850		RANGE,					! range for graph

;	0851		TITLE,					! address of title cstring

;	0852		XPOS,					! column address

;	0853		YPOS;					! row address

;	0854	MAP 

;	0855		DCB: REF BLOCK[,BYTE] ,

;	0856		ITMSTR: REF VECTOR[,BYTE] ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 7-1

; Digital Equipment Corporation

;

;	0857	

;	0858	

;	0859	!

;	0860	! Output the display title and the labels for the grid.

;	0861	!

;	0862	

;	0863	TITLE = .DCB[DCB_L_TITLE] ;			! address of title cstring

;	0864	BLANKS = (VTWIDTH - .(.TITLE)<0,8>)/2 ;		! number of leading blanks

;	0865	FAOOUT( TITLESTR , .BLANKS , .TITLE ) ;		! output title, clear screen

;	0866	

;	0867	!

;	0868	! Compute the labels for the grid.  There are five points to be labeled.

;	0869	!

;	0870	

;	0871	MIN = .DCB[DCB_W_MIN] ;				! get minimum value

;	0872	RANGE = .DCB[DCB_W_RANGE] ;			! get size of graph

;	0873	LBLINCR = .RANGE/4 ;				! increments for label

;	0874	FAOOUT( HSTSTR10 , .MIN , .MIN+.LBLINCR , .MIN+2*.LBLINCR ,

;	0875		.MIN+3*.LBLINCR , .MIN+.RANGE );		! output labels

;	0876	

;	0877	!

;	0878	! Fill out the screen with the grid.

;	0879	!

;	0880	

;	0881	POSITION( 39 , 4 ) ;				! position to top line

;	0882	OUTPUT( HSTSTR20 ) ;				! output top grid line

;	0883	INCR I FROM 0 TO (VTHEIGHT-6)			! intermediate lines

;	0884	DO

;	0885	    BEGIN

;	0886	    POSITION( 39 , .I+5 ) ;			! position

;	0887	    OUTPUT( HSTSTR30 ) ;			! output grid line

;	0888	    END;

;	0889	POSITION( 39 , VTHEIGHT-1) ;			! position for last line

;	0890	OUTPUT( HSTSTR20 ) ;				! output bottom line

;	0891	OUTPUT( HOMESTR ) ;				! return cursor home

;	0892	

;	0893	!

;	0894	! Now output the name strings for the items to be graphed.

;	0895	! 

;	0896	

;	0897	ITEMS = .DCB[DCB_L_COUNT] ;			! number of items to be graphed

;	0898	IF .ITEMS EQL 0 THEN RETURN TRUE ;		! leave if no names to write

;	0899	ITMHGT = (VTHEIGHT - 5 )/ .ITEMS ;		! compute item spacing

;	0900	LFCOUNT = 5 ;					! position of first line

;	0901	ITMSTR = .DCB[DCB_L_ITMSTR] ;			! get address of item keys

;	0902	

;	0903	INCR I FROM 0 TO .ITEMS-1

;	0904	DO

;	0905	    BEGIN

;	0906	

;	0907	    !

;	0908	    ! Find the IDB for each item.  Output the long name

;	0909	    ! string, preceeded by the correct number of line feeds.

;	0910	    !

;	0911	



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 7-2

; Digital Equipment Corporation

;

;	0912	    LOCAL

;	0913		IDB: REF BLOCK[,BYTE] ,

;	0914	    	NAME ,

;	0915		NEXT ;

;	0916	

;	0917	    NEXT = .ITMSTR[.I] ;			! get next token

;	0918	    IDB = PERFTABLE[ .NEXT * (IDB_C_LENGTH/4) ] ; ! address of IDB

;	0919	    NAME = .IDB[IDB_L_LNAME] ;			! address of name cstring

;	0920	    FAOOUT( HSTSTR40 , .LFCOUNT , .NAME ) ;	! output string

;	0921	    LFCOUNT = .ITMHGT - 1 ;			! preceeding line feeds for next item

;	0922	    END;

;	0923	

;	0924	!

;	0925	! Now build the fao control string to output the graph

;	0926	! at run time.  The control string contains for each line:

;	0927	!	position to correct row and column

;	0928	!	output 'n' bar characters

;	0929	!	delete to end of line

;	0930	!

;	0931	

;	0932	YPOS = 6 + STARTPOS ;				! starting row

;	0933	XPOS = 40 + STARTPOS  ;				! starting column ( always )

;	0934	POINTER = .FAODSC[1] ;				! get address of buffer for fao string

;	0935	(.POINTER) <0,16> = ALTSET ;			! alternate graphics

;	0936	POINTER = .POINTER + 2 ;			! skip to next position

;	0937	

;	0938	INCR I FROM 0 TO .ITEMS -1

;	0939	DO

;	0940	    BEGIN

;	0941	    (.POINTER)<0,16> = CURSOR ;			! insert position command

;	0942	    (POINTER = .POINTER + 2 )<0,8> = .YPOS ;	! next Y position

;	0943	    (POINTER = .POINTER + 1 )<0,8> = .XPOS ;	! X position

;	0944	    YPOS = .YPOS + .ITMHGT ;			! compute next Y position

;	0945	    POINTER = .POINTER + 1 ;			! next buffer position

;	0946	    CH$MOVE( 3 , REPTSTR , .POINTER ) ;		! move repeat control

;	0947	    (POINTER = .POINTER + 3)<0,8> = .BARCHAR ;	! insert literal character to use for graph

;	0948	    (POINTER = .POINTER+1)<0,16> = ERASEEOL ;	! delete rest of line

;	0949	    POINTER = .POINTER + 2 ;			! update pointer

;	0950	    END;

;	0951	

;	0952	(.POINTER)<0,16> = REGSET ;			! restore normal char set

;	0953	POINTER = .POINTER + 2 ;			! update position

;	0954	FAODSC[0] = .POINTER - .FAODSC[1] ;		! update control string descriptor

;	0955	RETURN TRUE;					! return with no errors

;	0956	END;











					 0FFC 002F3 	    .ENTRY  HHISTINI, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 0802

		         51	       69  D0 002F5 	    MOVL    (DCB), TITLE					      ; 0863

		         50	       61  9A 002F8 	    MOVZBL  (TITLE), R0						      ; 0864

	   50 00000000G  8F	       50  C3 002FB 	    SUBL3   R0, #VTWIDTH, R0					      ;

		         50	       02  C6 00303 	    DIVL2   #2, BLANKS						      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 7-3

; Digital Equipment Corporation

;

				       03  BB 00306 	    PUSHR   #^M<R0,R1>						      ; 0865

				0000G  CF  9F 00308 	    PUSHAB  TITLESTR						      ;

		  0000V  CF	       03  FB 0030C 	    CALLS   #3, FAOOUT						      ;

		         50	  18   A9  3C 00311 	    MOVZWL  24(DCB), MIN					      ; 0871

		         52	  1A   A9  3C 00315 	    MOVZWL  26(DCB), RANGE					      ; 0872

	   51	         52	       04  C7 00319 	    DIVL3   #4, RANGE, LBLINCR					      ; 0873

				     6240  9F 0031D 	    PUSHAB  (RANGE)[MIN]					      ; 0875

	   52	         51	       03  C5 00320 	    MULL3   #3, LBLINCR, R2					      ;

				     6240  9F 00324 	    PUSHAB  (R2)[MIN]						      ;

				     6041  3F 00327 	    PUSHAW  (MIN)[LBLINCR]					      ; 0874

				     6140  9F 0032A 	    PUSHAB  (LBLINCR)[MIN]					      ;

				       50  DD 0032D 	    PUSHL   MIN							      ;

				0000'  CF  9F 0032F 	    PUSHAB  HSTSTR10						      ; 0802

		  0000V  CF	       06  FB 00333 	    CALLS   #6, FAOOUT						      ; 0874

				       04  DD 00338 	    PUSHL   #4							      ; 0881

				       27  DD 0033A 	    PUSHL   #39							      ;

		  0000V  CF	       02  FB 0033C 	    CALLS   #2, POSITION					      ;

				0000'  CF  9F 00341 	    PUSHAB  HSTSTR20						      ; 0802

		  0000V  CF	       01  FB 00345 	    CALLS   #1, OUTPUT						      ; 0882

		         52	       01  CE 0034A 	    MNEGL   #1, I						      ; 0883

				       13  11 0034D 	    BRB     2$							      ;

				  05   A2  9F 0034F 1$:     PUSHAB  5(I)						      ; 0886

				       27  DD 00352 	    PUSHL   #39							      ;

		  0000V  CF	       02  FB 00354 	    CALLS   #2, POSITION					      ;

				0000'  CF  9F 00359 	    PUSHAB  HSTSTR30						      ; 0802

		  0000V  CF	       01  FB 0035D 	    CALLS   #1, OUTPUT						      ; 0887

	   E5	         52 00000000G  8F  F3 00362 2$:     AOBLEQ  #VTHEIGHT-6, I, 1$					      ; 0883

			    00000000G  8F  DD 0036A 	    PUSHL   #VTHEIGHT-1						      ; 0889

				       27  DD 00370 	    PUSHL   #39							      ;

		  0000V  CF	       02  FB 00372 	    CALLS   #2, POSITION					      ;

				0000'  CF  9F 00377 	    PUSHAB  HSTSTR20						      ; 0802

		  0000V  CF	       01  FB 0037B 	    CALLS   #1, OUTPUT						      ; 0890

				0000'  CF  9F 00380 	    PUSHAB  HOMESTR						      ; 0802

		  0000V  CF	       01  FB 00384 	    CALLS   #1, OUTPUT						      ; 0891

		         58	  04   A9  D0 00389 	    MOVL    4(DCB), ITEMS					      ; 0897

				       03  12 0038D 	    BNEQ    3$							      ; 0898

				     0082  31 0038F 	    BRW     8$							      ;

	   56 00000000G  8F	       58  C7 00392 3$:     DIVL3   ITEMS, #VTHEIGHT-5, ITMHGT				      ; 0899

		         54	       05  D0 0039A 	    MOVL    #5, LFCOUNT						      ; 0900

		         52	  08   A9  D0 0039D 	    MOVL    8(DCB), ITMSTR					      ; 0901

		         53	       01  CE 003A1 	    MNEGL   #1, I						      ; 0903

				       22  11 003A4 	    BRB     5$							      ;

		         50	     6342  9A 003A6 4$:     MOVZBL  (I)[ITMSTR], NEXT					      ; 0917

		         50	       04  C4 003AA 	    MULL2   #4, R0						      ; 0918

		         50	0000GCF40  DE 003AD 	    MOVAL   PERFTABLE[R0], IDB					      ;

		         50	  04   A0  D0 003B3 	    MOVL    4(IDB), NAME					      ; 0919

				       50  DD 003B7 	    PUSHL   NAME						      ; 0920

				       54  DD 003B9 	    PUSHL   LFCOUNT						      ;

				0000'  CF  9F 003BB 	    PUSHAB  HSTSTR40						      ; 0802

		  0000V  CF	       03  FB 003BF 	    CALLS   #3, FAOOUT						      ; 0920

		         54	  FF   A6  9E 003C4 	    MOVAB   -1(ITMHGT), LFCOUNT					      ; 0921

	   DA	         53	       58  F2 003C8 5$:     AOBLSS  ITEMS, I, 4$					      ; 0903

		         5A	       26  D0 003CC 	    MOVL    #38, YPOS						      ; 0932

		         5B	  48   8F  9A 003CF 	    MOVZBL  #72, XPOS						      ; 0933

		         59	0000G  CF  D0 003D3 	    MOVL    FAODSC+4, POINTER					      ; 0934



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 7-4

; Digital Equipment Corporation

;

		         89	461B   8F  B0 003D8 	    MOVW    #17947, (POINTER)+					      ; 0935

		         57	       01  CE 003DD 	    MNEGL   #1, I						      ; 0938

				       21  11 003E0 	    BRB     7$							      ;

		         89	591B   8F  B0 003E2 6$:     MOVW    #22811, (POINTER)+					      ; 0941

		         89	       5A  90 003E7 	    MOVB    YPOS, (POINTER)+					      ; 0942

		         89	       5B  90 003EA 	    MOVB    XPOS, (POINTER)+					      ; 0943

		         5A	       56  C0 003ED 	    ADDL2   ITMHGT, YPOS					      ; 0944

	   69	  0000'  CF	       03  28 003F0 	    MOVC3   #3, REPTSTR, (POINTER)				      ; 0946

		         59	       03  C0 003F6 	    ADDL2   #3, POINTER						      ; 0947

		         89	0000'  CF  90 003F9 	    MOVB    BARCHAR, (POINTER)+					      ;

		         89	4B1B   8F  B0 003FE 	    MOVW    #19227, (POINTER)+					      ; 0948

	   DB	         57	       58  F2 00403 7$:     AOBLSS  ITEMS, I, 6$					      ; 0938

		         89	471B   8F  B0 00407 	    MOVW    #18203, (POINTER)+					      ; 0952

    0000G  CF	         59	0000G  CF  C3 0040C 	    SUBL3   FAODSC+4, POINTER, FAODSC				      ; 0954

		         50	       01  D0 00414 8$:     MOVL    #1, R0						      ; 0955

					   04 00417 	    RET     							      ; 0802



; Routine Size:  293 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 8

; Digital Equipment Corporation

;

;	0957	GLOBAL ROUTINE VHISTINI ( DCB ) : INITYPE =

;	0958	BEGIN

;	0959	

;	0960	!++

;	0961	!

;	0962	! FUNCTIONAL DESCRIPTION:

;	0963	!

;	0964	!	Initialize the VT55 for vertical bar graph display

;	0965	!

;	0966	! INPUTS:

;	0967	!

;	0968	!	DCB - address of display control block

;	0969	!

;	0970	! IMPLICIT INPUTS:

;	0971	!

;	0972	!	none

;	0973	!

;	0974	! OUTPUTS:

;	0975	!

;	0976	!	none

;	0977	!

;	0978	! IMPLICIT OUTPUTS:

;	0979	!

;	0980	!	none

;	0981	!

;	0982	! ROUTINE VALUE:

;	0983	!

;	0984	!	none

;	0985	!

;	0986	! SIDE EFFECTS:

;	0987	!

;	0988	!	none

;	0989	!--

;	0990	

;	0991	LOCAL

;	0992		BLANKS,					! leading blanks for title string

;	0993		ITEMS ,					! count of data items

;	0994		ITMSIZ ,				! width of name field

;	0995		ITMSTR ,				! address of item byte string

;	0996		LBLINCR ,				! increment for axis label

;	0997		MIN ,					! min value for axis

;	0998		RANGE ,					! range for axis label

;	0999		TEMP ,					! temporary

;	1000		TITLE ,					! address of title cstring

;	1001		XPOS ;					! x position for axis label

;	1002	MAP

;	1003		DCB: REF BLOCK[,BYTE] ,

;	1004		ITMSTR: REF VECTOR[,BYTE] ;

;	1005	

;	1006	

;	1007	!

;	1008	! Make sure this is a VT55 terminal

;	1009	!

;	1010	

;	1011	CHECK_FOR_VT55 ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 8-1

; Digital Equipment Corporation

;

;	1012	

;	1013	OUTPUT( CLRSTR ) ;				! clear the screen

;	1014	OUTPUT( SETVT55 ) ;				! init VT55 for graphics

;	1015	TITLE = .DCB[DCB_L_TITLE] ;			! get address of title string

;	1016	BLANKS = (VTWIDTH - .(.TITLE)<0,8>)/2 ;		! compute leading spaces

;	1017	FAOOUT( TITLESTR , .BLANKS , .TITLE ) ;		! output title

;	1018	

;	1019	!

;	1020	! Compute label for the grid.  The y axis is labeled on 10 points.

;	1021	!

;	1022	

;	1023	MIN = .DCB[DCB_W_MIN] ;

;	1024	RANGE = .DCB[DCB_W_RANGE] ;

;	1025	LBLINCR = .RANGE/10 ;				! compute incr. for each label

;	1026	TEMP = .RANGE + .MIN ;				! compute top point to be labeled

;	1027	INCR I FROM 0 TO 18 BY 2 

;	1028	DO

;	1029	    BEGIN

;	1030	

;	1031	    POSITION( 0 , 2+.I) ;			! position to correct line

;	1032	    FAOOUT( VHSTSTR20 , .TEMP ) ;		! output number

;	1033	    TEMP = .TEMP - .LBLINCR ;			! get next label

;	1034	    END;

;	1035	

;	1036	!

;	1037	! Now scan through the IDBs to output the x axis label

;	1038	! consisting of all of the name strings for the items.

;	1039	!

;	1040	

;	1041	ITEMS = .DCB[DCB_L_COUNT] ;			! number of items to display

;	1042	ITMSTR = .DCB[DCB_L_ITMSTR] ;			! address of item byte string

;	1043	ITMSIZ = VT55CWIDTH / .ITEMS ;			! calculate space for each name

;	1044	VT55XINCR = .ITMSIZ*6 + .ITMSIZ/2 ;		! calculate dots between graphs

;	1045	XPOS = VTWIDTH - VT55CWIDTH ;			! starting position for first name

;	1046	

;	1047	!

;	1048	! Position and output each name.  The short name strings are used.

;	1049	!

;	1050	

;	1051	INCR I FROM 0 TO .ITEMS-1

;	1052	DO

;	1053	    BEGIN

;	1054	    LOCAL

;	1055		IDB: REF BLOCK[,BYTE] ;

;	1056	

;	1057	

;	1058	    IDB = PERFTABLE[ .ITMSTR[.I] * (IDB_C_LENGTH/4) ] ; ! compute IDB address

;	1059	    POSITION( .XPOS , 23 ) ;			! position to last line , correct x position

;	1060	    OUTPUT( .IDB[IDB_L_SNAME] ) ;		! output short name string

;	1061	    XPOS = .XPOS + .ITMSIZ ;			! position for next string

;	1062	    END;

;	1063	

;	1064	RETURN TRUE ;					! return with no errors

;	1065	END;





; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 8-2

; Digital Equipment Corporation

;





							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00738 P.ACG:  .LONG   2							      ;

					      0073C P.ACH:  .LONG   -10000000						      ;

					      00740 P.ACI:  .LONG   0							      ;



							    .GLOBL  SYS$SETIMR, SYS$WAITFR



							    .PSECT  $CODE$,NOWRT,2



					 0E7C 00418 	    .ENTRY  VHISTINI, Save R2,R3,R4,R5,R6,R9,R10,R11		      ; 0957

		         5A	0000V  CF  9E 0041A 	    MOVAB   OUTPUT, R10						      ;

		         5B	0000V  CF  9E 0041F 	    MOVAB   FAOOUT, R11						      ;

		         52	       59  D0 00424 	    MOVL    R9, R2						      ;

		         37	0000G  CF  D1 00427 	    CMPL    VTTYPE, #55						      ; 1004

				       2F  13 0042C 	    BEQL    1$							      ;

				0000'  CF  9F 0042E 	    PUSHAB  NOTVT55						      ; 0957

		         6B	       01  FB 00432 	    CALLS   #1, FAOOUT						      ; 1004

    0000'  CF	  0000'  CF	0000'  CF  7A 00435 	    EMUL    P.ACG, P.ACH, P.ACI, INTERVAL			      ;

				0000G  CF     0043F									      ;

				       7E  7C 00442 	    CLRQ    -(SP)						      ;

				0000G  CF  9F 00444 	    PUSHAB  INTERVAL						      ;

				       01  DD 00448 	    PUSHL   #1							      ;

	      00000000G  9F	       04  FB 0044A 	    CALLS   #4, @#SYS$SETIMR					      ;

				       01  DD 00451 	    PUSHL   #1							      ;

	      00000000G  9F	       01  FB 00453 	    CALLS   #1, @#SYS$WAITFR					      ;

				     00A6  31 0045A 	    BRW     5$							      ;

				0000'  CF  9F 0045D 1$:     PUSHAB  CLRSTR						      ; 0957

		         6A	       01  FB 00461 	    CALLS   #1, OUTPUT						      ; 1013

				0000'  CF  9F 00464 	    PUSHAB  SETVT55						      ; 0957

		         6A	       01  FB 00468 	    CALLS   #1, OUTPUT						      ; 1014

		         51	       62  D0 0046B 	    MOVL    (DCB), TITLE					      ; 1015

		         50	       61  9A 0046E 	    MOVZBL  (TITLE), R0						      ; 1016

	   50 00000000G  8F	       50  C3 00471 	    SUBL3   R0, #VTWIDTH, R0					      ;

		         50	       02  C6 00479 	    DIVL2   #2, BLANKS						      ;

				       03  BB 0047C 	    PUSHR   #^M<R0,R1>						      ; 1017

				0000G  CF  9F 0047E 	    PUSHAB  TITLESTR						      ;

		         6B	       03  FB 00482 	    CALLS   #3, FAOOUT						      ;

		         51	  18   A2  3C 00485 	    MOVZWL  24(DCB), MIN					      ; 1023

		         50	  1A   A2  3C 00489 	    MOVZWL  26(DCB), RANGE					      ; 1024

	   54	         50	       0A  C7 0048D 	    DIVL3   #10, RANGE, LBLINCR					      ; 1025

	   53	         50	       51  C1 00491 	    ADDL3   MIN, RANGE, TEMP					      ; 1026

				       59  D4 00495 	    CLRL    I							      ; 1027

				  02   A9  9F 00497 2$:     PUSHAB  2(I)						      ; 1031

				       7E  D4 0049A 	    CLRL    -(SP)						      ;

		  0000V  CF	       02  FB 0049C 	    CALLS   #2, POSITION					      ;

				       53  DD 004A1 	    PUSHL   TEMP						      ; 1032

				0000'  CF  9F 004A3 	    PUSHAB  VHSTSTR20						      ; 0957

		         6B	       02  FB 004A7 	    CALLS   #2, FAOOUT						      ; 1032

		         53	       54  C2 004AA 	    SUBL2   LBLINCR, TEMP					      ; 1033

	   59	         02	       12  F1 004AD 	    ACBL    #18, #2, I, 2$					      ; 1027

				     FFE4     004B1									      ;

		         56	  04   A2  D0 004B3 	    MOVL    4(DCB), ITEMS					      ; 1041



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 8-3

; Digital Equipment Corporation

;

		         52	  08   A2  D0 004B7 	    MOVL    8(DCB), ITMSTR					      ; 1042

	   54 00000000G  8F	       56  C7 004BB 	    DIVL3   ITEMS, #VT55CWIDTH, ITMSIZ				      ; 1043

	   51	         54	       06  C5 004C3 	    MULL3   #6, ITMSIZ, R1					      ; 1044

	   50	         54	       02  C7 004C7 	    DIVL3   #2, ITMSIZ, R0					      ;

    0000G  CF	         51	       50  C1 004CB 	    ADDL3   R0, R1, VT55XINCR					      ;

		         53 00000000*  8F  D0 004D1 	    MOVL    #<VTWIDTH-VT55CWIDTH>, XPOS				      ; 1045

		         59	       01  CE 004D8 	    MNEGL   #1, I						      ; 1051

				       1E  11 004DB 	    BRB     4$							      ;

		         50	     6942  9A 004DD 3$:     MOVZBL  (I)[ITMSTR], R0					      ; 1058

		         50	       04  C4 004E1 	    MULL2   #4, R0						      ;

		         55	0000GCF40  DE 004E4 	    MOVAL   PERFTABLE[R0], IDB					      ;

				       17  DD 004EA 	    PUSHL   #23							      ; 1059

				       53  DD 004EC 	    PUSHL   XPOS						      ;

		  0000V  CF	       02  FB 004EE 	    CALLS   #2, POSITION					      ;

				       65  DD 004F3 	    PUSHL   (IDB)						      ; 1060

		         6A	       01  FB 004F5 	    CALLS   #1, OUTPUT						      ;

		         53	       54  C0 004F8 	    ADDL2   ITMSIZ, XPOS					      ; 1061

	   DE	         59	       56  F2 004FB 4$:     AOBLSS  ITEMS, I, 3$					      ; 1051

		         50	       01  D0 004FF 	    MOVL    #1, R0						      ; 1064

					   04 00502 	    RET     							      ;

				       50  D4 00503 5$:     CLRL    R0							      ; 0957

					   04 00505 	    RET     							      ;



; Routine Size:  238 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 9

; Digital Equipment Corporation

;

;	1066	GLOBAL ROUTINE GRAPH6INI( DCB ) : INITYPE =

;	1067	BEGIN

;	1068	

;	1069	!++

;	1070	!

;	1071	! FUNCTIONAL DESCRIPTION:

;	1072	!

;	1073	!	Initialize the VT55 for a graph of up to six values.

;	1074	!	The screen is divided into six grids, although less than

;	1075	!	six may be used.  There is no particular method to the formatting

;	1076	!	of the screen.  The positions of the lines were simply picked to

;	1077	!	divide the screen evenly, so many of the numbers are built into

;	1078	!	this routine.

;	1079	!

;	1080	! INPUTS:

;	1081	!

;	1082	!	DCB- address of display control block

;	1083	!

;	1084	! IMPLICIT INPUTS:

;	1085	!

;	1086	!	none

;	1087	!

;	1088	! OUTPUTS:

;	1089	!

;	1090	!	none

;	1091	!

;	1092	! IMPLICIT OUTPUTS:

;	1093	!

;	1094	!	None

;	1095	!

;	1096	! ROUTINE VALUE:

;	1097	!

;	1098	!	None

;	1099	!

;	1100	! SIDE EFFECTS:

;	1101	!

;	1102	!	none

;	1103	!--

;	1104	

;	1105	LOCAL

;	1106		BLANKS ,				! leading blank count

;	1107		ITEMS ,					! count of data items

;	1108		ITMSIZ ,				! width of name field

;	1109		ITMSTR ,				! address of item byte string

;	1110		MIN ,					! minimum graph value

;	1111		RANGE ,					! range for axis label

;	1112		TITLE ,					! address of title cstring

;	1113		XPOS ,					! x position

;	1114		YPOS ;				! y position

;	1115	

;	1116	MAP

;	1117		DCB: REF BLOCK[,BYTE] ,

;	1118		ITMSTR: REF VECTOR[,BYTE] ;

;	1119	

;	1120	CHECK_FOR_VT55 ;				! make sure user has correct



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 9-1

; Digital Equipment Corporation

;

;	1121							! terminal type

;	1122	OUTPUT( CLRSTR ) ;				! clear the screen

;	1123	OUTPUT( SETVT55 ) ;				! init VT55 for graphics

;	1124	TITLE = .DCB[DCB_L_TITLE] ;			! get title string address

;	1125	BLANKS = (VTWIDTH - .(.TITLE)<0,8>)/2 ;		! compute leading spaces

;	1126	POSITION( .BLANKS , 23 ) ;			! output title on bottom line

;	1127	OUTPUT( .TITLE ) ;

;	1128	

;	1129	!

;	1130	! Output the horizontal and Vertical lines to divide the

;	1131	! screen into the six graphs.

;	1132	! There are two rows of three graphs each.

;	1133	!

;	1134	

;	1135	OUTPUT( GRAPHICS_ON ) ;			! turn on VT55 graphics

;	1136	HORIZ_LINE( 0 ) ;

;	1137	HORIZ_LINE( 1 ) ;

;	1138	HORIZ_LINE( 117 ) ;

;	1139	HORIZ_LINE( 118 ) ;

;	1140	HORIZ_LINE( 234 ) ;

;	1141	HORIZ_LINE( 235 ) ;

;	1142	VERT_LINE( 12 ) ;

;	1143	VERT_LINE( 13 ) ;

;	1144	VERT_LINE( 175 ) ;

;	1145	VERT_LINE( 176 ) ;

;	1146	VERT_LINE( 338 ) ;

;	1147	VERT_LINE( 339 ) ;

;	1148	VERT_LINE( 501 ) ;

;	1149	VERT_LINE( 502 ) ;

;	1150	OUTPUT( GRAPHICS_OFF ) ;			! turn off VT55 graphics

;	1151	

;	1152	!

;	1153	! Get the item byte string and output the short titles for each graph.

;	1154	!

;	1155	

;	1156	ITEMS = .DCB[DCB_L_COUNT] ;

;	1157	ITMSTR = .DCB[DCB_L_ITMSTR] ;

;	1158	

;	1159	INCR I FROM 0 TO .ITEMS-1 

;	1160	DO

;	1161	    BEGIN

;	1162	

;	1163	    !

;	1164	    ! Compute the xposition and yposition for each title.

;	1165	    !

;	1166	

;	1167	    LOCAL

;	1168		IDB: REF BLOCK[,BYTE] ;

;	1169	

;	1170	    IDB = PERFTABLE[ .ITMSTR[.I] * (IDB_C_LENGTH/4) ] ; ! calculate item descriptor block address

;	1171	    XPOS = 15 + (.I MOD 3)*25 - (.(.IDB[IDB_L_SNAME])<0,8>)/2 ;

;	1172	    YPOS = 1 + ((.I/3)*11) ;			! row 1 or 12

;	1173	    POSITION( .XPOS , .YPOS ) ;			! position the cursor

;	1174	    OUTPUT( .IDB[IDB_L_SNAME] ) ;		! output the title

;	1175	    END;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 9-2

; Digital Equipment Corporation

;

;	1176	

;	1177	RETURN TRUE;

;	1178	END;







							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00744 P.ACJ:  .LONG   2							      ;

					      00748 P.ACK:  .LONG   -10000000						      ;

					      0074C P.ACL:  .LONG   0							      ;







							    .PSECT  $CODE$,NOWRT,2



					 0FFC 00506 	    .ENTRY  GRAPH6INI, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 1066

		         58	0000V  CF  9E 00508 	    MOVAB   HORIZ_LINE, R8					      ;

		         5A	0000V  CF  9E 0050D 	    MOVAB   OUTPUT, R10						      ;

		         5B	0000V  CF  9E 00512 	    MOVAB   VERT_LINE, R11					      ;

		         37	0000G  CF  D1 00517 	    CMPL    VTTYPE, #55						      ; 1118

				       31  13 0051C 	    BEQL    1$							      ;

				0000'  CF  9F 0051E 	    PUSHAB  NOTVT55						      ; 1066

		  0000V  CF	       01  FB 00522 	    CALLS   #1, FAOOUT						      ; 1118

    0000'  CF	  0000'  CF	0000'  CF  7A 00527 	    EMUL    P.ACJ, P.ACK, P.ACL, INTERVAL			      ;

				0000G  CF     00531									      ;

				       7E  7C 00534 	    CLRQ    -(SP)						      ;

				0000G  CF  9F 00536 	    PUSHAB  INTERVAL						      ;

				       01  DD 0053A 	    PUSHL   #1							      ;

	      00000000G  9F	       04  FB 0053C 	    CALLS   #4, @#SYS$SETIMR					      ;

				       01  DD 00543 	    PUSHL   #1							      ;

	      00000000G  9F	       01  FB 00545 	    CALLS   #1, @#SYS$WAITFR					      ;

				     00E3  31 0054C 	    BRW     4$							      ;

				0000'  CF  9F 0054F 1$:     PUSHAB  CLRSTR						      ; 1066

		         6A	       01  FB 00553 	    CALLS   #1, OUTPUT						      ; 1122

				0000'  CF  9F 00556 	    PUSHAB  SETVT55						      ; 1066

		         6A	       01  FB 0055A 	    CALLS   #1, OUTPUT						      ; 1123

		         52	       69  D0 0055D 	    MOVL    (DCB), TITLE					      ; 1124

		         50	       62  9A 00560 	    MOVZBL  (TITLE), R0						      ; 1125

	   50 00000000G  8F	       50  C3 00563 	    SUBL3   R0, #VTWIDTH, R0					      ;

		         50	       02  C6 0056B 	    DIVL2   #2, BLANKS						      ;

				       17  DD 0056E 	    PUSHL   #23							      ; 1126

				       50  DD 00570 	    PUSHL   BLANKS						      ;

		  0000V  CF	       02  FB 00572 	    CALLS   #2, POSITION					      ;

				       52  DD 00577 	    PUSHL   TITLE						      ; 1127

		         6A	       01  FB 00579 	    CALLS   #1, OUTPUT						      ;

				0000'  CF  9F 0057C 	    PUSHAB  GRAPHICS_ON						      ; 1066

		         6A	       01  FB 00580 	    CALLS   #1, OUTPUT						      ; 1135

				       50  D4 00583 	    CLRL    R0							      ; 1136

				       68  16 00585 	    JSB     HORIZ_LINE						      ;

		         50	       01  D0 00587 	    MOVL    #1, R0						      ; 1137

				       68  16 0058A 	    JSB     HORIZ_LINE						      ;

		         50	  75   8F  9A 0058C 	    MOVZBL  #117, R0						      ; 1138

				       68  16 00590 	    JSB     HORIZ_LINE						      ;

		         50	  76   8F  9A 00592 	    MOVZBL  #118, R0						      ; 1139



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 9-3

; Digital Equipment Corporation

;

				       68  16 00596 	    JSB     HORIZ_LINE						      ;

		         50	  EA   8F  9A 00598 	    MOVZBL  #234, R0						      ; 1140

				       68  16 0059C 	    JSB     HORIZ_LINE						      ;

		         50	  EB   8F  9A 0059E 	    MOVZBL  #235, R0						      ; 1141

				       68  16 005A2 	    JSB     HORIZ_LINE						      ;

		         50	       0C  D0 005A4 	    MOVL    #12, R0						      ; 1142

				       6B  16 005A7 	    JSB     VERT_LINE						      ;

		         50	       0D  D0 005A9 	    MOVL    #13, R0						      ; 1143

				       6B  16 005AC 	    JSB     VERT_LINE						      ;

		         50	  AF   8F  9A 005AE 	    MOVZBL  #175, R0						      ; 1144

				       6B  16 005B2 	    JSB     VERT_LINE						      ;

		         50	  B0   8F  9A 005B4 	    MOVZBL  #176, R0						      ; 1145

				       6B  16 005B8 	    JSB     VERT_LINE						      ;

		         50	0152   8F  3C 005BA 	    MOVZWL  #338, R0						      ; 1146

				       6B  16 005BF 	    JSB     VERT_LINE						      ;

		         50	0153   8F  3C 005C1 	    MOVZWL  #339, R0						      ; 1147

				       6B  16 005C6 	    JSB     VERT_LINE						      ;

		         50	01F5   8F  3C 005C8 	    MOVZWL  #501, R0						      ; 1148

				       6B  16 005CD 	    JSB     VERT_LINE						      ;

		         50	01F6   8F  3C 005CF 	    MOVZWL  #502, R0						      ; 1149

				       6B  16 005D4 	    JSB     VERT_LINE						      ;

				0000'  CF  9F 005D6 	    PUSHAB  GRAPHICS_OFF					      ; 1066

		         6A	       01  FB 005DA 	    CALLS   #1, OUTPUT						      ; 1150

		         54	  04   A9  D0 005DD 	    MOVL    4(DCB), ITEMS					      ; 1156

		         52	  08   A9  D0 005E1 	    MOVL    8(DCB), ITMSTR					      ; 1157

		         53	       01  CE 005E5 	    MNEGL   #1, I						      ; 1159

				       40  11 005E8 	    BRB     3$							      ;

		         50	     6342  9A 005EA 2$:     MOVZBL  (I)[ITMSTR], R0					      ; 1170

		         50	       04  C4 005EE 	    MULL2   #4, R0						      ;

		         59	0000GCF40  DE 005F1 	    MOVAL   PERFTABLE[R0], IDB					      ;

	   00	         53	       01  7A 005F7 	    EMUL    #1, I, #0, -(SP)					      ; 1171

				       7E     005FB									      ;

	   50	         8E	       03  7B 005FC 	    EDIV    #3, (SP)+, R0, R0					      ;

				       50     00600									      ;

		         50	       19  C4 00601 	    MULL2   #25, R0						      ;

		         51	  00   B9  9A 00604 	    MOVZBL  @0(IDB), R1						      ;

		         51	       02  C6 00608 	    DIVL2   #2, R1						      ;

		         50	       51  C2 0060B 	    SUBL2   R1, R0						      ;

	   55	         50	       0F  C1 0060E 	    ADDL3   #15, R0, XPOS					      ;

	   50	         53	       03  C7 00612 	    DIVL3   #3, I, R0						      ; 1172

		         50	       0B  C4 00616 	    MULL2   #11, R0						      ;

	   56	         50	       01  C1 00619 	    ADDL3   #1, R0, YPOS					      ;

		         7E	       55  7D 0061D 	    MOVQ    XPOS, -(SP)						      ; 1173

		  0000V  CF	       02  FB 00620 	    CALLS   #2, POSITION					      ;

				       69  DD 00625 	    PUSHL   (IDB)						      ; 1174

		         6A	       01  FB 00627 	    CALLS   #1, OUTPUT						      ;

	   BC	         53	       54  F2 0062A 3$:     AOBLSS  ITEMS, I, 2$					      ; 1159

		         50	       01  D0 0062E 	    MOVL    #1, R0						      ; 1177

					   04 00631 	    RET     							      ;

				       50  D4 00632 4$:     CLRL    R0							      ; 1066

					   04 00634 	    RET     							      ;



; Routine Size:  303 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 9-4

; Digital Equipment Corporation

;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 10

; Digital Equipment Corporation

;

;	1179	GLOBAL ROUTINE HORIZ_LINE ( YPOS ) : JSBTYPE =

;	1180	BEGIN

;	1181	

;	1182	!++

;	1183	!

;	1184	! Functional Description:

;	1185	!

;	1186	! 	Draw a vertical line at specified Y position on the VT55

;	1187	!

;	1188	! INPUTS:

;	1189	!

;	1190	!	YPOS - Y position at which to draw line

;	1191	!

;	1192	! OUTPUTS:

;	1193	!

;	1194	!	none

;	1195	!

;	1196	! ROUTINE VALUE:

;	1197	!

;	1198	!	none

;	1199	!--

;	1200	

;	1201	LOCAL

;	1202		TEMP: VECTOR[4,BYTE] ;			! local in which to build

;	1203							! counted ASCII string

;	1204	

;	1205	TEMP[0] = 3 ;					! length of cstring

;	1206	TEMP[1] = 'D' ;					! draw vertical line command

;	1207	TEMP[2] = .YPOS<0,5> + 32 ;

;	1208	TEMP[3] = .YPOS<5,3> + 32 + 16 ;

;	1209	OUTPUT( TEMP ) ;				! draw the line

;	1210	END;











		         5E	       04  C2 00635 HORIZ_LINE::

							    SUBL2   #4, SP						      ; 1179

		         6E	4403   8F  B0 00638 	    MOVW    #17411, TEMP					      ; 1205

	   50	         05	       00  EF 0063D 	    EXTZV   #0, #5, YPOS, R1					      ; 1207

				       51     00641									      ;

      02   AE	         51	       20  81 00642 	    ADDB3   #32, R1, TEMP+2					      ;

	   50	         03	       05  EF 00647 	    EXTZV   #5, #3, YPOS, R1					      ; 1208

				       51     0064B									      ;

      03   AE	         51	       30  81 0064C 	    ADDB3   #48, R1, TEMP+3					      ;

				       5E  DD 00651 	    PUSHL   SP							      ; 1209

		  0000V  CF	       01  FB 00653 	    CALLS   #1, OUTPUT						      ;

				       50  D4 00658 	    CLRL    R0							      ; 1179

		         5E	       04  C0 0065A 	    ADDL2   #4, SP						      ;

					   05 0065D 	    RSB     							      ;



; Routine Size:  41 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 10-1

; Digital Equipment Corporation

;

;	1211	

;	1212	

;	1213	GLOBAL ROUTINE VERT_LINE ( XPOS ) : JSBTYPE =

;	1214	BEGIN

;	1215	

;	1216	!++

;	1217	!

;	1218	! FUNCTIONAL DESCRIPTION:

;	1219	!

;	1220	!	Draw a vertical line on the VT55 at specified x position.

;	1221	!

;	1222	! INPUTS:

;	1223	!

;	1224	!	XPOS - x position at which to draw line

;	1225	!

;	1226	! OUTPUTS:

;	1227	!

;	1228	!	none

;	1229	!

;	1230	! ROUTINE VALUE:

;	1231	!

;	1232	!	none

;	1233	!--

;	1234	

;	1235	LOCAL

;	1236		TEMP: VECTOR[4,BYTE] ;			! local in which to build cstring

;	1237	

;	1238	TEMP[0] = 3 ;					! length of cstring

;	1239	TEMP[1] = 'L' ;					! vertical line command

;	1240	TEMP[2] = .XPOS<0,5> + 32 ;

;	1241	TEMP[3] = .XPOS<5,4> + 32 + 16 ;

;	1242	OUTPUT( TEMP );

;	1243	END;











		         5E	       04  C2 0065E VERT_LINE::

							    SUBL2   #4, SP						      ; 1213

		         6E	4C03   8F  B0 00661 	    MOVW    #19459, TEMP					      ; 1238

	   50	         05	       00  EF 00666 	    EXTZV   #0, #5, XPOS, R1					      ; 1240

				       51     0066A									      ;

      02   AE	         51	       20  81 0066B 	    ADDB3   #32, R1, TEMP+2					      ;

	   50	         04	       05  EF 00670 	    EXTZV   #5, #4, XPOS, R1					      ; 1241

				       51     00674									      ;

      03   AE	         51	       30  81 00675 	    ADDB3   #48, R1, TEMP+3					      ;

				       5E  DD 0067A 	    PUSHL   SP							      ; 1242

		  0000V  CF	       01  FB 0067C 	    CALLS   #1, OUTPUT						      ;

				       50  D4 00681 	    CLRL    R0							      ; 1213

		         5E	       04  C0 00683 	    ADDL2   #4, SP						      ;

					   05 00686 	    RSB     							      ;



; Routine Size:  41 bytes





; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 10-2

; Digital Equipment Corporation

;





; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 11

; Digital Equipment Corporation

;

;	1244	GLOBAL ROUTINE OUTPUT( STRING ) =

;	1245	BEGIN

;	1246	

;	1247	!++

;	1248	!

;	1249	! FUNCTIONAL DESCRIPTION:

;	1250	!

;	1251	!	Routine to output counted string with no carriage control.

;	1252	!

;	1253	! INPUTS:

;	1254	!

;	1255	!	STRING - address of counted ascii string.

;	1256	!

;	1257	! OUTPUTS:

;	1258	!

;	1259	!	none

;	1260	!++

;	1261	

;	1262	$QIOW( CHAN = .TTCHAN , FUNC = (IO$_WRITEVBLK OR IO$M_NOFORMAT) ,

;     P 1263		P1 = .STRING+1 , P2 = .(.STRING)<0,8> ) ;

;	1264	END;







							    .GLOBL  SYS$QIOW



					 0000 00687 	    .ENTRY  OUTPUT, Save nothing				      ; 1244

				       7E  7C 00689 	    CLRQ    -(SP)						      ; 1263

				       7E  7C 0068B 	    CLRQ    -(SP)						      ;

		         7E	  04   BC  9A 0068D 	    MOVZBL  @STRING, -(SP)					      ;

	   7E	    04   AC	       01  C1 00691 	    ADDL3   #1, STRING, -(SP)					      ;

				       7E  7C 00696 	    CLRQ    -(SP)						      ;

				       7E  D4 00698 	    CLRL    -(SP)						      ;

		         7E	0130   8F  3C 0069A 	    MOVZWL  #304, -(SP)						      ;

		         7E	0000G  CF  3C 0069F 	    MOVZWL  TTCHAN, -(SP)					      ;

				       7E  D4 006A4 	    CLRL    -(SP)						      ;

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

				       50  D4 006AD 	    CLRL    R0							      ; 1244

					   04 006AF 	    RET     							      ;



; Routine Size:  41 bytes





;	1265	

;	1266	ROUTINE POSITION( XPOS , YPOS ) =

;	1267	BEGIN

;	1268	

;	1269	!++

;	1270	!

;	1271	! FUNCTIONAL DESCRIPTION:

;	1272	!

;	1273	!	Routine to position screen for characters.

;	1274	!

;	1275	! INPUTS:!

;	1276	!



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 11-1

; Digital Equipment Corporation

;

;	1277	!	XPOS - x position ( column number )

;	1278	!	YPOS - y position ( row number )

;	1279	!

;	1280	! OUTPUTS:

;	1281	!

;	1282	!	none

;	1283	!--

;	1284	

;	1285	LOCAL 

;	1286		TEMP: VECTOR[8,BYTE] ;	! temporary to hold position cstring

;	1287	

;	1288	TEMP[0] = 4 ;				! count for cstring

;	1289	TEMP[1] = ESC ;				! position command

;	1290	TEMP[2] = 'Y' ;				! position command

;	1291	TEMP[3] = 32 + .YPOS ;			! y position

;	1292	TEMP[4] = 32 + .XPOS ;			! X position

;	1293	OUTPUT( TEMP ) ;			! output the counted string

;	1294	END;











					 0000 006B0 POSITION:

							    .WORD   Save nothing					      ; 1266

		         5E	       08  C2 006B2 	    SUBL2   #8, SP						      ;

		         6E	1B04   8F  B0 006B5 	    MOVW    #6916, TEMP						      ; 1288

		    02   AE	  59   8F  90 006BA 	    MOVB    #89, TEMP+2						      ; 1290

      03   AE	    08   AC	       20  81 006BF 	    ADDB3   #32, YPOS, TEMP+3					      ; 1291

      04   AE	    04   AC	       20  81 006C5 	    ADDB3   #32, XPOS, TEMP+4					      ; 1292

				       5E  DD 006CB 	    PUSHL   SP							      ; 1293

		    B6   AF	       01  FB 006CD 	    CALLS   #1, OUTPUT						      ;

				       50  D4 006D1 	    CLRL    R0							      ; 1266

					   04 006D3 	    RET     							      ;



; Routine Size:  36 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 12

; Digital Equipment Corporation

;

;	1295	GLOBAL ROUTINE NULL =

;	1296	BEGIN

;	1297	

;	1298	!++

;	1299	!

;	1300	! NULL ROUTINE

;	1301	!

;	1302	!--

;	1303	

;	1304	RETURN TRUE;

;	1305	END;











					 0000 006D4 	    .ENTRY  NULL, Save nothing					      ; 1295

		         50	       01  D0 006D6 	    MOVL    #1, R0						      ; 1304

					   04 006D9 	    RET     							      ; 1295



; Routine Size:  6 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 13

; Digital Equipment Corporation

;

;	1306	GLOBAL ROUTINE NEWTIME : JSBTYPE =

;	1307	BEGIN

;	1308	

;	1309	!++

;	1310	!

;	1311	! FUNCTIONAL DESCRIPTION:

;	1312	!

;	1313	!	Routine to output ASCII time on middle of second line of

;	1314	!	screen.

;	1315	!

;	1316	! INPUTS:

;	1317	!

;	1318	!	none

;	1319	!

;	1320	! OUTPUTS:

;	1321	!

;	1322	!	None

;	1323	!--

;	1324	

;	1325	LOCAL

;	1326		TIMBUF: VECTOR[12,BYTE],		! ASCII time buffer

;	1327		TIMDSC: VECTOR[2,LONG] ;		! descriptor for convert service

;	1328	

;	1329	POSITION( 36 , 1 ) ;				! position to proper place

;	1330	TIMDSC[0] = 8 ;					! hour, minute, and second

;	1331	TIMDSC[1] = TIMBUF+1 ;

;	1332	$ASCTIM( TIMBUF=TIMDSC , CVTFLG=1 ) ;

;	1333	TIMBUF[0] = 8 ;					! count for cstring

;	1334	OUTPUT( TIMBUF ) ;				! output the string

;	1335	END;







							    .GLOBL  SYS$ASCTIM



		         5E	       14  C2 006DA NEWTIME::

							    SUBL2   #20, SP						      ; 1306

				       01  DD 006DD 	    PUSHL   #1							      ; 1329

				       24  DD 006DF 	    PUSHL   #36							      ;

		    CB   AF	       02  FB 006E1 	    CALLS   #2, POSITION					      ;

		         6E	       08  D0 006E5 	    MOVL    #8, TIMDSC						      ; 1330

		    04   AE	  09   AE  9E 006E8 	    MOVAB   TIMBUF+1, TIMDSC+4					      ; 1331

				       01  DD 006ED 	    PUSHL   #1							      ; 1332

				       7E  D4 006EF 	    CLRL    -(SP)						      ;

				  08   AE  9F 006F1 	    PUSHAB  TIMDSC						      ;

				       7E  D4 006F4 	    CLRL    -(SP)						      ;

	      00000000G  9F	       04  FB 006F6 	    CALLS   #4, @#SYS$ASCTIM					      ;

		    08   AE	       08  90 006FD 	    MOVB    #8, TIMBUF						      ; 1333

				  08   AE  9F 00701 	    PUSHAB  TIMBUF						      ; 1334

		  FF7E   CF	       01  FB 00704 	    CALLS   #1, OUTPUT						      ;

				       50  D4 00709 	    CLRL    R0							      ; 1306

		         5E	       14  C0 0070B 	    ADDL2   #20, SP						      ;

					   05 0070E 	    RSB     							      ;



; Routine Size:  53 bytes



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 13-1

; Digital Equipment Corporation

;







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 14

; Digital Equipment Corporation

;

;	1336	GLOBAL ROUTINE USERINI: INITYPE =

;	1337	BEGIN

;	1338	

;	1339	!++

;	1340	!

;	1341	! FUNCTIONAL DESCRIPTION:

;	1342	!

;	1343	!	Screen initialization for users display.

;	1344	!

;	1345	! INPUTS:

;	1346	!

;	1347	!	none

;	1348	!

;	1349	! OUTPUTS:

;	1350	!

;	1351	!	none

;	1352	!--

;	1353	

;	1354	OUTPUT( CLRSTR ) ;				! clear screen

;	1355	OUTPUT( PRCSTR10 ) ;				! output title

;	1356	POSITION( 0 , 4 ) ;				! position for headings

;	1357	OUTPUT( PRCSTR20 ) ;				! output headings

;	1358	

;	1359	!

;	1360	! Zero current process index so that display will start with first process

;	1361	!

;	1362	

;	1363	CURPIX = 0 ;

;	1364	

;	1365	!

;	1366	! Call routine to count number of processes for first time through.  Routine 

;	1367	! must execute in EXEC mode.

;	1368	!

;	1369	

;	1370	$CMEXEC(ROUTIN=COUNTPROCS) ;

;	1371	

;	1372	RETURN TRUE;

;	1373	END;







							    .GLOBL  SYS$CMEXEC



					 0800 0070F 	    .ENTRY  USERINI, Save R11					      ; 1336

		         5B	FF72   CF  9E 00711 	    MOVAB   OUTPUT, R11						      ;

				0000'  CF  9F 00716 	    PUSHAB  CLRSTR						      ;

		         6B	       01  FB 0071A 	    CALLS   #1, OUTPUT						      ; 1354

				0000'  CF  9F 0071D 	    PUSHAB  PRCSTR10						      ; 1336

		         6B	       01  FB 00721 	    CALLS   #1, OUTPUT						      ; 1355

				       04  DD 00724 	    PUSHL   #4							      ; 1356

				       7E  D4 00726 	    CLRL    -(SP)						      ;

		    29   AB	       02  FB 00728 	    CALLS   #2, POSITION					      ;

				0000'  CF  9F 0072C 	    PUSHAB  PRCSTR20						      ; 1336

		         6B	       01  FB 00730 	    CALLS   #1, OUTPUT						      ; 1357

				0000'  CF  D4 00733 	    CLRL    CURPIX						      ; 1363



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 14-1

; Digital Equipment Corporation

;

				       7E  D4 00737 	    CLRL    -(SP)						      ; 1370

				0000V  CF  9F 00739 	    PUSHAB  COUNTPROCS						      ;

	      00000000G  9F	       02  FB 0073D 	    CALLS   #2, @#SYS$CMEXEC					      ;

		         50	       01  D0 00744 	    MOVL    #1, R0						      ; 1372

					   04 00747 	    RET     							      ; 1336



; Routine Size:  57 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 15

; Digital Equipment Corporation

;

;	1374	ROUTINE COUNTPROCS =

;	1375	BEGIN

;	1376	

;	1377	!++

;	1378	!

;	1379	! FUNCTIONAL DESCRIPTION:

;	1380	!

;	1381	!	Routine to count number of processes for USERINI

;	1382	!

;	1383	! INPUTS:

;	1384	!

;	1385	!	none

;	1386	!

;	1387	! OUTPUTS:

;	1388	!

;	1389	!	PRCCNT set to number of processes

;	1390	!--

;	1391	

;	1392	LOCAL

;	1393		NULLPCB ;

;	1394	MAP

;	1395		SCH$GL_PCBVEC: REF VECTOR[,LONG] ;

;	1396	

;	1397	!

;	1398	! Loop through and count the current number of processes for the

;	1399	! first output cycle.

;	1400	!

;	1401	

;	1402	PRCCNT = 0 ;

;	1403	NULLPCB = .SCH$GL_PCBVEC[0] ;

;	1404	

;	1405	INCR I FROM 0 TO .SCH$GL_MAXPIX

;	1406	DO

;	1407	    IF .SCH$GL_PCBVEC[.I] NEQ .NULLPCB OR .I EQL 0

;	1408	    THEN

;	1409		PRCCNT = .PRCCNT + 1;

;	1410	

;	1411	RETURN TRUE;

;	1412	END;











					 0000 00748 COUNTPROCS:

							    .WORD   Save nothing					      ; 1374

				0000'  CF  D4 0074A 	    CLRL    PRCCNT						      ; 1402

		         51 00000000G  FF  D0 0074E 	    MOVL    @SCH$GL_PCBVEC, NULLPCB				      ; 1403

		         50	       01  CE 00755 	    MNEGL   #1, I						      ; 1405

				       12  11 00758 	    BRB     3$							      ;

		         51 00000000GFF40  D1 0075A 1$:     CMPL    @SCH$GL_PCBVEC[I], NULLPCB				      ; 1407

				       04  12 00762 	    BNEQ    2$							      ;

				       50  D5 00764 	    TSTL    I							      ;

				       04  12 00766 	    BNEQ    3$							      ;

				0000'  CF  D6 00768 2$:     INCL    PRCCNT						      ; 1409



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 15-1

; Digital Equipment Corporation

;

	   E6	         50 00000000G  EF  F3 0076C 3$:     AOBLEQ  SCH$GL_MAXPIX, I, 1$				      ; 1405

		         50	       01  D0 00774 	    MOVL    #1, R0						      ; 1411

					   04 00777 	    RET     							      ; 1374



; Routine Size:  48 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 16

; Digital Equipment Corporation

;

;	1413	GLOBAL ROUTINE USERS : DSPTYPE =

;	1414	BEGIN

;	1415	

;	1416	!++

;	1417	!

;	1418	! FUNCTIONAL DESCRIPTION:

;	1419	!

;	1420	!	Routine to output PCB status information on all processes

;	1421	!

;	1422	! INPUTS:

;	1423	!

;	1424	!	none

;	1425	!

;	1426	! IMPLICIT INPUTS:

;	1427	!

;	1428	!	SCH$GL_PCBVEC - address of list of pcb addresses

;	1429	!	SCH$GL_MAXPIX - maximum process index

;	1430	!

;	1431	! OUTPUTS:

;	1432	!

;	1433	!	none

;	1434	!

;	1435	! IMPLICIT OUTPUTS:

;	1436	!

;	1437	!	none

;	1438	!

;	1439	! ROUTINE VALUE:

;	1440	!

;	1441	!	none

;	1442	!

;	1443	! SIDE EFFECTS:

;	1444	!

;	1445	!	none

;	1446	!--

;	1447	

;	1448	LOCAL

;	1449		LINES ,					! lines of output

;	1450		NULLPCB ,				! null pcb address

;	1451		NEXTPCB ,				! pcb address

;	1452		TIMBUF: VECTOR[16,BYTE] ,		! buffer for ascii up time

;	1453		TIMDSC: VECTOR[2,LONG] ;		! timbuf descriptor

;	1454	MAP

;	1455		NEXTPCB: REF BLOCK[,BYTE] ,

;	1456		SCH$GL_PCBVEC: REF VECTOR[,LONG] ,

;	1457		STATELIST: VECTOR[,LONG] ;

;	1458	BIND

;	1459		MAXLINES = 16 ;				! max lines of output

;	1460							! information

;	1461	

;	1462	POSITION( 69 , 0 ) ;				! position

;	1463	UPTIME() ;					! compute uptime

;	1464	

;	1465	!

;	1466	! Convert and output system uptime.

;	1467	!



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 16-1

; Digital Equipment Corporation

;

;	1468	

;	1469	TIMDSC[0] = 14 ;				! return hour, minute, second and days

;	1470	TIMDSC[1] = TIMBUF  ;

;	1471	$ASCTIM( TIMBUF=TIMDSC , TIMADR=USRCPUTIM , CVTFLG = 0 ) ; ! convert to ascii

;	1472	

;	1473	!

;	1474	! Make into counted string, truncating the first two digits. 99 days

;	1475	! should be enough.

;	1476	!

;	1477	

;	1478	TIMBUF[1] = 8 ;

;	1479	OUTPUT( TIMBUF+1 ) ;				! output system up time

;	1480	

;	1481	NEWTIME() ;					! output time

;	1482	

;	1483	NULLPCB = .SCH$GL_PCBVEC[0] ;			! get null process address

;	1484	

;	1485	!

;	1486	! MAXLINES is the largest number of systat output lines that may

;	1487	! be output on a VT52 terminal.  If there are more processes than

;	1488	! room allows, the display will hold until the next interval, when the

;	1489	! next set of processes will be displayed.

;	1490	!

;	1491	

;	1492	IF .CURPIX GTR .SCH$GL_MAXPIX THEN CURPIX = 0 ;	! start over when done

;	1493	

;	1494	!

;	1495	! Output total process count whenever we start the display over.

;	1496	!

;	1497	

;	1498	IF .CURPIX EQL 0

;	1499	THEN

;	1500	    BEGIN

;	1501	    FAOOUT( PRCSTR15 , .PRCCNT ) ;

;	1502	    PRCCNT = 0 ;

;	1503	    END;

;	1504	

;	1505	LINES = 0 ;					! no lines output

;	1506	POSITION( 0,5 ) ;				! position to first line

;	1507	

;	1508	WHILE TRUE 

;	1509	DO

;	1510	    BEGIN

;	1511	

;	1512	

;	1513	    !

;	1514	    ! loop thruogh all processes displaying

;	1515	    ! needed information

;	1516	    ! Check for end of screen and wait until next interval if so.

;	1517	    !

;	1518	

;	1519	    IF .LINES GTR MAXLINES OR .CURPIX GTR .SCH$GL_MAXPIX

;	1520	    THEN 

;	1521		EXITLOOP ;

;	1522	    NEXTPCB = .SCH$GL_PCBVEC[.CURPIX] ;		! get next pcb address



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 16-2

; Digital Equipment Corporation

;

;	1523	    IF .NEXTPCB NEQ .NULLPCB			! make sure there is something ther

;	1524		OR .CURPIX EQL 0			! except for first time through

;	1525	    THEN

;	1526		BEGIN

;	1527		PRCCNT = .PRCCNT + 1 ;			! count one more process

;	1528		GETPHDINFO( .CURPIX ) ;			! get process header information

;	1529		FAOOUT(

;	1530		    ( IF .NEXTPCB[PCB$V_RES] EQL 1

;	1531		      THEN PRCSTR30 ELSE PRCSTR40 ), ! choose string depending

;	1532							! on process residency

;	1533			.NEXTPCB[PCB$L_PID] ,

;	1534			.NEXTPCB[PCB$W_GRP] ,

;	1535			.NEXTPCB[PCB$L_UIC] ,

;	1536			.STATELIST[.NEXTPCB[PCB$W_STATE]] ,

;	1537			31 - .NEXTPCB[PCB$B_PRI] ,

;	1538			NEXTPCB[PCB$T_LNAME] ,

;	1539			.NEXTPCB[PCB$W_GPGCNT] ,

;	1540			.NEXTPCB[PCB$W_PPGCNT] + .NEXTPCB[PCB$W_GPGCNT] ,

;	1541			.USRDIRIO ,

;	1542			.USRPAGEFLTS ,

;	1543			USRCPUTIM

;	1544			);

;	1545		LINES = .LINES + 1 ;			! one more line output

;	1546		END;

;	1547	    CURPIX = .CURPIX + 1 ;			! check next process

;	1548	    END;

;	1549	

;	1550	FAOOUT( DELSTR ) ;				! erase rest of screen

;	1551	END;







						    MAXLINES=		16





					 0FFC 00778 	    .ENTRY  USERS, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11		      ; 1413

		         58	0000V  CF  9E 0077A 	    MOVAB   FAOOUT, R8						      ;

		         59	FF2D   CF  9E 0077F 	    MOVAB   POSITION, R9					      ;

		         5A 00000000G  EF  9E 00784 	    MOVAB   SCH$GL_MAXPIX, R10					      ;

		         5B	0000'  CF  9E 0078B 	    MOVAB   CURPIX, R11						      ;

		         5E	       18  C2 00790 	    SUBL2   #24, SP						      ;

				       7E  D4 00793 	    CLRL    -(SP)						      ; 1462

		         7E	  45   8F  9A 00795 	    MOVZBL  #69, -(SP)						      ;

		         69	       02  FB 00799 	    CALLS   #2, POSITION					      ;

				     0000  30 0079C 	    BSBW    UPTIME						      ; 1463

		         6E	       0E  D0 0079F 	    MOVL    #14, TIMDSC						      ; 1469

		    04   AE	  08   AE  9E 007A2 	    MOVAB   TIMBUF, TIMDSC+4					      ; 1470

				       7E  D4 007A7 	    CLRL    -(SP)						      ; 1471

				0000G  CF  9F 007A9 	    PUSHAB  USRCPUTIM						      ;

				  08   AE  9F 007AD 	    PUSHAB  TIMDSC						      ;

				       7E  D4 007B0 	    CLRL    -(SP)						      ;

	      00000000G  9F	       04  FB 007B2 	    CALLS   #4, @#SYS$ASCTIM					      ;

		    09   AE	       08  90 007B9 	    MOVB    #8, TIMBUF+1					      ; 1478

				  09   AE  9F 007BD 	    PUSHAB  TIMBUF+1						      ; 1479

		    D7   A9	       01  FB 007C0 	    CALLS   #1, OUTPUT						      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 16-3

; Digital Equipment Corporation

;

				  2A   A9  16 007C4 	    JSB     NEWTIME						      ; 1481

		         54 00000000G  FF  D0 007C7 	    MOVL    @SCH$GL_PCBVEC, NULLPCB				      ; 1483

		         6A	       6B  D1 007CE 	    CMPL    CURPIX, SCH$GL_MAXPIX				      ; 1492

				       02  15 007D1 	    BLEQ    1$							      ;

				       6B  D4 007D3 	    CLRL    CURPIX						      ;

				       6B  D5 007D5 1$:     TSTL    CURPIX						      ; 1498

				       0D  12 007D7 	    BNEQ    2$							      ;

				  6C   AB  DD 007D9 	    PUSHL   PRCCNT						      ; 1501

				0000'  CF  9F 007DC 	    PUSHAB  PRCSTR15						      ; 1413

		         68	       02  FB 007E0 	    CALLS   #2, FAOOUT						      ; 1501

				  6C   AB  D4 007E3 	    CLRL    PRCCNT						      ; 1502

				       53  D4 007E6 2$:     CLRL    LINES						      ; 1505

				       05  DD 007E8 	    PUSHL   #5							      ; 1506

				       7E  D4 007EA 	    CLRL    -(SP)						      ;

		         69	       02  FB 007EC 	    CALLS   #2, POSITION					      ;

		         10	       53  D1 007EF 3$:     CMPL    LINES, #16						      ; 1519

				       77  14 007F2 	    BGTR    8$							      ;

		         6A	       6B  D1 007F4 	    CMPL    CURPIX, SCH$GL_MAXPIX				      ;

				       72  14 007F7 	    BGTR    8$							      ;

		         50	       6B  D0 007F9 	    MOVL    CURPIX, R0						      ; 1522

		         52 00000000GFF40  D0 007FC 	    MOVL    @SCH$GL_PCBVEC[R0], NEXTPCB				      ;

		         54	       52  D1 00804 	    CMPL    NEXTPCB, NULLPCB					      ; 1523

				       04  12 00807 	    BNEQ    4$							      ;

				       50  D5 00809 	    TSTL    R0							      ; 1524

				       5A  12 0080B 	    BNEQ    7$							      ;

				  6C   AB  D6 0080D 4$:     INCL    PRCCNT						      ; 1527

				       50  DD 00810 	    PUSHL   R0							      ; 1528

		  0000G  CF	       01  FB 00812 	    CALLS   #1, GETPHDINFO					      ;

				0000G  CF  9F 00817 	    PUSHAB  USRCPUTIM						      ; 1529

				0000G  CF  DD 0081B 	    PUSHL   USRPAGEFLTS						      ;

				0000G  CF  DD 0081F 	    PUSHL   USRDIRIO						      ;

		         50	  3A   A2  3C 00823 	    MOVZWL  58(NEXTPCB), R0					      ; 1540

		         51	  38   A2  3C 00827 	    MOVZWL  56(NEXTPCB), R1					      ;

				     6140  9F 0082B 	    PUSHAB  (R1)[R0]						      ;

		         7E	  38   A2  3C 0082E 	    MOVZWL  56(NEXTPCB), -(SP)					      ; 1529

				  6C   A2  9F 00832 	    PUSHAB  108(NEXTPCB)					      ; 1538

		         7E	  0B   A2  9A 00835 	    MOVZBL  11(NEXTPCB), -(SP)					      ; 1537

	   6E	         1F	       6E  C3 00839 	    SUBL3   (SP), #31, (SP)					      ;

		         50	  30   A2  3C 0083D 	    MOVZWL  48(NEXTPCB), R0					      ; 1536

				0000'CF40  DD 00841 	    PUSHL   STATELIST[R0]					      ; 1529

				  20   A2  DD 00846 	    PUSHL   32(NEXTPCB)						      ;

		         7E	  22   A2  3C 00849 	    MOVZWL  34(NEXTPCB), -(SP)					      ;

				  60   A2  DD 0084D 	    PUSHL   96(NEXTPCB)						      ;

		         07	  28   A2  E9 00850 	    BLBC    40(NEXTPCB), 5$					      ; 1530

		         50	0000'  CF  9E 00854 	    MOVAB   PRCSTR30, R0					      ; 1413

				       05  11 00859 	    BRB     6$							      ; 1530

		         50	0000'  CF  9E 0085B 5$:     MOVAB   PRCSTR40, R0					      ; 1413

				       50  DD 00860 6$:     PUSHL   R0							      ; 1530

		         68	       0C  FB 00862 	    CALLS   #12, FAOOUT						      ; 1529

				       53  D6 00865 	    INCL    LINES						      ; 1545

				       6B  D6 00867 7$:     INCL    CURPIX						      ; 1547

				       84  11 00869 	    BRB     3$							      ; 1508

				0000'  CF  9F 0086B 8$:     PUSHAB  DELSTR						      ; 1413

		         68	       01  FB 0086F 	    CALLS   #1, FAOOUT						      ; 1550

				       50  D4 00872 	    CLRL    R0							      ; 1413



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 16-4

; Digital Equipment Corporation

;

					   04 00874 	    RET     							      ;



; Routine Size:  253 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 17

; Digital Equipment Corporation

;

;	1552	GLOBAL ROUTINE TOPTENINI(DCB) : INITYPE =

;	1553	BEGIN

;	1554	

;	1555	!++

;	1556	!

;	1557	! FUNCTIONAL DESCRIPTION:

;	1558	!

;	1559	!	Initialization for TOPTEN display.  Simply calls HHISTINI

;	1560	!	but clears some of the lines output.  Also zeros

;	1561	!	own storage.

;	1562	!

;	1563	! INPUTS:

;	1564	!

;	1565	!	DCB - address of display control block

;	1566	!

;	1567	! IMPLICIT INPUTS:

;	1568	!

;	1569	!	PID - array of process ID's

;	1570	!

;	1571	! OUTPUTS:

;	1572	!

;	1573	!	none

;	1574	!

;	1575	! IMPLICIT OUTPUTS:

;	1576	!

;	1577	!	PID array is zeroed

;	1578	!

;	1579	! ROUTINE VALUE:

;	1580	!

;	1581	!	none

;	1582	!

;	1583	! SIDE EFFECTS:

;	1584	!

;	1585	!	none

;	1586	!--

;	1587	

;	1588	EXTERNAL

;	1589		PID: VECTOR[MAXPROCS,LONG] ;	! vector of process IDs

;	1590	

;	1591	!

;	1592	! Zero PID array

;	1593	!

;	1594	

;	1595	

;	1596	CH$FILL( 0 , MAXPROCS*4 , PID ) ;		! zero fill pid array

;	1597	

;	1598	!

;	1599	! Call init screen routine

;	1600	!

;	1601	

;	1602	HHISTINI( .DCB ) ;

;	1603	

;	1604	RETURN TRUE ;					! no errors

;	1605	END;





; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 17-1

; Digital Equipment Corporation

;





							    .GLOBL  PID



					 023C 00875 	    .ENTRY  TOPTENINI, Save R2,R3,R4,R5,R9			      ; 1552

	   00	         6E	       00  2C 00877 	    MOVC5   #0, (SP), #0, #800, PID				      ; 1596

		  0000G  CF	0320   8F     0087B									      ;

		  FA6D   CF	       00  FB 00881 	    CALLS   #0, HHISTINI					      ; 1602

		         50	       01  D0 00886 	    MOVL    #1, R0						      ; 1604

					   04 00889 	    RET     							      ; 1552



; Routine Size:  21 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 18

; Digital Equipment Corporation

;

;	1606	GLOBAL ROUTINE TOPTEN (DCB) : DSPTYPE  =

;	1607	BEGIN

;	1608	

;	1609	!++

;	1610	!

;	1611	! FUNCTIONAL DESCRIPTION:

;	1612	!

;	1613	!	Output a display of the top eight users of CPU time during

;	1614	!	the past interval. (Called TOPTEN for historical reasons.)

;	1615	!

;	1616	! INPUTS:

;	1617	!

;	1618	!	none

;	1619	!

;	1620	! IMPLICIT INPUTS:

;	1621	!

;	1622	!	MAXPROCS - maximum number of processes in system

;	1623	!

;	1624	! OUTPUTS:

;	1625	!

;	1626	!	none

;	1627	!

;	1628	! ROUTINE VALUE:

;	1629	!

;	1630	!	none

;	1631	!

;	1632	! SIDE EFFECTS:

;	1633	!

;	1634	!	none

;	1635	!--

;	1636	

;	1637	

;	1638	OWN

;	1639		CPUTIM: VECTOR[MAXPROCS,LONG] ,			! current CPU times

;	1640		DIFF: VECTOR[MAXPROCS,LONG] ,			! accumulated CPU time

;	1641		ORDER: VECTOR[MAXPROCS,LONG] ;			! sort order array

;	1642	GLOBAL

;	1643		PID: VECTOR[MAXPROCS,LONG] ;			! previous PID

;	1644	LOCAL

;	1645		NEXTPCB ,					! address of next PCb in list

;	1646		NULLPCB ,					! null PCB address

;	1647		POSITIONSTR: VECTOR[8,BYTE] ,			! string for position command

;	1648		ROW ,						! output row

;	1649		TIMINTRVL ;					! interval size in tics

;	1650	MAP

;	1651		DCB: REF BLOCK[,BYTE] ,

;	1652		NEXTPCB: REF BLOCK[,BYTE] ,

;	1653		SCH$GL_PCBVEC: REF VECTOR[,LONG] ;

;	1654	

;	1655	

;	1656	NULLPCB = .SCH$GL_PCBVEC[0] ;				! get null pcb address

;	1657	

;	1658	!

;	1659	! Loop through all process control blocks

;	1660	!



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 18-1

; Digital Equipment Corporation

;

;	1661	

;	1662	INCR INDEX FROM 0 TO .SCH$GL_MAXPIX

;	1663	DO

;	1664	    BEGIN

;	1665	

;	1666	    !

;	1667	    ! Check PCB of real processes only.

;	1668	    !

;	1669	

;	1670	    NEXTPCB = .SCH$GL_PCBVEC[.INDEX] ;

;	1671	    IF .NEXTPCB NEQ .NULLPCB OR .INDEX EQL 0

;	1672	    THEN

;	1673		BEGIN

;	1674	

;	1675		!

;	1676		! Compute the amount of cpu time used by processes over the last

;	1677		! interval.  Since the cputime is contained in the process header

;	1678		! which can not be accessed while swapped out, only processes which

;	1679		! are resident at both the beginning and end of the interval will

;	1680		! appear in the display.  Check the pid also to make sure we're

;	1681		! looking at the same process as last time.  If the return value from

;	1682		! GETPHDINFO is zero, then the process is swapped out and won't be

;	1683		! included.

;	1684		!

;	1685	

;	1686		LOCAL TEMP ;

;	1687		TEMP = GETPHDINFO( .INDEX ) ;

;	1688		IF .PID[.INDEX] EQL .NEXTPCB[PCB$L_PID]		! if same process ...

;	1689	

;	1690		    AND .TEMP NEQ 0				! ...and now resident

;	1691		    AND .CPUTIM[.INDEX] NEQ 0			! ...and resident before

;	1692		THEN

;	1693		    DIFF[.INDEX] = .TEMP - .CPUTIM[.INDEX]

;	1694		ELSE

;	1695		    BEGIN

;	1696		    DIFF[.INDEX] = 0 ;

;	1697		    PID[.INDEX] = .NEXTPCB[PCB$L_PID] ;

;	1698		    END ;

;	1699		CPUTIM[.INDEX] = .TEMP ;

;	1700		END

;	1701	    ELSE

;	1702	

;	1703	    !

;	1704	    ! Not a valid process. Zero the cpu time difference field

;	1705	    !

;	1706	

;	1707		DIFF[.INDEX] = 0 ;

;	1708	

;	1709	    END ;

;	1710	

;	1711	!

;	1712	! Compute the size of previous interval in 10 millisecond tics.

;	1713	!

;	1714	

;	1715	TIMINTRVL = .SYSINTRVL/100000 ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 18-2

; Digital Equipment Corporation

;

;	1716	

;	1717	!

;	1718	! Set up the order array to contain the processes indicies

;	1719	!

;	1720	

;	1721	INCR I FROM 0 TO .SCH$GL_MAXPIX

;	1722	DO

;	1723	    ORDER[.I] = .I ;

;	1724	

;	1725	!

;	1726	! Go through the DIFF array and build the ORDER array which contains

;	1727	! the indices of the largest ten users of cputime.

;	1728	!

;	1729	

;	1730	DECR I FROM .SCH$GL_MAXPIX TO .SCH$GL_MAXPIX-7

;	1731	DO

;	1732	    INCR J FROM 1 TO .I

;	1733	    DO

;	1734		BEGIN

;	1735	

;	1736		!

;	1737		! Bubble up the top ten.

;	1738		!

;	1739	

;	1740		IF .DIFF[.ORDER[.J]] LSS .DIFF[.ORDER[.J-1]]

;	1741		THEN

;	1742		    BEGIN

;	1743		    LOCAL TEMP ;

;	1744		    TEMP = .ORDER[.J] ;

;	1745		    ORDER[.J] = .ORDER[.J-1] ;

;	1746		    ORDER[.J-1] = .TEMP ;

;	1747		    END;

;	1748		END;

;	1749	

;	1750	!

;	1751	! Now compute the percentage of use for each of the top ten offenders

;	1752	!

;	1753	

;	1754	ROW = 6 ;					! starting row for first output line

;	1755	NEWTIME() ;					! output time

;	1756	POSITION( 0 , .ROW-1 ) ;			! positon for first line

;	1757	

;	1758	!

;	1759	! Build positon string to position cursor at graph.  The string is

;	1760	! inserted in each output line by FAO to move the cursor to the

;	1761	! start of the bar following the output of the username field.

;	1762	!

;	1763	

;	1764	POSITIONSTR[0] = 4 ;

;	1765	POSITIONSTR[1] = ESC ;

;	1766	POSITIONSTR[2] = 'Y' ;

;	1767	POSITIONSTR[4] = 40 + 32 ;			! column 40

;	1768	

;	1769	DECR I FROM .SCH$GL_MAXPIX TO .SCH$GL_MAXPIX-7

;	1770	DO



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 18-3

; Digital Equipment Corporation

;

;	1771	    BEGIN

;	1772	    LOCAL BARS_TO_OUTPUT , PERCENT ;

;	1773	    POSITIONSTR[3] = .ROW + 32 ;

;	1774	

;	1775	    !

;	1776	    ! check if there's anything to write for this guy.

;	1777	    !

;	1778	

;	1779	    IF .DIFF[.ORDER[.I]] EQL 0

;	1780	    THEN

;	1781		FAOOUT( TOPSTR20 )

;	1782	    ELSE

;	1783		BEGIN

;	1784		PERCENT = ( 100 * .DIFF[.ORDER[.I]] ) / .TIMINTRVL ;

;	1785	    

;	1786		!

;	1787		! Compute the number of bar graph characters needed.

;	1788		!

;	1789	

;	1790		BARS_TO_OUTPUT = ( MAXBARS * .PERCENT ) / 100 ; ! number of characters to output

;	1791		IF .BARS_TO_OUTPUT GTR MAXBARS THEN BARS_TO_OUTPUT = MAXBARS ;

;	1792		NEXTPCB = .SCH$GL_PCBVEC[ .(PID[ .ORDER[.I] ]) <0,16> ] ;

;	1793		FAOOUT( TOPSTR10 , .NEXTPCB[PCB$W_GRP] , .NEXTPCB[PCB$W_MEM] ,

;	1794		    NEXTPCB[PCB$T_LNAME] ,

;	1795		    POSITIONSTR[0] ,

;	1796		    .BARS_TO_OUTPUT ) ;

;	1797		END;

;	1798	

;	1799	    ROW = .ROW + 2 ;

;	1800	    END;

;	1801	

;	1802	END;







							    .PSECT  $OWN$,NOEXE,2



					      00074 CPUTIM: .BLKB   800

					      00394 DIFF:   .BLKB   800

					      006B4 ORDER:  .BLKB   800



							    .PSECT  $GLOBAL$,NOEXE,2



					      00000 PID::   .BLKB   800







							    .PSECT  $CODE$,NOWRT,2



					 0FFC 0088A 	    .ENTRY  TOPTEN, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 1606

		         57 00000000G  EF  9E 0088C 	    MOVAB   SCH$GL_PCBVEC, R7					      ;

		         58 00000000G  8F  D0 00893 	    MOVL    #MAXBARS, R8					      ;

		         5A 00000000G  EF  9E 0089A 	    MOVAB   SCH$GL_MAXPIX, R10					      ;

		         5B	0000'  CF  9E 008A1 	    MOVAB   DIFF, R11						      ;

		         5E	       08  C2 008A6 	    SUBL2   #8, SP						      ;



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 18-4

; Digital Equipment Corporation

;

		         54	  00   B7  D0 008A9 	    MOVL    @SCH$GL_PCBVEC, NULLPCB				      ; 1656

		         55	       6A  D0 008AD 	    MOVL    SCH$GL_MAXPIX, R5					      ; 1662

		         59	       01  CE 008B0 	    MNEGL   #1, INDEX						      ;

				       49  11 008B3 	    BRB     6$							      ;

		         53	  00 B749  D0 008B5 1$:     MOVL    @SCH$GL_PCBVEC[INDEX], NEXTPCB			      ; 1670

		         52	     6B49  DE 008BA 	    MOVAL   DIFF[INDEX], R2					      ; 1693

		         54	       53  D1 008BE 	    CMPL    NEXTPCB, NULLPCB					      ; 1671

				       04  12 008C1 	    BNEQ    2$							      ;

				       59  D5 008C3 	    TSTL    INDEX						      ;

				       35  12 008C5 	    BNEQ    5$							      ;

				       59  DD 008C7 2$:     PUSHL   INDEX						      ; 1687

		  0000G  CF	       01  FB 008C9 	    CALLS   #1, GETPHDINFO					      ;

		    60   A3	0000'CF49  D1 008CE 	    CMPL    PID[INDEX], 96(NEXTPCB)				      ; 1688

				       14  12 008D5 	    BNEQ    3$							      ;

				       50  D5 008D7 	    TSTL    TEMP						      ; 1690

				       10  13 008D9 	    BEQL    3$							      ;

				FCE0 CB49  D5 008DB 	    TSTL    CPUTIM[INDEX]					      ; 1691

				       09  13 008E0 	    BEQL    3$							      ;

	   62	         50	FCE0 CB49  C3 008E2 	    SUBL3   CPUTIM[INDEX], TEMP, (R2)				      ; 1693

				       09  11 008E9 	    BRB     4$							      ; 1688

				       62  D4 008EB 3$:     CLRL    (R2)						      ; 1696

		  0000'CF49	  60   A3  D0 008ED 	    MOVL    96(NEXTPCB), PID[INDEX]				      ; 1697

		  FCE0 CB49	       50  D0 008F4 4$:     MOVL    TEMP, CPUTIM[INDEX]					      ; 1699

				       02  11 008FA 	    BRB     6$							      ; 1671

				       62  D4 008FC 5$:     CLRL    (R2)						      ; 1707

	   B3	         59	       55  F3 008FE 6$:     AOBLEQ  R5, INDEX, 1$					      ; 1662

	   56	  0000G  CF 000186A0   8F  C7 00902 	    DIVL3   #100000, SYSINTRVL, TIMINTRVL			      ; 1715

		         51	       6A  D0 0090C 	    MOVL    SCH$GL_MAXPIX, R1					      ; 1721

		         50	       01  CE 0090F 	    MNEGL   #1, I						      ;

				       06  11 00912 	    BRB     8$							      ;

		  0320 CB40	       50  D0 00914 7$:     MOVL    I, ORDER[I]						      ; 1723

	   F6	         50	       51  F3 0091A 8$:     AOBLEQ  R1, I, 7$						      ; 1721

	   54	         51	       07  C3 0091E 	    SUBL3   #7, R1, R4						      ; 1730

				       29  11 00922 	    BRB     12$							      ;

				       50  D4 00924 9$:     CLRL    J							      ; 1732

				       1F  11 00926 	    BRB     11$							      ;

		         52	0320 CB40  D0 00928 10$:    MOVL    ORDER[J], R2					      ; 1740

		         59	031C CB40  D0 0092E 	    MOVL    ORDER-4[J], R9					      ;

		       6B49	     6B42  D1 00934 	    CMPL    DIFF[R2], DIFF[R9]					      ;

				       0C  18 00939 	    BGEQ    11$							      ;

		  0320 CB40	       59  D0 0093B 	    MOVL    R9, ORDER[J]					      ; 1745

		  031C CB40	       52  D0 00941 	    MOVL    TEMP, ORDER-4[J]					      ; 1746

	   DD	         50	       51  F3 00947 11$:    AOBLEQ  I, J, 10$						      ; 1732

				       51  D7 0094B 	    DECL    I							      ; 1730

		         54	       51  D1 0094D 12$:    CMPL    I, R4						      ;

				       D2  18 00950 	    BGEQ    9$							      ;

		         54	       06  D0 00952 	    MOVL    #6, ROW						      ; 1754

				     FD82  30 00955 	    BSBW    NEWTIME						      ; 1755

				  FF   A4  9F 00958 	    PUSHAB  -1(ROW)						      ; 1756

				       7E  D4 0095B 	    CLRL    -(SP)						      ;

		  FD4E   CF	       02  FB 0095D 	    CALLS   #2, POSITION					      ;

		         6E	1B04   8F  B0 00962 	    MOVW    #6916, POSITIONSTR					      ; 1764

		    02   AE	  59   8F  90 00967 	    MOVB    #89, POSITIONSTR+2					      ; 1766

		    04   AE	  48   8F  90 0096C 	    MOVB    #72, POSITIONSTR+4					      ; 1767

	   55	         6A	       07  C3 00971 	    SUBL3   #7, SCH$GL_MAXPIX, R5				      ; 1769



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 18-5

; Digital Equipment Corporation

;

		         52	       6A  D0 00975 	    MOVL    SCH$GL_MAXPIX, I					      ;

				       64  11 00978 	    BRB     17$							      ;

      03   AE	         54	       20  81 0097A 13$:    ADDB3   #32, ROW, POSITIONSTR+3				      ; 1773

		         59	0320 CB42  D0 0097F 	    MOVL    ORDER[I], R9					      ; 1779

		         50	     6B49  D0 00985 	    MOVL    DIFF[R9], R0					      ;

				       0B  12 00989 	    BNEQ    14$							      ;

				0000'  CF  9F 0098B 	    PUSHAB  TOPSTR20						      ; 1606

		  0000V  CF	       01  FB 0098F 	    CALLS   #1, FAOOUT						      ; 1781

				       43  11 00994 	    BRB     16$							      ; 1779

		         50 00000064   8F  C4 00996 14$:    MULL2   #100, R0						      ; 1784

		         50	       56  C6 0099D 	    DIVL2   TIMINTRVL, PERCENT					      ;

		         50	       58  C4 009A0 	    MULL2   R8, R0						      ; 1790

	   51	         50 00000064   8F  C7 009A3 	    DIVL3   #100, R0, BARS_TO_OUTPUT				      ;

		         58	       51  D1 009AB 	    CMPL    BARS_TO_OUTPUT, R8					      ; 1791

				       03  15 009AE 	    BLEQ    15$							      ;

		         51	       58  D0 009B0 	    MOVL    R8, BARS_TO_OUTPUT					      ;

				0000'CF49  DF 009B3 15$:    PUSHAL  PID[R9]						      ; 1792

		         50	       9E  3C 009B8 	    MOVZWL  @(SP)+, R0						      ;

		         53	  00 B740  D0 009BB 	    MOVL    @SCH$GL_PCBVEC[R0], NEXTPCB				      ;

				       51  DD 009C0 	    PUSHL   BARS_TO_OUTPUT					      ; 1793

				  04   AE  9F 009C2 	    PUSHAB  POSITIONSTR						      ; 1795

				  6C   A3  9F 009C5 	    PUSHAB  108(NEXTPCB)					      ; 1794

		         7E	  20   A3  3C 009C8 	    MOVZWL  32(NEXTPCB), -(SP)					      ; 1793

		         7E	  22   A3  3C 009CC 	    MOVZWL  34(NEXTPCB), -(SP)					      ;

				0000'  CF  9F 009D0 	    PUSHAB  TOPSTR10						      ; 1606

		  0000V  CF	       06  FB 009D4 	    CALLS   #6, FAOOUT						      ; 1793

		         54	       02  C0 009D9 16$:    ADDL2   #2, ROW						      ; 1799

				       52  D7 009DC 	    DECL    I							      ; 1769

		         55	       52  D1 009DE 17$:    CMPL    I, R5						      ;

				       97  18 009E1 	    BGEQ    13$							      ;

				       50  D4 009E3 	    CLRL    R0							      ; 1606

					   04 009E5 	    RET     							      ;



; Routine Size:  348 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 19

; Digital Equipment Corporation

;

;	1803	GLOBAL ROUTINE ASK( PRSTRING ) =

;	1804	BEGIN

;	1805	

;	1806	!++

;	1807	!

;	1808	! FUNCTIONAL DESCRIPTION:

;	1809	!

;	1810	!	Routine to output a message and read the user response

;	1811	!	into a global input buffer.

;	1812	!

;	1813	! INPUTS:

;	1814	!

;	1815	!	PRSTRING - address of counted ascii prompt string

;	1816	!

;	1817	! IMPLICIT INPUTS:

;	1818	!

;	1819	!	INBUF - input buffer to read into

;	1820	!	INSIZE - location to return size of user input

;	1821	!

;	1822	! OUTPUTS:

;	1823	!

;	1824	!	none

;	1825	!

;	1826	! IMPLICIT OUTPUTS:

;	1827	!

;	1828	!	INBUF is filled, with the number of characters in INSIZE

;	1829	!

;	1830	! ROUTINE VALUE:

;	1831	!

;	1832	!	none

;	1833	!

;	1834	! SIDE EFFECTS:

;	1835	!

;	1836	!	none

;	1837	!--

;	1838	

;	1839	LOCAL

;	1840		IOSB: VECTOR[2,LONG] ;			! I/O status block

;	1841	

;	1842	OUTPUT( LFSTR ) ;

;	1843	$QIOW(	CHAN = .TTCHAN ,

;     P 1844		EFN = 3 ,

;     P 1845		FUNC = (IO$_READPROMPT OR IO$M_CVTLOW) ,

;     P 1846		IOSB = IOSB ,

;     P 1847		P1 = INBUF , P2 = 80 ,

;     P 1848		P3 = 0 ,

;     P 1849		P5 = (.PRSTRING+1) ,			! address of prompt string

;     P 1850		P6 = .(.PRSTRING)<0,8>			! length of prompt

;     P 1851		);

;	1852	

;	1853	OUTPUT( CRSTR ) ;				! echo carriage control

;	1854	INSIZE = .IOSB<16,16> ;				! get length of input

;	1855	END;







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 19-1

; Digital Equipment Corporation

;







					 0000 009E6 	    .ENTRY  ASK, Save nothing					      ; 1803

		         5E	       08  C2 009E8 	    SUBL2   #8, SP						      ;

				0000'  CF  9F 009EB 	    PUSHAB  LFSTR						      ;

		  FC93   CF	       01  FB 009EF 	    CALLS   #1, OUTPUT						      ; 1842

		         7E	  04   BC  9A 009F4 	    MOVZBL  @PRSTRING, -(SP)					      ; 1851

	   7E	    04   AC	       01  C1 009F8 	    ADDL3   #1, PRSTRING, -(SP)					      ;

				       7E  7C 009FD 	    CLRQ    -(SP)						      ;

		         7E	  50   8F  9A 009FF 	    MOVZBL  #80, -(SP)						      ;

				0000'  CF  9F 00A03 	    PUSHAB  INBUF						      ;

				       7E  7C 00A07 	    CLRQ    -(SP)						      ;

				  20   AE  9F 00A09 	    PUSHAB  IOSB						      ;

		         7E	0137   8F  3C 00A0C 	    MOVZWL  #311, -(SP)						      ;

		         7E	0000G  CF  3C 00A11 	    MOVZWL  TTCHAN, -(SP)					      ;

				       03  DD 00A16 	    PUSHL   #3							      ;

	      00000000G  9F	       0C  FB 00A18 	    CALLS   #12, @#SYS$QIOW					      ;

				0000'  CF  9F 00A1F 	    PUSHAB  CRSTR						      ; 1803

		  FC5F   CF	       01  FB 00A23 	    CALLS   #1, OUTPUT						      ; 1853

		  0000'  CF	  02   AE  3C 00A28 	    MOVZWL  IOSB, INSIZE					      ; 1854

				       50  D4 00A2E 	    CLRL    R0							      ; 1803

					   04 00A30 	    RET     							      ;



; Routine Size:  75 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 20

; Digital Equipment Corporation

;

;	1856	GLOBAL ROUTINE FAOOUT( INSTR , P1 ) =

;	1857	BEGIN

;	1858	

;	1859	!++

;	1860	!

;	1861	! FUNCTIONAL DESCRIPTION:

;	1862	!

;	1863	!	Output formatted string to terminal.

;	1864	!

;	1865	! INPUTS:

;	1866	!

;	1867	!	INSTR - address of counted ascii control string

;	1868	!	P1 - one of possibly several parameters for FAO

;	1869	!

;	1870	! IMPLICIT INPUTS:

;	1871	!

;	1872	!	none

;	1873	!

;	1874	! OUTPUTS:

;	1875	!

;	1876	!	none

;	1877	!

;	1878	! IMPLICIT OUTPUTS:

;	1879	!

;	1880	!	none

;	1881	!

;	1882	! SIDE EFFECTS:

;	1883	!

;	1884	!	none

;	1885	!--

;	1886	

;	1887	LOCAL

;	1888		INDSC: VECTOR[2,LONG],			! descriptor for control string

;	1889		FAOLEN:	WORD ,				! space for return length

;	1890		OUTDSC: VECTOR[2,LONG],			! descriptor for output

;	1891		OUTBUF: VECTOR[200,BYTE] ;		! output buffer

;	1892	

;	1893	OUTDSC[0] = 200 ;

;	1894	OUTDSC[1] = OUTBUF ;				! init output descriptor

;	1895	INDSC[0] = .(.INSTR)<0,8> ;			! init input descriptor

;	1896	INDSC[1] = .INSTR+1 ;

;	1897	

;	1898	$FAOL( CTRSTR = INDSC , OUTLEN = FAOLEN , OUTBUF = OUTDSC , PRMLST = P1 );

;	1899	$QIOW( CHAN = .TTCHAN , FUNC = (IO$_WRITEVBLK OR IO$M_NOFORMAT) , P1 = OUTBUF ,

;     P 1900	 P2 = .FAOLEN ,	P4 = ' '  ) ;

;	1901	END;







							    .GLOBL  SYS$FAOL



					 0000 00A31 	    .ENTRY  FAOOUT, Save nothing				      ; 1856

		         5E	FF24   CE  9E 00A33 	    MOVAB   -220(SP), SP					      ;

		    F0   AD	  C8   8F  9A 00A38 	    MOVZBL  #200, OUTDSC					      ; 1893

		    F4   AD	  04   AE  9E 00A3D 	    MOVAB   OUTBUF, OUTDSC+4					      ; 1894



; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 20-1

; Digital Equipment Corporation

;

		    F8   AD	  04   BC  9A 00A42 	    MOVZBL  @INSTR, INDSC					      ; 1895

      FC   AD	    04   AC	       01  C1 00A47 	    ADDL3   #1, INSTR, INDSC+4					      ; 1896

				  08   AC  9F 00A4D 	    PUSHAB  P1							      ; 1898

				  F0   AD  9F 00A50 	    PUSHAB  OUTDSC						      ;

				  08   AE  9F 00A53 	    PUSHAB  FAOLEN						      ;

				  F8   AD  9F 00A56 	    PUSHAB  INDSC						      ;

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

				       7E  7C 00A60 	    CLRQ    -(SP)						      ; 1900

				       20  DD 00A62 	    PUSHL   #32							      ;

				       7E  D4 00A64 	    CLRL    -(SP)						      ;

		         7E	  10   AE  3C 00A66 	    MOVZWL  FAOLEN, -(SP)					      ;

				  18   AE  9F 00A6A 	    PUSHAB  OUTBUF						      ;

				       7E  7C 00A6D 	    CLRQ    -(SP)						      ;

				       7E  D4 00A6F 	    CLRL    -(SP)						      ;

		         7E	0130   8F  3C 00A71 	    MOVZWL  #304, -(SP)						      ;

		         7E	0000G  CF  3C 00A76 	    MOVZWL  TTCHAN, -(SP)					      ;

				       7E  D4 00A7B 	    CLRL    -(SP)						      ;

	      00000000G  9F	       0C  FB 00A7D 	    CALLS   #12, @#SYS$QIOW					      ;

				       50  D4 00A84 	    CLRL    R0							      ; 1856

					   04 00A86 	    RET     							      ;



; Routine Size:  86 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 21

; Digital Equipment Corporation

;

;	1902	GLOBAL ROUTINE CVTNUM( SIZE , BUFADR ) =

;	1903	BEGIN

;	1904	

;	1905	!++

;	1906	!

;	1907	! FUNCTIONAL DESCRIPTION:

;	1908	!

;	1909	!	Convert ASCII decimal number in buffer to binary.

;	1910	!

;	1911	! INPUTS:

;	1912	!

;	1913	!	SIZE - size of the input string

;	1914	!	BUFADR - address of the input buffer

;	1915	!

;	1916	! IMPLICIT INPUTS:

;	1917	!

;	1918	!	none

;	1919	!

;	1920	! OUTPUTS:

;	1921	!

;	1922	!	none

;	1923	!

;	1924	! IMPLICIT OUTPUTS:

;	1925	!

;	1926	!	none

;	1927	!

;	1928	! ROUTINE VALUE:

;	1929	!

;	1930	!	binary value of the converted number

;	1931	!

;	1932	! SIDE EFFECTS:

;	1933	!

;	1934	!	none

;	1935	!--

;	1936	

;	1937	LOCAL

;	1938		VAL ;				! accumulator for value

;	1939	MAP

;	1940		BUFADR: REF VECTOR[,BYTE] ;	

;	1941	

;	1942	VAL = 0 ;				! set initial value to zero

;	1943	INCR I FROM 0 TO .SIZE-1

;	1944	DO

;	1945	    BEGIN

;	1946	    IF .BUFADR[.I] GEQ '0' AND .BUFADR[.I] LEQ '9'

;	1947	    THEN

;	1948		( VAL = .VAL * 10 ;		! shift by radix

;	1949	

;	1950		  VAL = .VAL + .BUFADR[.I] - '0' ! add in next decimal digit

;	1951		) 

;	1952	    ELSE EXITLOOP ;			! leave with first non-digit

;	1953	    END;

;	1954	RETURN .VAL ;

;	1955	END;





; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 21-1

; Digital Equipment Corporation

;









					 0004 00A87 	    .ENTRY  CVTNUM, Save R2					      ; 1902

				       52  D4 00A89 	    CLRL    VAL							      ; 1942

		         50	       01  CE 00A8B 	    MNEGL   #1, I						      ; 1943

				       1C  11 00A8E 	    BRB     2$							      ;

		         51	  08 BC40  9E 00A90 1$:     MOVAB   @BUFADR[I], R1					      ; 1946

		         30	       61  91 00A95 	    CMPB    (R1), #48						      ;

				       17  1F 00A98 	    BLSSU   3$							      ;

		         39	       61  91 00A9A 	    CMPB    (R1), #57						      ;

				       12  1A 00A9D 	    BGTRU   3$							      ;

		         52	       0A  C4 00A9F 	    MULL2   #10, VAL						      ; 1948

		         51	       61  9A 00AA2 	    MOVZBL  (R1), R1						      ; 1950

		         51	       52  C0 00AA5 	    ADDL2   VAL, R1						      ;

	   52	         51	       30  C3 00AA8 	    SUBL3   #48, R1, VAL					      ;

	   DF	         50	  04   AC  F2 00AAC 2$:     AOBLSS  SIZE, I, 1$						      ; 1943

		         50	       52  D0 00AB1 3$:     MOVL    VAL, R0						      ; 1954

					   04 00AB4 	    RET     							      ; 1902



; Routine Size:  46 bytes







; Bliss-32 7.352	Saturday 21-AUG-1978 22:37:07	DBB3:[DISPLY.SRC]DSPBLI.B32;31					Page 22

; Digital Equipment Corporation

;

;	1956	END				!End of module

;	1957	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $OWN$          	  2516    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $PLIT$         	  1872  NOWRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

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

;  $GLOBAL$       	   800    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)









;				LIBRARY STATISTICS

;

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

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]LIB.L32;1		      5582        20         0       241











; Size:		2741 code + 5188 data bytes

; Run Time:	01:13.8

; Elapsed Time:	02:30.0

; Memory Used:	381 pages

; Compilation Complete

