



		    spg_fs_info_.pl1                08/08/88  1130.2r w 08/08/88  1115.1       28998



/* ***********************************************************
   *                                                         *
   * Copyright, (C) Honeywell Information Systems Inc., 1982 *
   *                                                         *
   *********************************************************** */
/* SPG_FS_INFO_ - Get Bulk Store and Disk I/O Activity Meters.
	coded 9/24/76 by Noel I. Morris	*/

/* Modified May 1984 by T. Oke for adaptive disk optimization mods. */
/* Modified Oct 1984 by T. Oke to fix bugs of adaptive mods. */
/* Modified Dec 1984 by T. Oke to restrict peek size to limit of buffer. */

spg_fs_info_: procedure (pdio, dkio, vtio) options (separate_static);

	dcl     pdio		 fixed bin,	/* paging device I/O count */
	        dkio		 fixed bin,	/* disk page I/O count */
	        vtio		 fixed bin;	/* VTOC I/O count */

	dcl     code		 fixed bin (35),	/* error code */
	        (cur_dkio, cur_vtio)	 fixed bin,	/* current values */
	        dev		 fixed bin,	/* device in disktab */
	        type		 fixed bin,	/* IO type in devtab */
	        sx		 fixed bin,	/* disk subsystem index */
	        r0dp		 ptr;		/* pointer to ring zero disk database */

	dcl     buffer		 (3000) fixed bin;	/* data buffer */

	dcl     dsp		 (31) ptr static init ((31) null ()), /* pointers to disk database */
	        subsys_size		 (32) fixed bin (18) static, /* size of each sub-system */
	        subsystems		 fixed bin static init (0), /* number of disk subsystems */
	        (prev_dkio, prev_vtio) fixed bin static init (0); /* previous values */

	dcl     ring0_get_$segptr	 entry (char (*), char (*), ptr, fixed bin (35)),
	        ring_zero_peek_	 entry (ptr, ptr, fixed bin (18), fixed bin (35));

	dcl     (addr, hbound, lbound, null, ptr, size) builtin;

	if subsystems = 0 then do;			/* Get pointer to disk_seg. */
		call ring0_get_$segptr ("", "disk_seg", r0dp, code);
		if code = 0 then do;
			disksp = addr (buffer);
			call ring_zero_peek_ (r0dp, disksp, size (disk_data), code);
			if code = 0 then do;
				subsystems = disk_data.subsystems;
				do sx = 1 to subsystems;
				     dsp (sx) = ptr (r0dp, disk_data.offset (sx));
				     if sx ^= disk_data.subsystems then
					subsys_size (sx) = bin (disk_data.offset (sx + 1)) -
					     bin (disk_data.offset (sx));
				     else subsys_size (sx) = bin (disk_data.free_offset) -
					     bin (disk_data.offset (sx));
				end;
			     end;
		     end;
	     end;

	pdio, dkio, vtio = 0;
	cur_dkio, cur_vtio = 0;
	diskp = addr (buffer);
	do sx = 1 to subsystems;			/* Iterate through disk subsystems. */
	     call ring_zero_peek_ (dsp (sx), diskp, min (hbound (buffer, 1), subsys_size (sx)), code);
	     if code ^= 0 then return;
	     do dev = lbound (disktab.devtab, 1) to hbound (disktab.devtab, 1);
		dp = addr (disktab.devtab (dev));
		cur_dkio = cur_dkio + devtab.opt_info (PAGE_READ).seek_count +
		     devtab.opt_info (PAGE_WRITE).seek_count;
		cur_vtio = cur_vtio + devtab.opt_info (VTOC_READ).seek_count +
		     devtab.opt_info (VTOC_WRITE).seek_count;
	     end;
	end;
	dkio = cur_dkio - prev_dkio;
	prev_dkio = cur_dkio;
	vtio = cur_vtio - prev_vtio;
	prev_vtio = cur_vtio;

	return;
