head     56.3;
access   paws bayes jws quist brad dew jwh;
symbols  ;
locks    ; strict;
comment  @# @;


56.3
date     93.01.27.13.27.15;  author jwh;  state Exp;
branches ;
next     56.2;

56.2
date     93.01.27.12.05.32;  author jwh;  state Exp;
branches ;
next     56.1;

56.1
date     91.11.05.09.48.03;  author jwh;  state Exp;
branches ;
next     55.1;

55.1
date     91.08.25.10.24.39;  author jwh;  state Exp;
branches ;
next     54.1;

54.1
date     91.03.18.15.28.00;  author jwh;  state Exp;
branches ;
next     53.1;

53.1
date     91.03.11.19.28.40;  author jwh;  state Exp;
branches ;
next     52.1;

52.1
date     91.02.19.09.12.37;  author jwh;  state Exp;
branches ;
next     51.1;

51.1
date     91.01.30.16.12.25;  author jwh;  state Exp;
branches ;
next     50.1;

50.1
date     90.10.29.16.27.02;  author jwh;  state Exp;
branches ;
next     49.1;

49.1
date     90.08.14.14.11.18;  author jwh;  state Exp;
branches ;
next     48.1;

48.1
date     90.07.26.11.17.32;  author jwh;  state Exp;
branches ;
next     47.1;

47.1
date     90.05.14.11.00.42;  author dew;  state Exp;
branches ;
next     46.1;

46.1
date     90.05.07.08.47.46;  author jwh;  state Exp;
branches ;
next     45.1;

45.1
date     90.04.19.15.55.42;  author jwh;  state Exp;
branches ;
next     44.1;

44.1
date     90.04.01.22.12.46;  author jwh;  state Exp;
branches ;
next     43.1;

43.1
date     90.03.20.14.04.42;  author jwh;  state Exp;
branches ;
next     42.1;

42.1
date     90.01.23.17.49.36;  author jwh;  state Exp;
branches ;
next     41.1;

41.1
date     89.12.22.11.31.28;  author jwh;  state Exp;
branches ;
next     40.1;

40.1
date     89.09.29.11.53.19;  author jwh;  state Exp;
branches ;
next     39.1;

39.1
date     89.09.26.16.37.34;  author dew;  state Exp;
branches ;
next     38.1;

38.1
date     89.08.29.11.29.37;  author jwh;  state Exp;
branches ;
next     37.1;

37.1
date     89.05.12.11.42.12;  author dew;  state Exp;
branches ;
next     36.1;

36.1
date     89.02.06.10.20.29;  author dew;  state Exp;
branches ;
next     35.1;

35.1
date     89.02.02.13.35.35;  author dew;  state Exp;
branches ;
next     34.1;

34.1
date     89.01.23.16.10.44;  author jwh;  state Exp;
branches ;
next     33.1;

33.1
date     89.01.16.11.42.29;  author dew;  state Exp;
branches ;
next     32.1;

32.1
date     89.01.10.11.51.18;  author bayes;  state Exp;
branches ;
next     31.1;

31.1
date     88.12.14.18.12.25;  author bayes;  state Exp;
branches ;
next     30.1;

30.1
date     88.12.09.13.49.16;  author dew;  state Exp;
branches ;
next     29.1;

29.1
date     88.10.31.15.34.16;  author bayes;  state Exp;
branches ;
next     28.1;

28.1
date     88.10.06.11.00.51;  author dew;  state Exp;
branches ;
next     27.1;

27.1
date     88.09.29.11.37.50;  author bayes;  state Exp;
branches ;
next     26.1;

26.1
date     88.09.28.13.16.40;  author bayes;  state Exp;
branches ;
next     25.1;

25.1
date     88.03.02.09.33.13;  author bayes;  state Exp;
branches ;
next     24.1;

24.1
date     87.08.31.09.54.28;  author jws;  state Exp;
branches ;
next     23.1;

23.1
date     87.08.26.10.33.34;  author bayes;  state Exp;
branches ;
next     22.1;

