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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

23.1
date     87.08.26.10.31.13;  author bayes;  state Exp;
branches ;
next     22.2;

22.2
date     87.08.25.19.41.11;  author jws;  state Exp;
branches ;
next     22.1;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1.1
date     86.06.30.15.20.45;  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
@					      (*

 (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                         *)


$SEARCH 'IOLIB:KERNEL.CODE'$

$COPYRIGHT 'COPYRIGHT (C) 1985 BY HEWLETT-PACKARD COMPANY'$
$MODCAL ON$
$PARTIAL_EVAL ON$
$STACKCHECK ON$
$RANGE OFF$
$DEBUG OFF$
$OVFLCHECK OFF$
$PAGE$

(************************************************************************)
(*                                                                      *)
(*          RELEASED        VERSION 3.1                                 *)
(*                                                                      *)
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      IOLIB           RS_DRIVERS                                      *)
(*                                                                      *)
(*                                                                      *)
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      library      -  IOLIB                                           *)
(*      name         -  RS_DRIVERS                                      *)
(*      module(s)    -  init_rs                                         *)
(*                   -  rs                                              *)
(*                                                                      *)
(*      date         -  6 August 1982                                   *)
(*      update       -  5 June   1985                                   *)
(*      release      -  12 Jul   1985                                   *)
(*                                                                      *)
(*      source       -  IOLIB:RS_DRV.TEXT                               *)
(*      object       -  IOLIB:RS_DRV.CODE                               *)
(*                                                                      *)
(************************************************************************)
$PAGE$
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      BUG FIX HISTORY                                                 *)
(*                                                                      *)
(* ------ for 3.0 release                                               *)
(*   jws       J Schmidt        io_init_rs    Find 98644 cards          *)
(*             3/5/84                                                   *)
(* ------ for 3.1 release                                               *)
(*   jws2      J Schmidt        io_init_rs    Add default setups        *)
(*             6/5/85                         using  control regs       *)
(*                                            21 and 22.                *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(************************************************************************)
$PAGE$
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      This is the source code for an external procedures library      *)
(*      to be used for general purpose interfacing on the HP 9826.      *)
(*                                                                      *)
(*      The library consists of 3 primary sets of modules -             *)
(*                                                                      *)
(*              1.      KERNEL modules                                  *)
(*              2.      driver modules                                  *)
(*              3.      IOLIB  modules                                  *)
(*                                                                      *)
(*      The KERNEL modules consist of the following modules -           *)
(*                                                                      *)
(*              1.      iodeclarations  ( contains static r/w space )   *)
(*              2.      iocomasm                                        *)
(*              3.      general_0       ( initialization & low level    *)
(*                                        routines like ioread/iowrite) *)
(*      The KERNEL modules also have an executable program segement     *)
(*      that gets executed at the time it is loaded.  This program      *)
(*      initializes the static read/write memory.  This program also    *)
(*      allocates the temporary storage for any card that exists -      *)
(*      independent of whether there is or is not a driver for it.      *)
(*                                                                      *)
(*      The driver modules consist of the actual assembly or PASCAL     *)
(*      routines that deal with a specific interface card.  There is    *)
(*      also an executable program segment for each driver module.      *)
(*      This program searches the select code table in the static r/w   *)
(*      initialized by the KERNEL general_0 module for all select codes *)
(*      that have the right interface card ( HPIB drivers will search   *)
(*      for the 98624 interface ).  This program will then set up the   *)
(*      driver tables to point to the correct drivers.                  *)
(*                                                                      *)
(*      The rest of the IOLIB modules are high-level modules that are   *)
(*      used by an end user in his/her application program.             *)
(*                                                                      *)
(*      The KERNEL and some set of driver modules will exist in the     *)
(*             INITLIB file as object code ( not EXPORT text ).  The    *)
(*      export text will reside on the IO file.  The rest               *)
(*      of the library will reside on the IO file.                      *)
(*                                                                      *)
(************************************************************************)
$PAGE$
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      REFERENCES :                                                    *)
(*                                                                      *)
(*                                                                      *)
(*      1.  9826 I/O Designers Guide            ( Loyd Nelson )         *)
(*                                                                      *)
(*      2.  68000 Manual                        ( Motorola )            *)
(*                                                                      *)
(*      3.  Pascal Language System Users Manual ( 9826-90070 )          *)
(*                                                                      *)
(*      4.  Pascal Procdure Library Users Manual( 9826-90074 )          *)
(*                                                                      *)
(*      5.  9826 card documentation             ( Mfg. Specs. )         *)
(*                                                                      *)
(*      6.  Pascal I/O Library IRS              ( Tim Mikkelsen )       *)
(*                                                                      *)
(*      7.  98626A ERS                          ( Mfg. Specs. )         *)
(*                                                                      *)
(*                                                                      *)
(************************************************************************)