%page;
%include dskdcl;

     end;
  



		    spg_ring_0_info_.pl1            06/04/84  1617.6rew 06/04/84  1242.7       24732



/* ***********************************************************
   *                                                         *
   * Copyright, (C) Honeywell Information Systems Inc., 1982 *
   *                                                         *
   *********************************************************** */
/* Procedure to return the virtual cpu time spent in the
   main gates into ring zero */

/* Last Modified: (Date and Reason)
   09/22/76	Noel I. Morris to use new get_gate_data_
   07/09/75	Steve Webber to work with combined linkage segments for gates
   10/27/73	Steve Webber to take into account call limiter type gates.
   */


/* ******************************************************
   *                                                    *
   *                                                    *
   * Copyright (c) 1972 by Massachusetts Institute of   *
   * Technology and Honeywell Information Systems, Inc. *
   *                                                    *
   *                                                    *
   ****************************************************** */


spg_ring_0_info_: proc (time);

/* Parameters */

dcl  time fixed bin (52);

/* Automatic */

dcl  code fixed bin (35);				/* error code */
dcl  i fixed bin;					/* gate index */
dcl  j fixed bin;					/* entry index */
dcl  nentries fixed bin;				/* number of gate entries */

dcl 1 table (512) like gate_table aligned;		/* table of gate information */

/* Static */

dcl  tempp ptr static init (null ());
dcl  gate_name (6) char (32) static options (constant) init (
	"hcs_",
	"hphcs_",
	"ioi_",
	"netp_",
	"net_",
	"phcs_");

/* Based */

dcl 1 info based aligned,				/* metering info in gate */
    2 cpu_time fixed bin (52),			/* CPU time spent in gate entry */
    2 vcpu_time fixed bin (52),			/* virtual CPU time spent in gate entry */
    2 page_waits fixed bin,				/* number of page waits in gate entry */
    2 calls fixed bin;				/* number of calls to gate entry */

/* Entries */

dcl  get_gate_data_ entry (char (*), 1 dim (*) like gate_table aligned, fixed bin,
	ptr, bit (1) aligned, fixed bin (35)),
     hcs_$make_seg entry (char (*), char (*), char (*), fixed bin (5), ptr, fixed bin (35));


dcl (hbound, null) builtin;



% include gate_data;



	time = 0;					/* start out with no time spent */

	if tempp = null () then do;
	     call hcs_$make_seg ("", "spg_ring_0_info_.temp", "", 01010b, tempp, code);
	     if code ^= 0 then return;
	end;

	do i = 1 to hbound (gate_name, 1);
	     call get_gate_data_ (gate_name (i), table, nentries, tempp, "1"b, code);
	     if code = 0 then do j = 1 to nentries;
		time = time + table (j).datap -> gate_entry_data.vcpu_time;
	     end;
	end;

	return;


     end;




		    spg_util_.pl1                   01/26/85  1315.2r w 01/22/85  1313.9       51516



/* ***********************************************************
   *                                                         *
   * Copyright, (C) Honeywell Information Systems Inc., 1982 *
   *                                                         *
   *********************************************************** */
/* Program to prepare metering information for SPG program.

   This program uses buffers set up by meter_util_ as called by spg
   itself. These buffers are refernecd via the unique index passed to
   this program through the reset entry.	

   Modified March 1981 by J. Bongiovanni to fix segfault time computation
   Modified November 1984 by M. Pandolf to include hc_lock.
*/
	

/* ******************************************************
   *                                                    *
   *                                                    *
   * Copyright (c) 1972 by Massachusetts Institute of   *
   * Technology and Honeywell Information Systems, Inc. *
   *                                                    *
   *                                                    *
   ****************************************************** */


spg_util_: proc (pzi, pnmpi, pmpi, pint, ptc, ppf, psf, puse_rz, px, string, length, chsw);