22.1
date     87.08.17.11.18.44;  author bayes;  state Exp;
branches ;
next     21.1;

21.1
date     87.08.12.14.01.15;  author bayes;  state Exp;
branches ;
next     20.1;

20.1
date     87.07.30.11.14.24;  author bayes;  state Exp;
branches ;
next     19.1;

19.1
date     87.06.01.08.29.15;  author jws;  state Exp;
branches ;
next     18.1;

18.1
date     87.05.20.15.29.32;  author bayes;  state Exp;
branches ;
next     17.1;

17.1
date     87.04.30.10.40.05;  author jws;  state Exp;
branches ;
next     16.1;

16.1
date     87.04.26.15.51.48;  author jws;  state Exp;
branches ;
next     15.1;

15.1
date     87.04.13.09.27.46;  author jws;  state Exp;
branches ;
next     14.1;

14.1
date     87.04.01.15.33.51;  author jws;  state Exp;
branches ;
next     13.1;

13.1
date     87.02.28.18.36.44;  author jws;  state Exp;
branches ;
next     12.1;

12.1
date     87.02.02.13.27.46;  author jws;  state Exp;
branches ;
next     11.1;

11.1
date     87.01.19.09.54.25;  author jws;  state Exp;
branches ;
next     10.1;

10.1
date     86.12.24.11.03.22;  author jws;  state Exp;
branches ;
next     9.1;

9.1
date     86.12.12.14.45.57;  author bayes;  state Exp;
branches ;
next     8.1;

8.1
date     86.11.27.12.01.44;  author jws;  state Exp;
branches ;
next     7.1;

7.1
date     86.11.20.13.52.43;  author hal;  state Exp;
branches ;
next     6.1;

6.1
date     86.11.04.18.04.02;  author paws;  state Exp;
branches ;
next     5.1;

5.1
date     86.10.28.16.53.01;  author hal;  state Exp;
branches ;
next     4.1;

4.1
date     86.09.30.19.51.56;  author hal;  state Exp;
branches ;
next     3.1;

3.1
date     86.09.01.12.02.01;  author hal;  state Exp;
branches ;
next     2.1;

2.1
date     86.07.30.14.49.42;  author hal;  state Exp;
branches ;
next     1.1;

1.1
date     86.06.30.15.26.23;  author danm;  state tmp;
branches ;
next     ;


desc
@Base file for PWS 3.2 release.

@


56.3
log
@
pws2rcs automatic delta on Wed Jan 27 13:14:25 MST 1993
@
text
@{                                                                           }
{ HP 9836C graphics hooks, and workstation init module                      }
{                                                                           }
{ Module    = C_HOOK                                                        }
{ Programer = BJS                                                           }
{ Date      = 2-7-83                                                        }
{                                                                           }
{ Purpose: To initialize the graphics crt state variables for the HP 9836C. }

{ Rev history                                                               }
{  Created  - 02-07-83                                                      }
{  Modified - 01-18-84 jws                                                  }

{     (c) Copyright Hewlett-Packard Company, 1985.
      All rights are reserved.  Copying or other
      reproduction of this program except for archival
      purposes is prohibited without the prior
      written consent of Hewlett-Packard Company.


		  RESTRICTED RIGHTS LEGEND

      Use, duplication, or disclosure by the Government
      is subject to restrictions as set forth in
      paragraph (b) (3) (B) of the Rights in Technical
      Data and Computer Software clause in
      DAR 7-104.9(a).

      HEWLETT-PACKARD COMPANY
      Fort Collins, Colorado                              }

$modcal$
program c_hook(output);

import sysdevs,sysglobals;

type
  sysflag_def = packed record
		  bit7,bit6,hpib,crt_config,
		  kbd,high,big_graph,alpha50 : boolean;
		end;

  crt_reg_def = packed record
		  selfinit,bit14,bit13,top1,top2,highlite,
		  graph,alpha,
		  bit7,bit6,bit5,bit4,bit3,bit2,bit1,bit0 : boolean;
		end;

  c_map_def   = packed array [0..15] of shortint;