PROGRAM rs_initialize ( INPUT , OUTPUT );
$PAGE$
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      RS-232 CARD DRIVERS                                             *)
(*                                                                      *)
(*                                                                      *)
(************************************************************************)
EXTERNAL MODULE rs;
	{ update  2/14/83

	  purpose This module is a declaration of the importation text for
		  the external drivers.

	  note    The assembly language code that is imported needs to be
		  called 'rs'.  The routines need to be called
		  'rs_@@@@@@@@@@@@'
	}

IMPORT  sysglobals, iodeclarations ;

EXPORT


  PROCEDURE rs_init  ( temp : ANYPTR );
  PROCEDURE rs_isr   ( temp : PISRIB );
  PROCEDURE rs_rdb   ( temp : ANYPTR ;  VAR x : CHAR);
  PROCEDURE rs_wtb   ( temp : ANYPTR ;  val   : CHAR);
  PROCEDURE rs_rdw   ( temp : ANYPTR ;  VAR x : io_word);
  PROCEDURE rs_wtw   ( temp : ANYPTR ;  val   : io_word);
  PROCEDURE rs_rds   ( temp : ANYPTR ;  reg   : io_word;
					 VAR x : io_word);
  PROCEDURE rs_wtc   ( temp : ANYPTR ;  reg   : io_word;
					 val   : io_word );
  PROCEDURE rs_tfr   ( temp : ANYPTR ;  bcb   : ANYPTR );




END; { of rs }
$PAGE$
MODULE init_rs;
	{ update  3/5/84 jws

	  purpose This module initializes the RS 232 drivers.

	}


IMPORT    iodeclarations ;

EXPORT


  VAR
    rs_drivers    : drv_table_type;

  PROCEDURE io_init_rs;



IMPLEMENT


  IMPORT  sysglobals ,
	  isr ,
	  general_0 ,
	  rs ;

  PROCEDURE io_init_rs;

  TYPE
    baudarraytype = ARRAY [0..15] of io_word;             {jws2 }

  CONST
    baudarray = baudarraytype[50,75,110,134,150,200,
		       300,600,1200,1800,2400,3600,
		       4800,7200,9600,19200];             {jws2 }

  VAR
    io_isc        : type_isc;
    dummyword     : io_word;
    io_lvl        : io_byte;
    io_baudsw     : io_word;                               {jws2}
    io_linesw     : io_word;                               {jws2}
  BEGIN

    io_revid := io_revid + ' R3.2';

    { set up the driver tables }

    WITH rs_drivers DO BEGIN
      rs_drivers := dummy_drivers ;
      iod_init  := rs_init;
      iod_isr   := rs_isr;
      iod_rdb   := rs_rdb;
      iod_wtb   := rs_wtb;
      iod_rdw   := rs_rdw;
      iod_wtw   := rs_wtw;
      iod_rds   := rs_rds;
      iod_wtc   := rs_wtc;
      iod_tfr   := rs_tfr;
    END; { of WITH }


    { set up drivers for the interfaces }

    FOR io_isc:=iominisc TO iomaxisc DO
      WITH isc_table[io_isc] DO BEGIN

	IF (card_id = hp98626) or (card_id=hp98644)       { jws 3/5/84 }
	  THEN BEGIN

	    io_drv_ptr:=ADDR(rs_drivers);

	    { if the card exists then link in an ISR for it }
	    { ??? - what happens if an ISR fires during init }

	    io_lvl:=((ioread_byte(io_isc,3) DIV 16) MOD 4)+3;
	    IF io_tmp_ptr^.myisrib.INTREGADDR <> NIL
	      THEN BEGIN
		{ if isr exists then unlink it }
		ISRUNLINK(io_lvl ,                      { level         }
		    ADDR(io_tmp_ptr^.myisrib));         { isrib info    }
	      END; { of IF }

	    PERMISRLINK(io_drv_ptr^.iod_isr,            { isr           }
		    ANYPTR(INTEGER(card_ptr)+3),        { card address  }
		    192,                                { intr. mask    }
		    192,                                { intr. value   }
		    io_lvl,                             { level         }
		    ADDR(io_tmp_ptr^.myisrib));         { isrib info    }
	  END; { of IF card_type = hp98626 }

    END; { of FOR io_isc WITH isc_table[io_isc] BEGIN }


    { call the actual driver initialization }

    FOR io_isc:=iominisc TO iomaxisc DO
      WITH isc_table[io_isc] DO
      IF (card_id = hp98626) OR (card_id = hp98644)         { jws  3/5/84 }
	THEN BEGIN

	  io_baudsw:=0;                                     { jws2 }
	  io_linesw:=0;                                     { jws2 }
	  IF card_id=hp98626 THEN BEGIN                     { jws2 }
	    io_baudsw:=ioread_byte(io_isc,5) MOD 16; { baud switch - jws2 }
	    io_linesw:=ioread_byte(io_isc,7); { pickup line control- jws2 }
	  END                                               { jws2 }
	  ELSE BEGIN                                        { jws2 }
	    io_baudsw:=10;   { defaults for 98644 }         { jws2 }
	    io_linesw:=3;                                   { jws2 }
	  END;
	  iocontrol(io_isc,21,baudarray[io_baudsw]);        { jws2 }
	  iocontrol(io_isc,22,io_linesw); { set defaults }  { jws2 }

	  CALL( io_drv_ptr^.iod_init, io_tmp_ptr );

	END; { of WITH IF }


  END; { of io_init_rs }