dcl  pzi float bin,					/* % zero idle time */
     pnmpi float bin,				/* % nmp idle time */
     pmpi float bin,				/* % mp idle time */
     pint float bin,				/* % interrupt time */
     ptc float bin,					/* % time in traffic controller */
     ppf float bin,					/* % page fault time */
     psf float bin,					/* % segfault time */
     puse_rz float bin,				/* % time in ring 0 */
     px float bin,					/* % paging interrupt time */
     string char (110),				/* returned output string */
     length fixed bin,				/* length of string */
     chsw fixed bin (1);				/* nonzero if output to be printed */

dcl  unique fixed bin int static;
dcl (sstp1, sstp2, tcdp1, tcdp2) ptr static;
dcl  time_rz fixed bin (52),
    (meter_time, n_pf, n_pf_sf,
     time_int_xd, time_pf, time_sf, time_tc) float;
dcl  spg_ring_0_info_ entry (fixed bin (52));
dcl  ioa_$rsnnl entry options (variable);

dcl 1 cf aligned,					/* config and tuning data */
    2 nproc fixed bin,				/* number of CPUs */
    2 nused fixed bin (18),				/* number of main memory pages used */
    2 min_eligible fixed bin (30),			/* min number of eligible processes */
    2 max_eligible fixed bin (30),			/* max number of eligible processes */
    2 working_set_addend fixed bin (18),		/* additive working set parameter */
    2 working_set_factor fixed bin (35, 18),		/* working set factor */
    2 tefirst fixed bin (30),				/* first eligible time */
    2 telast fixed bin (30),				/* last eligible time */
    2 timax fixed bin (35);				/* time in queue for lowest level */

dcl 1 iscf static aligned like cf;			/* static copy of config and tuning data */

dcl (divide, float, unspec) builtin;



/* check if configuration or tuning has changed */

	cf.nproc = tcdp2 -> tcm.ncpu;
	cf.nused = sstp2 -> sst.nused;
	cf.min_eligible = tcdp2 -> tcm.min_eligible;
	cf.max_eligible = tcdp2 -> tcm.max_eligible;
	cf.working_set_addend = tcdp2 -> tcm.working_set_addend;
	cf.working_set_factor = tcdp2 -> tcm.working_set_factor;
	cf.tefirst = tcdp2 -> tcm.tefirst;
	cf.telast = tcdp2 -> tcm.telast;
	cf.timax = tcdp2 -> tcm.timax;

	chsw = 0;
	if unspec (cf) ^= unspec (iscf) then do;	/* If data changed ... */
	     chsw = 1;				/* set switch. */

	     call ioa_$rsnnl (
	     "^7xcpu= ^d, pages= ^d, min_e= ^d, max_e= ^d, wsa= ^d, wsf= ^.2f, tefirst= ^5.2f, telast= ^5.2f, timax= ^5.2f.",
	     string, length,
	     cf.nproc, cf.nused,
	     divide (cf.min_eligible, 262144, 17, 0), divide (cf.max_eligible, 262144, 17, 0),
	     cf.working_set_addend, float (cf.working_set_factor, 27),
	     cf.tefirst * 1.e-6, cf.telast * 1.e-6, cf.timax * 1.e-6);

	     unspec (iscf) = unspec (cf);		/* Save new data. */
	end;



/* determine basic metering period */

	if tcdp2 -> tcm.processor_time = tcdp1 -> tcm.processor_time then do;
						/* probably no access to ring-0		*/
	     pzi, pnmpi, pmpi, pint, ptc, ppf, psf, puse_rz, px = 0.0;
	     return;
	end;
	
	     

	meter_time = (tcdp2 -> tcm.processor_time - tcdp1 -> tcm.processor_time) * 1.e-2;

/* compute idle times */

	pzi = (tcdp2 -> tcm.zero_idle - tcdp1 -> tcm.zero_idle) / meter_time;
	pnmpi = (tcdp2 -> tcm.nmp_idle - tcdp1 -> tcm.nmp_idle) / meter_time;
	pmpi = (tcdp2 -> tcm.mp_idle - tcdp1 -> tcm.mp_idle +
	     tcdp2 -> tcm.loading_idle - tcdp1 -> tcm.loading_idle) / meter_time;