var
  my_sysflag [ hex('fffffed2') ] : sysflag_def; {ext to 8 digits SFB 4/26/85}
  crt_reg [ hex('0051fffe') ]    : crt_reg_def; {SFB 4/26/85}
  c_map [ hex('0051fb00') ]      : c_map_def; {SFB 4/26/85}
  g_on [ hex ('0051fffc') ] : shortint; {SFB 4/26/85}
  old_toggle_hook : procedure;
  old_dump_hook   : procedure;
  graphics_base ['GRAPHICSBASE'] : integer;

procedure dump_c;

{ Purpose:  To dump 'C' bit map }

label 1;

const
  gwidthb = 64;
  gmaxheight = 512;
  gbuffersize = gwidthb + 6;

type
  gbyte = 0..255;
  row_def = packed array [0..(512*390)-1] of gbyte;

var
  row : ^row_def;

  gbuffer : packed array [1..gbuffersize] of char;
  i,j : integer;
  index : integer;
  bit_mask : integer;
  result : integer;

begin

  row := anyptr(graphics_base);

  gbuffer[1] := chr(27); { escape sequence for graphics }
  gbuffer[2] := '*';
  gbuffer[3] := 'b';
  gbuffer[4] := '6';
  gbuffer[5] := '4';
  gbuffer[6] := 'W';

  for j := 0 to 389 do
    begin
      for i := 0 to 63 do
	begin
	  result := 0;
	  index := j*512+i*8;
	  bit_mask := 256;
	  for index := index to index+7 do
	    begin
	      bit_mask := bit_mask div 2;
	      if row^[index] <> 0 then result := bit_mask+result;
	    end;
	  gbuffer[i+7] := chr(result);
	end;
	write(gfiles[4]^,gbuffer:gwidthb+6);
	if ioresult <> ord(inoerror) then goto 1;
    end;

  write(gfiles[4]^,#27'*rB');   { terminate graphics sequence }
1:
end;

procedure toggle_c;

begin
  graphicstate := not graphicstate;
  if graphicstate then g_on := 1
  else                 g_on := 0;
end;

procedure init_c;

var
  i : integer;

begin
  g_on      := 0;                    { turn off graphics screen }
  c_map[0] := -1;
  for i := 1 to 15 do
    c_map[i] := 0;                   { init color map is b&w }
  graphics_base      := hex('00520000');        {SFB 4/26/85}
  togglegraphicshook := toggle_c;
  dumpgraphicshook   := dump_c;
end;

$partial_eval on$  { check for a HP 9836C }
begin
  if (currentcrt = alphatype) and            { jws 1/18/84 }
    my_sysflag.big_graph and my_sysflag.crt_config and
    (not crt_reg.top1) and (crt_reg.top2) then
    init_c;
end.
@


56.2
log
@
pws2rcs automatic delta on Wed Jan 27 11:57:27 MST 1993
@
text
@d1 146
@


56.1
log
@Automatic bump of revision number for PWS version 3.25
@
text
@a0 146
{                                                                           }
{ HP 9836C graphics hooks, and workstation init module                      }
{                                                                           }
{ Module    = C_HOOK                                                        }
{ Programer = BJS                                                           }
{ Date      = 2-7-83                                                        }
{                                                                           }
{ Purpose: To initialize the graphics crt state variables for the HP 9836C. }

{ Rev history                                                               }
{  Created  - 02-07-83                                                      }
{  Modified - 01-18-84 jws                                                  }

{     (c) Copyright Hewlett-Packard Company, 1985.
      All rights are reserved.  Copying or other
      reproduction of this program except for archival
      purposes is prohibited without the prior
      written consent of Hewlett-Packard Company.


		  RESTRICTED RIGHTS LEGEND

      Use, duplication, or disclosure by the Government
      is subject to restrictions as set forth in
      paragraph (b) (3) (B) of the Rights in Technical
      Data and Computer Software clause in
      DAR 7-104.9(a).

      HEWLETT-PACKARD COMPANY
      Fort Collins, Colorado                              }

$modcal$
program c_hook(output);

import sysdevs,sysglobals;

type
  sysflag_def = packed record
		  bit7,bit6,hpib,crt_config,
		  kbd,high,big_graph,alpha50 : boolean;
		end;

  crt_reg_def = packed record
		  selfinit,bit14,bit13,top1,top2,highlite,
		  graph,alpha,
		  bit7,bit6,bit5,bit4,bit3,bit2,bit1,bit0 : boolean;
		end;

  c_map_def   = packed array [0..15] of shortint;

var
  my_sysflag [ hex('fffffed2') ] : sysflag_def; {ext to 8 digits SFB 4/26/85}
  crt_reg [ hex('0051fffe') ]    : crt_reg_def; {SFB 4/26/85}
  c_map [ hex('0051fb00') ]      : c_map_def; {SFB 4/26/85}
  g_on [ hex ('0051fffc') ] : shortint; {SFB 4/26/85}
  old_toggle_hook : procedure;
  old_dump_hook   : procedure;
  graphics_base ['GRAPHICSBASE'] : integer;

procedure dump_c;

{ Purpose:  To dump 'C' bit map }

label 1;

const
  gwidthb = 64;
  gmaxheight = 512;
  gbuffersize = gwidthb + 6;

type
  gbyte = 0..255;
  row_def = packed array [0..(512*390)-1] of gbyte;

var
  row : ^row_def;

  gbuffer : packed array [1..gbuffersize] of char;
  i,j : integer;
  index : integer;
  bit_mask : integer;
  result : integer;

begin

  row := anyptr(graphics_base);

  gbuffer[1] := chr(27); { escape sequence for graphics }
  gbuffer[2] := '*';
  gbuffer[3] := 'b';
  gbuffer[4] := '6';
  gbuffer[5] := '4';
  gbuffer[6] := 'W';

  for j := 0 to 389 do
    begin
      for i := 0 to 63 do
	begin
	  result := 0;
	  index := j*512+i*8;
	  bit_mask := 256;
	  for index := index to index+7 do
	    begin
	      bit_mask := bit_mask div 2;
	      if row^[index] <> 0 then result := bit_mask+result;
	    end;
	  gbuffer[i+7] := chr(result);
	end;
	write(gfiles[4]^,gbuffer:gwidthb+6);
	if ioresult <> ord(inoerror) then goto 1;
    end;

  write(gfiles[4]^,#27'*rB');   { terminate graphics sequence }
1:
end;

procedure toggle_c;

begin
  graphicstate := not graphicstate;
  if graphicstate then g_on := 1
  else                 g_on := 0;
end;

procedure init_c;

var
  i : integer;

begin
  g_on      := 0;                    { turn off graphics screen }
  c_map[0] := -1;
  for i := 1 to 15 do
    c_map[i] := 0;                   { init color map is b&w }
  graphics_base      := hex('00520000');        {SFB 4/26/85}
  togglegraphicshook := toggle_c;
  dumpgraphicshook   := dump_c;
end;

$partial_eval on$  { check for a HP 9836C }
begin
  if (currentcrt = alphatype) and            { jws 1/18/84 }
    my_sysflag.big_graph and my_sysflag.crt_config and
    (not crt_reg.top1) and (crt_reg.top2) then
    init_c;
end.
@


55.1
log
@Automatic bump of revision number for PWS version 3.25A
@
text
@@


54.1
log
@Automatic bump of revision number for PWS version 3.24
@
text
@@


53.1
log
@Automatic bump of revision number for PWS version 3.24B
@
text
@@


52.1
log
@Automatic bump of revision number for PWS version 3.24A
@
text
@@


51.1
log
@Automatic bump of revision number for PWS version 3.24d
@
text
@@


50.1
log
@Automatic bump of revision number for PWS version 3.23c
@
text
@@


49.1
log
@Automatic bump of revision number for PWS version 3.24b
@
text
@@


48.1
log
@Automatic bump of revision number for PWS version 3.24a
@
text
@@


47.1
log
@Automatic bump of revision number for PWS version 3.23
@
text
@@


46.1
log
@Automatic bump of revision number for PWS version 3.23
@
text
@@


45.1
log
@Automatic bump of revision number for PWS version 3.23C
@
text
@@


44.1
log
@Automatic bump of revision number for PWS version 3.23B
@
text
@@


43.1
log
@Automatic bump of revision number for PWS version 3.23aA
@
text
@@


42.1
log
@Automatic bump of revision number for PWS version 3.23e
@
text
@@


41.1
log
@Automatic bump of revision number for PWS version 3.23d
@
text
@@


40.1
log
@Automatic bump of revision number for PWS version 3.23c
@
text
@@


39.1
log
@Automatic bump of revision number for PWS version 3.23b
@
text
@@


38.1
log
@Automatic bump of revision number for PWS version 3.23a
@
text
@@


37.1
log
@Automatic bump of revision number for PWS version 3.3a
@
text
@@


36.1
log
@Automatic bump of revision number for PWS version 3.22
@
text
@@


35.1
log
@Automatic bump of revision number for PWS version 3.22
@
text
@@


34.1
log
@Automatic bump of revision number for PWS version 3.22
@
text
@@


33.1
log
@Automatic bump of revision number for PWS version 3.22D
@
text
@@


32.1
log
@Automatic bump of revision number for PWS version 3.22C
@
text
@@


31.1
log
@Automatic bump of revision number for PWS version 3.22B
@
text
@@


30.1
log
@Automatic bump of revision number for PWS version 3.22A
@
text
@@


29.1
log
@Automatic bump of revision number for PWS version 3.22b
@
text
@@


28.1
log
@Automatic bump of revision number for PWS version 3.3b
@
text
@@


27.1
log
@Automatic bump of revision number for PWS version 3.3a
@
text
@@


26.1
log
@Automatic bump of revision number for PWS version 3.3 Synch
@
text
@@


25.1
log
@Automatic bump of revision number for PWS version 3.2Y
@
text
@@


24.1
log
@Automatic bump of revision number for PWS version 3.2
@
text
@@


23.1
log
@Automatic bump of revision number for PWS version 3.2P
@
text
@@


22.1
log
@Automatic bump of revision number for PWS version 3.2N
@
text
@@


21.1
log
@Automatic bump of revision number for PWS version 3.2M
@
text
@@


20.1
log
@Automatic bump of revision number for PWS version 3.2L
@
text
@@


19.1
log
@Automatic bump of revision number for PWS version 3.2K
@
text
@@


18.1
log
@Automatic bump of revision number for PWS version 3.2J
@
text
@@


17.1
log
@Automatic bump of revision number for PWS version 3.2I+
@
text
@@


16.1
log
@Automatic bump of revision number for PWS version 3.2I
@
text
@@


15.1
log
@Automatic bump of revision number for PWS version 3.2H
@
text
@@


14.1
log
@Automatic bump of revision number for PWS version 3.2G
@
text
@@


13.1
log
@Automatic bump of revision number for PWS version 3.2F
@
text
@@


12.1
log
@Automatic bump of revision number for PWS version 3.2E
@
text
@@


11.1
log
@Automatic bump of revision number for PWS version 3.2D
@
text
@@


10.1
log
@Automatic bump of revision number for PWS version 3.2C
@
text
@@


9.1
log
@Automatic bump of revision number for PWS version 3.2B
@
text
@@


8.1
log
@Automatic bump of revision number for PWS version 3.2A
@
text
@@


7.1
log
@Automatic bump of revision number for PWS version 3.2l
@
text
@@


6.1
log
@Automatic bump of revision number for PWS version 3.2k
@
text
@@


5.1
log
@Automatic bump of revision number for PWS version 3.2j
@
text
@@


4.1
log
@Automatic bump of revision number for PWS version 3.2i
@
text
@@


3.1
log
@Automatic bump of revision number for PWS version 3.2h
@
text
@@


2.1
log
@Auto bump rev number to 2.1 for sys 3.2e.
@
text
@@


1.1
log
@Initial revision
@
text
@@