END; { of MODULE init_rs }
$PAGE$

IMPORT    init_rs ,
	  LOADER ;


BEGIN
  io_init_rs;
  MARKUSER;
END. { of rs_initialize }
@


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


56.1
log
@Automatic bump of revision number for PWS version 3.25
@
text
@a0 323
					      (*

 (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                         *)


$SEARCH 'IOLIB:KERNEL.CODE'$

$COPYRIGHT 'COPYRIGHT (C) 1985 BY HEWLETT-PACKARD COMPANY'$
$MODCAL ON$
$PARTIAL_EVAL ON$
$STACKCHECK ON$
$RANGE OFF$
$DEBUG OFF$
$OVFLCHECK OFF$
$PAGE$

(************************************************************************)
(*                                                                      *)
(*          RELEASED        VERSION 3.1                                 *)
(*                                                                      *)
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      IOLIB           RS_DRIVERS                                      *)
(*                                                                      *)
(*                                                                      *)
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      library      -  IOLIB                                           *)
(*      name         -  RS_DRIVERS                                      *)
(*      module(s)    -  init_rs                                         *)
(*                   -  rs                                              *)
(*                                                                      *)
(*      date         -  6 August 1982                                   *)
(*      update       -  5 June   1985                                   *)
(*      release      -  12 Jul   1985                                   *)
(*                                                                      *)
(*      source       -  IOLIB:RS_DRV.TEXT                               *)
(*      object       -  IOLIB:RS_DRV.CODE                               *)
(*                                                                      *)
(************************************************************************)
$PAGE$
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      BUG FIX HISTORY                                                 *)
(*                                                                      *)
(* ------ for 3.0 release                                               *)
(*   jws       J Schmidt        io_init_rs    Find 98644 cards          *)
(*             3/5/84                                                   *)
(* ------ for 3.1 release                                               *)
(*   jws2      J Schmidt        io_init_rs    Add default setups        *)
(*             6/5/85                         using  control regs       *)
(*                                            21 and 22.                *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(*                                                                      *)
(************************************************************************)
$PAGE$
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      This is the source code for an external procedures library      *)
(*      to be used for general purpose interfacing on the HP 9826.      *)
(*                                                                      *)
(*      The library consists of 3 primary sets of modules -             *)
(*                                                                      *)
(*              1.      KERNEL modules                                  *)
(*              2.      driver modules                                  *)
(*              3.      IOLIB  modules                                  *)
(*                                                                      *)
(*      The KERNEL modules consist of the following modules -           *)
(*                                                                      *)
(*              1.      iodeclarations  ( contains static r/w space )   *)
(*              2.      iocomasm                                        *)
(*              3.      general_0       ( initialization & low level    *)
(*                                        routines like ioread/iowrite) *)
(*      The KERNEL modules also have an executable program segement     *)
(*      that gets executed at the time it is loaded.  This program      *)
(*      initializes the static read/write memory.  This program also    *)
(*      allocates the temporary storage for any card that exists -      *)
(*      independent of whether there is or is not a driver for it.      *)
(*                                                                      *)
(*      The driver modules consist of the actual assembly or PASCAL     *)
(*      routines that deal with a specific interface card.  There is    *)
(*      also an executable program segment for each driver module.      *)
(*      This program searches the select code table in the static r/w   *)
(*      initialized by the KERNEL general_0 module for all select codes *)
(*      that have the right interface card ( HPIB drivers will search   *)
(*      for the 98624 interface ).  This program will then set up the   *)
(*      driver tables to point to the correct drivers.                  *)
(*                                                                      *)
(*      The rest of the IOLIB modules are high-level modules that are   *)
(*      used by an end user in his/her application program.             *)
(*                                                                      *)
(*      The KERNEL and some set of driver modules will exist in the     *)
(*             INITLIB file as object code ( not EXPORT text ).  The    *)
(*      export text will reside on the IO file.  The rest               *)
(*      of the library will reside on the IO file.                      *)
(*                                                                      *)
(************************************************************************)
$PAGE$
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      REFERENCES :                                                    *)
(*                                                                      *)
(*                                                                      *)
(*      1.  9826 I/O Designers Guide            ( Loyd Nelson )         *)
(*                                                                      *)
(*      2.  68000 Manual                        ( Motorola )            *)
(*                                                                      *)
(*      3.  Pascal Language System Users Manual ( 9826-90070 )          *)
(*                                                                      *)
(*      4.  Pascal Procdure Library Users Manual( 9826-90074 )          *)
(*                                                                      *)
(*      5.  9826 card documentation             ( Mfg. Specs. )         *)
(*                                                                      *)
(*      6.  Pascal I/O Library IRS              ( Tim Mikkelsen )       *)
(*                                                                      *)
(*      7.  98626A ERS                          ( Mfg. Specs. )         *)
(*                                                                      *)
(*                                                                      *)
(************************************************************************)