/* compute info on interrupts, traffic controller, page faults, segment faults, and ring zero usage */

	time_int_xd = tcdp2 -> tcm.interrupt_time - tcdp1 -> tcm.interrupt_time;
	pint = time_int_xd / meter_time;
	px = 0.0;					/* No diferentiation for paging interrupts */

	time_tc = (tcdp2 -> tcm.getwork_time - tcdp1 -> tcm.getwork_time);
	ptc = time_tc / meter_time;

	time_pf = tcdp2 -> tcm.cpu_pf_time - tcdp1 -> tcm.cpu_pf_time;
	n_pf = tcdp2 -> tcm.cpu_pf_count - tcdp1 -> tcm.cpu_pf_count;
	n_pf_sf = sstp2 -> sst.total_sf_pf - sstp1 -> sst.total_sf_pf;
	ppf = time_pf / meter_time;

	time_sf = sstp2 -> sst.cpu_sf_time - sstp1 -> sst.cpu_sf_time;
	psf = time_sf / meter_time;

	call spg_ring_0_info_ (time_rz);
	puse_rz = time_rz / meter_time;

	return;



/* reset entry point */

reset:	entry (unique_a, sstp1_a, sstp2_a, tcdp1_a, tcdp2_a);

dcl  unique_a fixed bin,
    (sstp1_a, sstp2_a, tcdp1_a, tcdp2_a) ptr;

	unique = unique_a;				/* copy args */
	sstp1 = sstp1_a;
	sstp2 = sstp2_a;
	tcdp1 = tcdp1_a;
	tcdp2 = tcdp2_a;
	unspec (iscf) = "0"b;
	

	return;



% include tcm;

%include hc_lock;



% include sst;


     end;




		    system_performance_graph.pl1    01/26/85  1315.2r w 01/22/85  1313.9       92268



/* ***********************************************************
   *                                                         *
   * Copyright, (C) Honeywell Information Systems Inc., 1982 *
   *                                                         *
   *********************************************************** */
/* * meter plotting command
   f.j. corbat'o, Jan. 1970, modified April 1970, modified April 1971
   Last modified January 1981 by J. Bongiovanni to fix minor bugs
   Modified November 1984 by M. Pandolf to include hc_lock.
*/
	

/* ******************************************************
   *                                                    *
   *                                                    *
   * Copyright (c) 1972 by Massachusetts Institute of   *
   * Technology and Honeywell Information Systems, Inc. *
   *                                                    *
   *                                                    *
   ****************************************************** */


system_performance_graph: spg: proc;

dcl (mn, nn, mu, nu) fixed bin;
dcl  ss char (arglen) based (argp);
dcl  arglen fixed bin;
dcl  argp ptr;
dcl  ct fixed bin static;
dcl  short_lines bit (1) int static init ("0"b);
dcl  llen fixed bin;

dcl  unique fixed bin static init (0);
dcl  first_time bit (1) aligned static init ("1"b);
dcl (i, length, chsw, qc) fixed bin (17);
dcl  code fixed bin (35);
dcl (sstp1, sstp2, tcdp1, tcdp2) ptr static;
dcl (pzi, pnmpi, pmpi, pint, ptc, ppf, psf, puse_rz, px, meter_time) float;
dcl (pdio, dkio, vtio) fixed bin;
dcl (time, wakeup_time) fixed bin (52);
dcl  minute_time fixed bin (35);
dcl  chname fixed bin (71) int static init (0);
dcl  str char (24);
dcl 1 st aligned,
    (2 hour pic "99",
    2 min pic "99.v99",
    2 blank char (1),
    2 graph char (101)) unal;
dcl  cstring char (110) aligned;
dcl  mplot_mode bit (1) aligned;
dcl  mplot_switch ptr static init (null());
dcl  outfilename char (168) var;
dcl (k, arg_count) fixed bin;
dcl  month fixed bin,
     dom fixed bin,
     tod fixed bin (52),
     year fixed bin,
     dow fixed bin,
     hour fixed bin (35),
     minute float bin,
     zone char (3) aligned;

dcl  iox_$user_output ptr ext,
     error_table_$badopt fixed bin (35) ext;

dcl  cu_$arg_count entry (fixed bin),
     cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)),
     com_err_ entry options (variable),
     iox_$attach_ioname entry (char (*), ptr, char (*), fixed bin (35)),
     iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)),
     iox_$close entry (ptr, fixed bin (35)),
     iox_$detach_iocb entry (ptr, fixed bin (35)),
     iox_$control entry (ptr, char(*), ptr, fixed bin(35)),
     ioa_$ioa_switch entry options (variable),
     date_time_ entry (fixed bin (52), char (*)),
     decode_clock_value_ entry (fixed bin (52), fixed bin, fixed bin, fixed bin, fixed bin (52),
     fixed bin, char (3) aligned),
     clock_ entry returns (fixed bin (52)),
     meter_util_$get_buffers entry (fixed bin, ptr, ptr, ptr, ptr, fixed bin (35)),
     meter_util_$fill_buffers entry (fixed bin),
     meter_util_$reset entry (fixed bin),
     spg_util_$reset entry (fixed bin, ptr, ptr, ptr, ptr),
     spg_util_ entry (float, float, float, float, float, float, float, float, float,
     char (110) aligned, fixed bin, fixed bin),
     spg_fs_info_ entry (fixed bin, fixed bin, fixed bin),
     system_info_$users entry (fixed bin, fixed bin, fixed bin, fixed bin),
     ipc_$create_ev_chn entry (fixed bin (71), fixed bin (35)),
     ipc_$decl_ev_call_chn entry (fixed bin (71), entry, ptr, fixed bin, fixed bin (35)),
     ipc_$drain_chn entry (fixed bin (71), fixed bin (35)),
     ipc_$delete_ev_chn entry (fixed bin (71), fixed bin (35)),
     timer_manager_$alarm_wakeup entry (fixed bin (52), bit (2), fixed bin (71)),
     timer_manager_$reset_alarm_wakeup entry (fixed bin (71));

dcl (bin, max, min, null, string, substr) builtin;

dcl  conversion condition;
			 

	

	mplot_mode = "0"b;
	ct = 0;

	call cu_$arg_count (arg_count);
	do k = 1 to arg_count;

	     call cu_$arg_ptr (k, argp, arglen, code);
	     if code ^= 0 then go to error;
	     
	     if substr (ss, 1, 1) ^= "-" then do;
		on conversion goto arg_error;
		ct = bin (ss, 17);
		revert conversion;
		if ct <= 0 then goto arg_error;
	     end;
	     else if ss = "-short" then short_lines = "1"b;
	     else if ss = "-long" | ss = "-lg" then short_lines = "0"b;
	     else if ss = "-output_file" | ss = "-of" then do;
		mplot_mode = "1"b;
		call cu_$arg_ptr (k + 1, argp, arglen, code);
		if (code = 0) & (substr (ss, 1, 1) ^= "-") then do;
		     outfilename = ss;
		     k = k + 1;
		end;
		else
		outfilename = "spg_output";
	     end;
	     else if ss = "-halt" | ss = "-ht" then
		go to stop;
	     else do;