PROGRAM rs_initialize ( INPUT , OUTPUT );
$PAGE$
(************************************************************************)
(*                                                                      *)
(*                                                                      *)
(*      RS-232 CARD DRIVERS                                             *)
(*                                                                      *)
(*                                                                      *)
(************************************************************************)
EXTERNAL MODULE rs;
	{ update  2/14/83

	  purpose This module is a declaration of the importation text for
		  the external drivers.

	  note    The assembly language code that is imported needs to be
		  called 'rs'.  The routines need to be called
		  'rs_@@@@@@@@@@@@'
	}

IMPORT  sysglobals, iodeclarations ;

EXPORT


  PROCEDURE rs_init  ( temp : ANYPTR );
  PROCEDURE rs_isr   ( temp : PISRIB );
  PROCEDURE rs_rdb   ( temp : ANYPTR ;  VAR x : CHAR);
  PROCEDURE rs_wtb   ( temp : ANYPTR ;  val   : CHAR);
  PROCEDURE rs_rdw   ( temp : ANYPTR ;  VAR x : io_word);
  PROCEDURE rs_wtw   ( temp : ANYPTR ;  val   : io_word);
  PROCEDURE rs_rds   ( temp : ANYPTR ;  reg   : io_word;
					 VAR x : io_word);
  PROCEDURE rs_wtc   ( temp : ANYPTR ;  reg   : io_word;
					 val   : io_word );
  PROCEDURE rs_tfr   ( temp : ANYPTR ;  bcb   : ANYPTR );




END; { of rs }
$PAGE$
MODULE init_rs;
	{ update  3/5/84 jws

	  purpose This module initializes the RS 232 drivers.

	}


IMPORT    iodeclarations ;

EXPORT


  VAR
    rs_drivers    : drv_table_type;

  PROCEDURE io_init_rs;