arg_error:	call com_err_ (error_table_$badopt, "spg", ss);
		return;
	     end;

	end;

	if ^first_time then do;
	     call com_err_ (0, "spg", "Already invoked. Use -halt to terminate other invocation");
	     return;
	end;

	if ct = 0 then do;
	     call com_err_ (0, "spg", "Wakeup interval not specified.");
	     return;
	end;

	if mplot_mode then do;
	     call iox_$attach_ioname ("spg_output_", mplot_switch, "vfile_ " || outfilename || " -extend", code);
	     if code ^= 0 then go to error;
	     call iox_$open (mplot_switch, 2, "0"b, code);
	     if code ^= 0 then go to error;
	end;
	else
	mplot_switch = iox_$user_output;

	call date_time_ (clock_ (), str);		/* time_stamp output */
	call ioa_$ioa_switch (mplot_switch, "^5-^a", str);

	call meter_util_$get_buffers (unique, sstp1, sstp2, tcdp1, tcdp2, code);
	call meter_util_$fill_buffers (unique);
	call spg_util_$reset (unique, sstp1, sstp2, tcdp1, tcdp2);

	

	call date_time_ ((tcdp2 -> tcm.initialize_time), str);

	call ioa_$ioa_switch (mplot_switch, "up= ^20a, sys_hours= ^.1f, cpu_hours= ^.1f", substr (str, 1, 20),
	     (tcdp2 -> tcm.last_time - tcdp2 -> tcm.initialize_time)/36e8, tcdp2 -> tcm.processor_time/36e8);

	if chname = 0 then do;			/* create event channel */
	     call ipc_$create_ev_chn (chname, code);
	     if code ^= 0 then go to error;
	     call ipc_$decl_ev_call_chn (chname, line, null (), 1, code);
	     if code ^= 0 then go to error;
	end;
	else do;
	     call ipc_$drain_chn (chname, code);
	     if code ^= 0 then go to error;
	end;

	call line;

	return;



error:	call com_err_ (code, "spg", "");


stop:
	if mplot_switch ^= iox_$user_output & mplot_switch ^= null() then do;
	     call iox_$close (mplot_switch, code);
	     call iox_$detach_iocb (mplot_switch, code);
	end;
	mplot_switch = null();
	

	if chname ^= 0 then do;
	     call timer_manager_$reset_alarm_wakeup (chname);

	     call ipc_$delete_ev_chn (chname, code);
	     chname = 0;
	end;

	first_time = "1"b;
	short_lines = "0"b;

	return;

	

line:	entry;					/* routine to do a line */

	time = clock_ ();
	call decode_clock_value_ (time, month, dom, year, tod, dow, zone);
	hour = tod/3.6e9;
	minute = tod / 6.0e7 - hour * 60;

	st.hour = hour;
	st.min = minute;
	st.blank = " ";
	st.graph = (11)"|    .    ";

	call meter_util_$fill_buffers (unique);
	call spg_util_ (pzi, pnmpi, pmpi, pint, ptc, ppf, psf, puse_rz, px, cstring, length, chsw);

/* * print line if configuration or tuning has changed */
	if chsw ^= 0 then
	     call ioa_$ioa_switch (mplot_switch, substr (cstring, 1, length));


	call fill_in (pzi + pnmpi + pmpi + pint + ptc + ppf + psf + puse_rz, 0e0, "y");
	call fill_in (pzi + pnmpi + pmpi + pint + ptc + ppf, psf, "s");
	call fill_in (pzi + pnmpi + pmpi + pint + ptc, ppf, "p");
	call fill_in (pzi + pnmpi + pmpi + pint, ptc, "t");
	call fill_in (pzi + pnmpi + pmpi, pint, "i");
						/*	call fill_in (pzi + pnmpi + pmpi + px, 0e0, "x");	NOTE: px not currently being used */
	call fill_in (pzi + pnmpi, pmpi, "m");		/* m is mp_idle */
	call fill_in (pzi, pnmpi, "*");		/* * is nmp_idle */

	call fill_in ((tcdp2 -> tcm.avequeue), 0e0, "q");
	call fill_in ((tcdp2 -> tcm.ave_eligible), 0e0, "e");

	if (tcdp2 -> tcm.response_count - tcdp1 -> tcm.response_count) ^= 0 then
	     call fill_in ((tcdp2 -> tcm.response_time - tcdp1 -> tcm.response_time) /
	     ((tcdp2 -> tcm.response_count - tcdp1 -> tcm.response_count) * 1e5), 0e0, "r");

	if first_time then
	     meter_time = tcdp2 -> tcm.last_time - tcdp2 -> tcm.initialize_time;
	else
	meter_time = tcdp2 -> tcm.last_time - tcdp1 -> tcm.last_time;

	qc = 0;
	do i = 0 to 5;
	     qc = qc + tcdp2 -> tcm.quit_counts (i) - tcdp1 -> tcm.quit_counts (i);
	end;

	call fill_in (qc/ (meter_time/60e6), 0e0, "Q");
	call fill_in ((tcdp2 -> tcm.schedulings - tcdp1 -> tcm.schedulings)/ (meter_time/1e7), 0e0, "S");

	call spg_fs_info_ (pdio, dkio, vtio);
	call fill_in (1e2 - pdio / (meter_time / 1e5), 0e0, "P"); /* 1000 max */
	call fill_in (1e2 - dkio / (meter_time / 1e5), 0e0, "D"); /* 1000 max */
	call fill_in (1e2 - vtio / (meter_time / 1e5), 0e0, "V"); /* 1000 max */

	call system_info_$users (mn, nn, mu, nu);
	call fill_in (nu / 1e1, 0e0, "-");
	call fill_in ((nn), 0e0, "+");

	if short_lines then llen = 59;
	else llen = 109;
	do i = 10 to 90 by 10;			/* re-place some "|" for clarity */
	     if substr (graph, i, 1) = substr (graph, i+2, 1) then
		if substr (graph, i, 1) = substr (graph, i+1, 1) then
		     substr (graph, i+1, 1) = "|";
	end;
	call ioa_$ioa_switch (mplot_switch, substr (string (st), 1, llen));

	minute_time = time/60e6;
	wakeup_time = (minute_time + ct) * 60000000;

	call timer_manager_$alarm_wakeup (wakeup_time, "00"b, chname);

	if ^first_time then
	     call iox_$control (mplot_switch, "start", null (), code);

	call meter_util_$reset (unique);
	first_time = "0"b;

	return;

	

/* internal procedure */

fill_in:	proc (x, delx, token);

dcl (x, delx) float,
     token char (1) aligned;

dcl (i1, i2) fixed bin;


	     if ^short_lines then do;
		i1 = max (min (bin (x + .5e0, 17), 100), 0);
		i2 = max (min (bin (x + delx + .5e0, 17), 100), 0);
	     end;
	     else do;
		i1 = max (min (bin (x*.5e0 + .5e0, 17), 50), 0);
		i2 = max (min (bin ((x + delx)*.5e0 + .5e0, 17), 50), 0);
	     end;
	     do i = i1 to i2;
		substr (st.graph, i + 1, 1) = token;
	     end;

	     return;


	end fill_in;

	

% include tcm;

% include hc_lock;



     end;



		    bull_copyright_notice.txt       08/30/05  1008.4r   08/30/05  1007.3    00020025

                                          -----------------------------------------------------------


Historical Background

This edition of the Multics software materials and documentation is provided and donated
to Massachusetts Institute of Technology by Group Bull including Bull HN Information Systems Inc. 
as a contribution to computer science knowledge.  
This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology,
Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell Bull Inc., Groupe Bull
and Bull HN Information Systems Inc. to the development of this operating system. 
Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970),
renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership
of Professor Fernando Jose Corbato.Users consider that Multics provided the best software architecture for 
managing computer hardware properly and for executing programs. Many subsequent operating systems
incorporated Multics principles.
Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., 
as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. .

                                          -----------------------------------------------------------

Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without
fee is hereby granted,provided that the below copyright notice and historical background appear in all copies
and that both the copyright notice and historical background and this permission notice appear in supporting
documentation, and that the names of MIT, HIS, Bull or Bull HN not be used in advertising or publicity pertaining
to distribution of the programs without specific prior written permission.
    Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc.
    Copyright 2006 by Bull HN Information Systems Inc.
    Copyright 2006 by Bull SAS
    All Rights Reserved