IMPLEMENT


  IMPORT  sysglobals ,
	  isr ,
	  general_0 ,
	  rs ;

  PROCEDURE io_init_rs;

  TYPE
    baudarraytype = ARRAY [0..15] of io_word;             {jws2 }

  CONST
    baudarray = baudarraytype[50,75,110,134,150,200,
		       300,600,1200,1800,2400,3600,
		       4800,7200,9600,19200];             {jws2 }

  VAR
    io_isc        : type_isc;
    dummyword     : io_word;
    io_lvl        : io_byte;
    io_baudsw     : io_word;                               {jws2}
    io_linesw     : io_word;                               {jws2}
  BEGIN

    io_revid := io_revid + ' R3.2';

    { set up the driver tables }

    WITH rs_drivers DO BEGIN
      rs_drivers := dummy_drivers ;
      iod_init  := rs_init;
      iod_isr   := rs_isr;
      iod_rdb   := rs_rdb;
      iod_wtb   := rs_wtb;
      iod_rdw   := rs_rdw;
      iod_wtw   := rs_wtw;
      iod_rds   := rs_rds;
      iod_wtc   := rs_wtc;
      iod_tfr   := rs_tfr;
    END; { of WITH }


    { set up drivers for the interfaces }

    FOR io_isc:=iominisc TO iomaxisc DO
      WITH isc_table[io_isc] DO BEGIN

	IF (card_id = hp98626) or (card_id=hp98644)       { jws 3/5/84 }
	  THEN BEGIN

	    io_drv_ptr:=ADDR(rs_drivers);

	    { if the card exists then link in an ISR for it }
	    { ??? - what happens if an ISR fires during init }

	    io_lvl:=((ioread_byte(io_isc,3) DIV 16) MOD 4)+3;
	    IF io_tmp_ptr^.myisrib.INTREGADDR <> NIL
	      THEN BEGIN
		{ if isr exists then unlink it }
		ISRUNLINK(io_lvl ,                      { level         }
		    ADDR(io_tmp_ptr^.myisrib));         { isrib info    }
	      END; { of IF }

	    PERMISRLINK(io_drv_ptr^.iod_isr,            { isr           }
		    ANYPTR(INTEGER(card_ptr)+3),        { card address  }
		    192,                                { intr. mask    }
		    192,                                { intr. value   }
		    io_lvl,                             { level         }
		    ADDR(io_tmp_ptr^.myisrib));         { isrib info    }
	  END; { of IF card_type = hp98626 }

    END; { of FOR io_isc WITH isc_table[io_isc] BEGIN }


    { call the actual driver initialization }

    FOR io_isc:=iominisc TO iomaxisc DO
      WITH isc_table[io_isc] DO
      IF (card_id = hp98626) OR (card_id = hp98644)         { jws  3/5/84 }
	THEN BEGIN

	  io_baudsw:=0;                                     { jws2 }
	  io_linesw:=0;                                     { jws2 }
	  IF card_id=hp98626 THEN BEGIN                     { jws2 }
	    io_baudsw:=ioread_byte(io_isc,5) MOD 16; { baud switch - jws2 }
	    io_linesw:=ioread_byte(io_isc,7); { pickup line control- jws2 }
	  END                                               { jws2 }
	  ELSE BEGIN                                        { jws2 }
	    io_baudsw:=10;   { defaults for 98644 }         { jws2 }
	    io_linesw:=3;                                   { jws2 }
	  END;
	  iocontrol(io_isc,21,baudarray[io_baudsw]);        { jws2 }
	  iocontrol(io_isc,22,io_linesw); { set defaults }  { jws2 }

	  CALL( io_drv_ptr^.iod_init, io_tmp_ptr );

	END; { of WITH IF }


  END; { of io_init_rs }

END; { of MODULE init_rs }
$PAGE$

IMPORT    init_rs ,
	  LOADER ;


BEGIN
  io_init_rs;
  MARKUSER;
END. { of rs_initialize }
@


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.2
log
@Pws2unix automatic delta on Tue Aug 25 18:23:33 MDT 1987
@
text
@@


22.1
log
@Automatic bump of revision number for PWS version 3.2N
@
text
@d236 1
a236 1
    io_revid := io_revid + ' R3.1';
@


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
@@
