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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

41.1
date     89.12.22.11.29.28;  author jwh;  state Exp;
branches ;
next     40.2;

40.2
date     89.12.15.10.17.43;  author dew;  state Exp;
branches ;
next     40.1;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1.1
date     86.06.30.15.04.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
@		ttl iolib extdi - 98625 disc interface drivers
		page
********************************************************************************
*
*       copyright (c) 1985 by HEWLETT-PACKARD COMPANY
*
********************************************************************************
*
*
*       iolib     extdi
*
*
********************************************************************************
*
*
*
*       library - iolib
*       author  - Joe Cowan
*       phone   - 303-226-3800  ext. 2404
*
*       purpose - this set of assembly language code is intended to be used as
*                 a PASCAL module for i/o drivers for use by the external i/o
*                 procedures library.
*
*       date    - 05/03/82
*       update  - 08/10/83        BY J Schmidt
*       release - 7/12/85
*
*
*       source  - IOLIB:DISCINT.TEXT
*       object  - IOLIB:DISCINT.CODE
*
*
********************************************************************************
*
*
*       released
*       version         3.1
*
*
********************************************************************************
		page
****************************************************************************
*                                                                          *
*                                                                          *
*      bug fix history         - after release                             *
*                                                                          *
*                                                                          *
*      bug #   by  / on        loc             description                 *
*      -----   -----------     --------------  ----------------------      *
*      tttt    J Schmidt       di_wfc           Changes to use timer       *
*              8/10/83         di_IFC           on UMM boards if avail.    *
*                              input_tfr_term                              *
*                                                                          *
*      dew1    D Willis        di_p_poll        new 375 machines have      *
*              12/89                            decreased access time to   *
*                                               medussa chip, causing      *
*                                               parallel poll to fail.     *
*                                               added additional reads     *
*                                               to medussa.                *
*                                                                          *
*                                                                          *
****************************************************************************
		page
********************************************************************************
*
*
*       the following lines are used to tell the linker/loader what this module
*       looks like in PASCAL terms.
*
*       note that it is possible to create assembly modules that are functions.
*       these routines are called through an indirect pointer using the call
*       facility which does not permit functions.
*
*       this module is called 'extdi' ( upper or lower case - doesn't matter )
*       independent of the file name ( by use of the mname pseudo-op ).
*
*       all the externally used procedures are called 'extdi_@@@@@@@@@@@@@@@@' in
*       this module.  if you are using assembly to access them use the
*       'extdi_@@@@@@@@@@@@@@' name.  if you are using PASCAL use the '@@@@@@@@@@@@@@'
*       name.
*
********************************************************************************

 mname extdi

 src module extdi;
 src import iodeclarations;
 src export
 src        procedure edi_init  ( temp : anyptr );
 src        procedure edi_isr   ( temp : anyptr );
 src        procedure edi_rdb   ( temp : anyptr ;  var x : char);
 src        procedure edi_wtb   ( temp : anyptr ;  val   : char);
 src        procedure edi_rdw   ( temp : anyptr ;  var x : io_word);
 src        procedure edi_wtw   ( temp : anyptr ;  val   : io_word);
 src        procedure edi_rds   ( temp : anyptr ;  reg   : io_word;
 src                                               var x : io_word);
 src        procedure edi_wtc   ( temp : anyptr ;  reg   : io_word;
 src                                               val   : io_word );
 src        procedure edi_tfr   ( temp : anyptr ;  bcb   : anyptr );
 src        procedure edi_send  ( temp : anyptr ;  val   : char );
 src        procedure edi_end   ( temp : anyptr ;  var x : boolean );
 src        procedure edi_ppoll ( temp : anyptr ;  var x : char );
 src        procedure edi_clr   ( temp : anyptr ;  line  : io_bit );
 src        procedure edi_set   ( temp : anyptr ;  line  : io_bit );
 src        procedure edi_test  ( temp : anyptr ;  line  : io_bit ;
 src                                               var x : boolean );
 src
 src end; { of extdi }
		page
********************************************************************************
*
*       symbols for export as procedure names
*
********************************************************************************

		def     extdi_extdi
		def     extdi_edi_init
		def     extdi_edi_isr
		def     extdi_edi_rdb
		def     extdi_edi_wtb
		def     extdi_edi_rdw
		def     extdi_edi_wtw
		def     extdi_edi_rds
		def     extdi_edi_wtc
		def     extdi_edi_tfr

		def     extdi_edi_send
		def     extdi_edi_ppoll
		def     extdi_edi_set
		def     extdi_edi_clr
		def     extdi_edi_test
		def     extdi_edi_end



********************************************************************************
*
*       symbols for import - common assembly language routines
*
*       the routines are in the module common_assembly and powerup
*
********************************************************************************

		refa    dropdma         give up DMA resource
		refa    getdma          actually get DMA
		refa    testdma         check to see if DMA is available
		refa    logint          branch to user isr
		refa    logeot          branch to user eot
		refa    stbsy           set buffer busy
		refa    stclr           set buffer not busy
		refa    DMA_stbsy       set buffer DMA busy
		refa    itxfr           is there a tfr active ?
		refa    abort_io        kill any tfr active
		refa    wait_tfr        timed wait for tfr active
		refa    check_tfr       timed wait for tfr - direction
		refa    check_timer     use for timeouts with hw timer tttt jws
		refa    delay_timer     use for all delays            tttt jws


		lmode   dropdma,getdma,testdma,logint,logeot,stbsy
		lmode   stclr,DMA_stbsy,itxfr,abort_io,wait_tfr,check_tfr
		lmode   check_timer,delay_timer                       tttt jws


		ttl iolib extdi - common equates and definitions
		page
		include COMDCL
		ttl iolib extdi - disc interface card temp definitions
		page
*
* disc interface card temp definitions
*

ABI             equ     avail_off+0     PHI/ABI flag
EOI_in          equ     avail_off+1     EOI flag for previous byte in
EOI_out         equ     avail_off+2     EOI flag for next byte out

flags           equ     avail_off+5     driver flags and status byte 0 mask:
*                                       bit 0:  pass control flag
*                                       bit 1:  not used
*                                       bit 2:  error indicator
*                                       bit 3:  IFC indicator
*                                       bit 4:  dcl indicator
*                                       bit 5:  get indicator
*                                       bit 6:  current rsv status bit.
*                                       bit 7:  if set, 9914 is in holdoff mode, therefore
*                                               issue release hold off before reading, and
*                                               use take control sync to set ATN.

ppollmsk        equ     avail_off+6     value to put in di_ppoll when ist = 1
*               equ     avail_off+7     value to put in di_ppoll when ist = 0

DMA_count       equ     avail_off+8     remaining DMA count
DMA_arm_addr    equ     avail_off+12    arm address of the assigned DMA channel
DMA_arm_word    equ     avail_off+16    arm word of the assigned DMA channel

		ttl iolib extdi - PASCAL entry points
		page
********************************************************************************
*
*         PASCAL driver entry points for disc interface cards
*
********************************************************************************

*
* module initialization
*
extdi_extdi     rts                             do nothing

*
* driver initialization
*
extdi_edi_init  movea.l (sp)+,a0                get return address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_init

*
* interrupt service routine
*
extdi_edi_isr   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_isr

*
* read a byte
*
extdi_edi_rdb   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_rdb                  call read byte
		move.b  d0,(a3)                 save character
		rts

*
* write a byte
*
extdi_edi_wtb   movea.l (sp)+,a0                get return address
		move.b  (sp)+,d0                get value
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_wtb                  call write byte

		page
*
* read a word
*
extdi_edi_rdw   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_rdb                  read first byte
		move.b  d0,(a3)+                save first byte
		bsr     di_rdb                  read second byte
		move.b  d0,(a3)                 save second byte
		rts

*
* write a word
*
extdi_edi_wtw   movea.l (sp)+,a0                get return address
		move    (sp)+,d0                get word value
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		move.b  d0,d5                   save second byte
		lsr     #8,d0
		bsr     di_wtb                  write the byte
		move.b  d5,d0                   get the second byte
		bra     di_wtb                  write the byte

*
* read status
*
extdi_edi_rds   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		move    (sp)+,d1                get register number
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_rds                  read status
		move    d0,(a3)                 save status info
		rts

*
* write control
*
extdi_edi_wtc   movea.l (sp)+,a0                get return address
		move    (sp)+,d0                get value
		move    (sp)+,d1                get register number
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_wtc                  write control

		page
*
* transfer
*
extdi_edi_tfr   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get buffer control block address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_tfr                  transfer

*
* send an 'ATN' true command
*
extdi_edi_send  movea.l (sp)+,a0                get return address
		move.b  (sp)+,d0                get value
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_r6out                send command byte

*
* perform a parallel poll
*
extdi_edi_ppoll movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_p_poll               do a parallel poll
		move.b  d0,(a3)                 save value
		rts

*
* set an hpib line
*
extdi_edi_set   movea.l (sp)+,a0                get return address
		move    (sp)+,d1                get line
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_set                  call set line

*
* clear an hpib line
*
extdi_edi_clr   movea.l (sp)+,a0                get return address
		move    (sp)+,d1                get line
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_clr                  clear the line

		page
*
* test an hpib line
*
extdi_edi_test  movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		move    (sp)+,d1                get line
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_test                 read status
		move.b  d0,(a3)                 save character
		rts

*
* test for EOI/end condition
*
extdi_edi_end   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		move.b  EOI_in(a2),d0           get eor flag byte
		lsr.b   #7,d0                   PASCAL needs it [0..1]
		move.b  d0,(a3)                 save condition
		rts

		ttl iolib extdi - disc interface card declarations
		page
********************************************************************************
*
*       disc interface card address equates  ( offsets from a1 )
*
********************************************************************************

cardid          equ $01   read          card identification
cardreset       equ $01   write         card software reset
cardstatus      equ $03   read          card status
cardcontrol     equ $03   write         card control
cardlatch       equ $07   read/write    latch for testing card buffers

intreg          equ $11   read/write    PHI/ABI interrupt register
intmask         equ $13   read/write    PHI/ABI interrupt mask
fifo            equ $15   read/write    PHI/ABI inbound/outbound fifo
status          equ $17   read/write    PHI/ABI status register
control         equ $19   read/write    PHI/ABI control register
address         equ $1B   read/write    PHI/ABI hp-ib address register
ppolmask        equ $1D   read/write    PHI/ABI parallel poll mask register
ppolsense       equ $1F   read/write    PHI/ABI parallel poll sense register


********************************************************************************
*
*       hp-ib command equates
*
********************************************************************************

gtl             equ     1               go to local
sdc             equ     4               selective device clear
ppc             equ     5               ppoll configure
get             equ     8               group execute trigger
tct             equ     9               take control
llo             equ     17              local lockout
dcl             equ     20              device clear
ppu             equ     21              ppoll unconfigure
spe             equ     24              spoll enable
spd             equ     25              spoll disable
unl             equ     63              unlisten
unt             equ     95              untalk
ppe             equ     96              ppoll enable
ppd             equ     112             ppoll disable
		ttl iolib extdi - disc interface drivers
		page
********************************************************************************
*
*       di_init
*
*         initialize a disc interface card
*
********************************************************************************

di_init         moveq   #30,d0                  my address if active controller
		bsr.s  di_init_s                start software reset
		bne    di_IFC                   if system controller, branch
		rts



********************************************************************************
*
*       di_int_s
*
*         subroutine used for both initialization and wtc:
*
********************************************************************************

*
* software reset the card
*
di_init_s       moveq   #$80,d1                 prepare to...
		move.b  d1,cardreset(a1)        software reset the card (PHI/ABI pon)
		move.b  d1,control(a1)          set 8-bit mode
		move.b  d1,control(a1)          once more, to guarantee high-order bit values
		move    d0,ma_w(a2)             save my address
		add.b   d1,d0                   set the "online" bit
		move.b  d1,status(a1)           prepare to enable CRC if ABI
		move.b  d0,address(a1)          bring PHI/ABI online with specified address
		tst.b   address(a1)             is this an ABI?
		btst    #7,status(a1)           a writeable CRC bit will tell
		sne     ABI(a2)                 remember it
*
* set up the interrupt register & driver temps
*
		jsr     abort_io                cleanup any attached buffer
		sf      EOI_in(a2)              clear the EOI in flag
		sf      EOI_out(a2)             clear the EOI out flag
		lea     status(a1),a0           point to the status register
		move.b  #$80,(a0)               set high-order bits
		move.b  #$00,intmask(a1)        initial interrupt mask ????????????????
		move.b  #$80,cardcontrol(a1)    enable card interrupts

		btst    #3,(a0)                 is this THE system controller?
		rts                             (leave cc for caller)

		page
********************************************************************************
*
*       di_rdb
*
*         read a byte of data from hp-ib
*
*         exit:   d0.l = byte read
*
********************************************************************************

di_rdb          lea     status(a1),a0           point to the status register
		btst    #1,(a0)                 make sure addressed to listen
		beq.s   di_lsterr               else give error
		btst    #4,(a0)                 active controller?
		beq.s   di_rdb1                 branch if not
		move.b  #$80,(a0)               inhibit LF detection
		move.b  #1,fifo(a1)             enable a 1 byte counted transfer
di_rdb1         bsr.s   di_wait_fb              now wait for fifo byte
		moveq   #0,d0                   clear upper part of d0
		move.b  fifo(a1),d0             and put data in lower byte
		btst    #6,status(a1)           tagged with EOI?
		sne     EOI_in(a2)              remember it
		rts                             done!



********************************************************************************
*
*       di_wtb
*
*         write a byte of data to hp-ib
*
*         entry:  d0.b = byte to write
*
*         hpl routine
*
********************************************************************************

di_wtb          btst    #2,status(a1)           make sure addressed to talk
		beq.s   di_tlkerr               else error
		bsr.s   di_wait_fi              wait for fifo idle
		move.b  EOI_out(a2),d2          EOI out flag
		lsl.b   #7,d2                   prepare to...
		move.b  d2,status(a1)           set the high-order bits
		move.b  d0,fifo(a1)             move the data out
		sf      EOI_out(a2)             clear the EOI out flag
		rts                             done!

		ttl iolib extdi - error escapes
		page
********************************************************************************
*
*       error escapes
*
********************************************************************************

di_scbsy        moveq   #sc_busy,d0             buffer is busy
		bra.s   esc_err

di_sc_err       moveq   #bad_sct,d0             bad set/clear/test
		bra.s   esc_err

di_notactl      moveq   #no_actl,d0             not active controller
		bra.s   esc_err

di_notsctl      moveq   #no_sctl,d0             not system controller
		bra.s   esc_err

hterr_b         moveq   #tfr_err,d0             bad transfer specification
		bra.s   esc_err

hterr_d         moveq   #no_DMA,d0              DMA not installed
		bra.s   esc_err

di_noword       moveq   #no_word,d0             word transfers not allowed
		bra.s   esc_err

di_lsterr       moveq   #not_lstn,d0            not addressed as listener
		bra.s   esc_err

di_tlkerr       moveq   #not_talk,d0            not addressed as talker
		bra.s   esc_err

di_tmo          moveq   #tmo_err,d0             timeout
*               bra.s   esc_err


esc_err         move.l  d0,ioe_rslt(a5)         save error in io space
		move.b  io_sc(a2),d0            \ get sc for error
		move.l  d0,ioe_sc(a5)           /
		move    #ioe_error,esc_code(a5) save system esc code
		trap    #10                     escape

		page
********************************************************************************
*
* wait for fifo idle or fifo byte routines
*
********************************************************************************

di_wait_fi      moveq   #1,d1                   fifo idle is bit 1
		bra.s   di_wfc

di_wait_fb      moveq   #2,d1                   fifo byte is bit 2

*
* generalized wait for condition routine
*
di_wfc          clr.b   cardcontrol(a1)         disable card interrupts
		bset    d1,intmask(a1)          unmask the appropriate interrupt bit
		lea     intreg(a1),a0           point to the interrupt register
*
* quick low-overhead loop
*
		move.l  #254,d2                 quick loop counter
*
* Count changed from 127 to 254                  tttt jws 8/10/83
*
di_wfc_quick    btst    d1,(a0)                 condition met?
		bne.s   di_wfc_done             branch if so
		dbra    d2,di_wfc_quick         loop until quick count expires
*
* timed wait loop
*
		move.l  timeout(a2),d2          current timeout
		beq.s   di_wfc_infinite         branch if infinite timeout
		btst    #timer_present,sysflag2 check if timer     tttt jws
		beq.s   di_wfc_timer            br if got it       tttt jws
		mulu    #491,d2                 loop iterations per millisecond

di_wfc_timed    btst    d1,(a0)                 condition met?
		bne.s   di_wfc_done             branch if so
		subq.l  #1,d2                   decrement the loop counter
		bhi     di_wfc_timed            loop until count expired

		bclr    d1,intmask(a1)          re-mask the appropriate interrupt bit
		move.b  #$80,cardcontrol(a1)    re-enable card interrupts
		bra     di_tmo                  escape with timeout error
*
* infinite wait loop
*
di_wfc_infinite btst    d1,(a0)                 condition met?
		beq     di_wfc_infinite         loop until so
*
* wait for condition done
*
di_wfc_done     bclr    d1,intmask(a1)          re-mask the appropriate interrupt bit
		move.b  #$80,cardcontrol(a1)    re-enable card interrupts
		rts                             done!
*
*  Wait using the timer                                     tttt jws
*
di_wfc_timer    move.b  #1,-(sp)         setup timer record  tttt jws 8/10/83
		move.l  d2,-(sp)                             tttt jws 8/10/83
di_wfc_tloop    btst    d1,(a0)          check condition     tttt jws 8/10/83
		bne.s   di_wfc_texit     if true, exit       tttt jws 8/10/83
		pea     (sp)             else call timer     tttt jws 8/10/83
		jsr     check_timer      check routine       tttt jws 8/10/83
		bpl     di_wfc_tloop     ok -- loop          tttt jws 8/10/83
		addq    #6,sp            timeout, clean stk  tttt jws 5/2/84
		moveq   #10,d2           try again with a    tttt jws 5/2/84
		bra     di_wfc_timed     short count         tttt jws 5/2/84
di_wfc_texit    addq    #6,sp            cleanup stack       tttt jws 8/10/83
		bra     di_wfc_done      and continue        tttt jws 8/10/83
		page
********************************************************************************
*
*       di_rds
*
*         read status
*
*         PASCAL routine
*
********************************************************************************

di_rds          cmp     #8,d1                   register within range?
		bhi.s   rds_err                 branch if not
		add     d1,d1                   two bytes per table entry
		move    rds_table(d1),d1        load routine offset
		jmp     rds_table(d1)           jump to the appropriate routine

*
* rds jump table
*
rds_table       dc      rds_0-rds_table         status 0
		dc      rds_1-rds_table         status 1
		dc      rds_2-rds_table         status 2
		dc      rds_3-rds_table         status 3
		dc      rds_4-rds_table         status 4
		dc      rds_5-rds_table         status 5
		dc      rds_6-rds_table         status 6
		dc      rds_7-rds_table         status 7
		dc      rds_8-rds_table         status 8

rds_1           equ *
rds_2           equ *
rds_4           equ *
rds_5           equ *
rds_7           equ *
rds_8           equ *

rds_err         moveq   #bad_rds,d0             bad read status
		bra     esc_err

		page
*
* status 0 - card ID
*
rds_0           moveq   #8,d0                   Simon's ID
		rts


*
* status 3  -  controller status & address
*
rds_3           moveq   #0,d0                   ZZZZZZZZ ZZZZZZZZ
		move.b  status(a1),d0           ZZZZZZZZ 76543210
		rol.b   #4,d0                   ZZZZZZZZ 32107654
		lsl     #1,d0                   ZZZZZZZ3 2107654Z
		lsl.b   #6,d0                   ZZZZZZZ3 4ZZZZZZZ
		lsr     #1,d0                   ZZZZZZZZ 34ZZZZZZ
		add.b   ma(a2),d0               ZZZZZZZZ 34ZAAAAA
		rts


*
* status 6  -  interface status
*
rds_6           bsr     rds_3          ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ LLLLLLLL
		ror.l   #8,d0          LLLLLLLL ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ
		move.b  status(a1),d0  LLLLLLLL ZZZZZZZZ ZZZZZZZZ 76543210
		rol     #1,d0          LLLLLLLL ZZZZZZZZ ZZZZZZZ7 6543210Z
		ror.l   #1,d0          ZLLLLLLL LZZZZZZZ ZZZZZZZZ 76543210
		ror.b   #2,d0          ZLLLLLLL LZZZZZZZ ZZZZZZZZ 10765432
		ror.l   #1,d0          2ZLLLLLL LLZZZZZZ ZZZZZZZZ Z1076543
		rol.b   #2,d0          2ZLLLLLL LLZZZZZZ ZZZZZZZZ 076543Z1
		ror.l   #1,d0          12ZLLLLL LLLZZZZZ ZZZZZZZZ Z076543Z
		rol     #4,d0          12ZLLLLL LLLZZZZZ ZZZZZ076 543ZZZZZ
		ror.l   #4,d0          ZZZZ12ZL LLLLLLLZ ZZZZZZZZ Z076543Z
		ror.b   #3,d0          ZZZZ12ZL LLLLLLLZ ZZZZZZZZ 43ZZ0765
		ror.l   #1,d0          5ZZZZ12Z LLLLLLLL ZZZZZZZZ Z43ZZ076
		swap    d0             ZZZZZZZZ Z43ZZ076 5ZZZZ12Z LLLLLLLL
		rts                             whew!!!

		page
********************************************************************************
*
*       di_wtc
*
*         write control
*
*         entry:  d0.w = parameter
*
********************************************************************************

di_wtc          cmpi    #1,d1                   register within range?
		bhi.s   rds_err                 branch if not
		add     d1,d1                   two bytes per table entry
		jmp     hwtctbl(d1)             jump to the appropriate routine


hwtctbl         bra.s   di_wtc_rst              control 0 - do a reset
		bra.s   di_rqs                  control 1 - set SRQ response
*               bra.s   di_wtc_ppc              control 2 - ppoll configure
*               bra.s   di_wtc_sma              control 3 - set my addr
*               bra.s   rds_err                 control 4 - not used
*               bra.s   rds_err                 control 5 - enable interrupts


*
* software reset
*
di_wtc_rst      move.b  ma(a2),d0               else use previous address

hpl_wtc1        move.b  status(a1),-(sp)        save controller active state.
		bsr     di_init_s               do software reset
		btst    #4,(sp)+                were we active controller?
		beq.s   hpl_wtc2                if not, skip
		nop     ???????????????????????????????????????????????
hpl_wtc2        rts                             else done


*
* request service
*
di_rqs          bclr    #6,flags(a2)            assume rsv = 0 in this new byte
		move.b  d0,d1                   if rsv bit in the new byte is indeed
		bclr    #6,d1                   zero, then just output the new byte.
		beq.s   di_rqs2
*               move.b  d1,di_spoll(a1)         else first write the byte with rsv
		bset    #6,flags(a2)            clear. remember that rsv is set.
di_rqs2         move.b  d0,(a1) <<<di_spoll(a1)         write the byte with rsv correct.
		move    ppollmsk(a2),d1         go update the parallel poll response
hpl_wtc4        trap    #11                     get into supervisor mode   scs
* scs           move    sr,-(sp)                disable isr's while we figure
		ori     #$2700,sr               out which mask to set based on
		btst    #6,flags(a2)            current rsv bit.
		beq.s   hpl_wtc5                if rsv = 0, use right byte
		ror     #8,d1                   else use left byte
hpl_wtc5        move.b  d1,(a1) <<<di_ppoll(a1)
		move    (sp)+,sr                restore user mode       scs
		rts                                                     scs
* scs           rte                            re-enable isr's and return

		page
********************************************************************************
*
*       di_p_poll
*
*         conduct parallel poll
*
*         if not active controller give error
*         else value returned in d0.b
*
*         hpl routine
*
********************************************************************************

di_p_poll       btst    #4,status(a1)           active controller?
		beq     di_notactl              branch if not

		bsr     di_wait_fi              wait for fifo idle

		clr.b   cardcontrol(a1)         disable card interrupts
		bset    #5,intmask(a1)          unmask the poll response bit for ABI's sake
		clr.b   status(a1)              high-order bits
		st      ppolmask(a1)            look at all response bits
		clr.b   ppolsense(a1)           normal sense for all
		move.b  1(a1),d0                added additional wait as    - dew1
		move.b  1(a1),d0                chip has been speeded up.   - dew1
		move.b  1(a1),d0                ppoll takes 2us.            - dew1
		move.b  fifo(a1),d0             get the response
		bclr    #5,intmask(a1)          re-mask the poll response bit
		move.b  #$80,cardcontrol(a1)    re-enable card interrupts

		rts

		page
********************************************************************************
*
*       di_set
*
*         set an hpib line true
*
*         PASCAL routine
*
********************************************************************************

di_set          cmp     #7,d1                   register within range?
		bhi     di_sc_err               branch if not
		add     d1,d1                   two bytes per table entry
		move    set_table(d1),d1        routine offset
		jmp     set_table(d1)           jump to the appropriate routine

set_table       dc      di_REN-set_table        REN  - set REN
		dc      di_IFC-set_table        IFC  - pulse IFC (set REN/clr ATN)
		dc      di_sc_err-set_table     SRQ  - error
		dc      di_EOI-set_table        EOI  - pulse EOI on next byte out
		dc      di_sc_err-set_table     NRFD - error
		dc      di_sc_err-set_table     NDAC - error
		dc      di_sc_err-set_table     DAV  - error
		dc      di_sc_err-set_table     ATN  - error


*
* set REN
*
di_REN          btst    #3,status(a1)           system controller?
		beq     di_notsctl              branch if not
		bset    #5,control(a1)          set REN
		rts


*
* assert IFC for 100us
*
di_IFC          btst    #3,status(a1)           system controller?
		beq     di_notsctl              branch if not

		lea     control(a1),a0          point to the control register
		bclr    #5,(a0)                 clear REN
		bset    #4,(a0)                 assert IFC
*  tttt jws     moveq   #80,d0                  must hold IFC at least 100us...
*  tttt jws     dbra    d0,*                    to satisfy the bus standard
		move.l  #100,-(sp)              use the timer      tttt jws
		jsr     delay_timer             routine for this   tttt jws 8/10/83
		bclr    #4,(a0)                 release IFC
		bset    #5,(a0)                 set REN

		rts


*
* assert EOI on the next wtb
*
di_EOI          st      EOI_out(a2)             set the flag
		rts

		page
********************************************************************************
*
*       di_clr
*
*         set an hpib line false
*
*         PASCAL routine
*
********************************************************************************

di_clr          cmp     #7,d1                   register within range?
		bhi     di_sc_err               branch if not
		add     d1,d1                   two bytes per table entry
		move    clear_table(d1),d1      routine offset
		jmp     clear_table(d1)         jump to the appropriate routine

clear_table     dc      di_local-clear_table    REN  - clear REN
		dc      di_dmyrts-clear_table   IFC  - nothing
		dc      di_sc_err-clear_table   SRQ  - error
		dc      di_dmyrts-clear_table   EOI  - nothing
		dc      di_sc_err-clear_table   NRFD - error
		dc      di_sc_err-clear_table   NDAC - error
		dc      di_sc_err-clear_table   DAV  - error
		dc      di_sc_err-clear_table   ATN  - error


*
* clear REN
*
di_local        btst   #3,status(a1)            system controller?
		beq    di_notsctl               branch if not
		bclr   #5,control(a1)           clear REN
di_dmyrts       rts

		page
********************************************************************************
*
*       di_test
*
*         get an hpib line's state
*
*         entry :       d1 = line parameter
*                            0 = REN
*                            1 = IFC
*                            2 = SRQ
*                            3 = EOI
*                            4 = NRFD
*                            5 = NDAC
*                            6 = DAV
*                            7 = ATN
*
*         PASCAL routine
*
********************************************************************************

di_test         bra             di_sc_err

		page
********************************************************************************
*
*       di_r6out
*
*         emulation of r6 out for hp-ib
*
*         entry:  d0 = byte to output
*
*         exit:   if not active controller, sts cleared and error bit set
*                 else operation is done and any addressing decoded.
*
*         hpl routine ( modified )
*
********************************************************************************

di_r6out        jsr     wait_tfr                if a tfr is active wait till it isn't

		btst    #4,status(a1)           active controller?
		beq     di_notactl              branch if not

		bsr     di_wait_fi              wait for fifo idle
		move.b  #$40,status(a1)         following byte is a command
		move.b  d0,fifo(a1)             send it

		rts

		ttl iolib extdi - disc interface interrupt service routine
		page
********************************************************************************
*
*       di_isr
*
*         interrupt service routine for hp-ib cards
*
*         entry : a1,a2 are set up
*
*         the isr will track down the buffer control block
*
*         hpl routine ( modified )
*
********************************************************************************

di_isr          bclr    #1,flags(a2)            clear user isr pending flag
		bsr     di_isr1                 process the interrupting condition(s)
		jsr     itxfr                   go see if transfer is active
		beq.s   isr_end                 if not, then we are done.
		cmp.b   #tt_burst,d1            if frw is active, go process it
		beq     di_frw
		cmp.b   #tt_int,d1              if int then go process it
		beq     di_buf
		cmp.b   #tt_DMA,d1              if DMA
		beq.s   di_isrdma
isr_end         bclr    #1,flags(a2)            if isr pending then do it
		beq.s   di_isr_ex
		jsr     logint
di_isr_ex       rts                             otherwise return

		page
*
* DMA transfer interrupt:
*
di_isrdma       movea.l DMA_arm_addr(a2),a4     DMA arm & status register address
		tst.b   tdir_off(a3)            test direction
		bne.s   isrdma_out              branch if output


*
* input DMA transfer
*
		lea     tfil_off(a3),a0         point to the buffer fill pointer

		btst    #6,status(a1)           last byte in tagged with EOI?
		sne     EOI_in(a2)              remember it

		btst    #0,1(a4)                DMA channel unarmed?
		beq.s   isrdma_unarmed          branch if so

		btst    #1,intreg(a1)           fifo idle?
		bne.s   isrdma_in_term          branch of so (terminate tfr)
		bra     isr_end                 otherwise, keep going

isrdma_unarmed  tst.l   DMA_count(a2)           more to transfer?
		bgt.s   isrdma_restart          branch if so

isrdma_in_term  bsr     input_tfr_term          clean up the fifo's if possible
		bclr    #1,intmask(a1)          re-mask fifo idle condition
		bra.s   isrdma_term


*
* output DMA transfer
*
isrdma_out      lea     temp_off(a3),a0         point to the buffer empty pointer

		btst    #0,1(a4)                DMA channel still armed?
		bne.s   isr_end                 branch if so; keep going

		bset    #7,control(a1)          re-set 8-bit mode if necessary
		clr.b   status(a1)              clear the hi-order bits

		cmpi.w  #1,DMA_count(a2)        [ cmpi.l #$10000,DMA_count(a2) ]
		blt.s   isrdma_term             branch if no more to transfer

		bgt.s   isrdma_restart          branch if additional bursts remain
		tst.b   tend_off(a3)            last burst: EOI tag set?
		beq.s   isrdma_restart          branch if not, otherwise...
		bclr    #7,control(a1)          clear 8-bit mode (tag last byte with EOI)

		page
*
* DMA transfer restart
*
isrdma_restart  subq.w  #1,DMA_count(a2)        [ sub.l #$10000,DMA_count(a2) ]
		move.l  tcnt_off(a3),d0         previous burst length
		add.l   d0,(a0)                 update the appropriate buffer pointer
		move.l  #$10000,tcnt_off(a3)    next burst length
		move    DMA_arm_word(a2),(a4)   re-arm the DMA channel
		bra     isr_end                 done!


*
* DMA transfer termination
*
isrdma_term     move.b  #$80,cardcontrol(a1)    disable card DMA
		move.l  a0,-(sp)                save a0
		jsr     dropdma                 free the DMA channel
		movea.l (sp)+,a0                restore a0
		move.l  tcnt_off(a3),d3         intended number of bytes transfered
		sub.l   d4,d3                   actual number of bytes transferred
		add.l   d3,(a0)                 update the appropriate buffer pointer
		add.l   DMA_count(a2),d4        total remaining count
		move.l  d4,tcnt_off(a3)         record it
		jsr     stclr                   mark the tfr done and log branch
		bra     isr_end                 done!




*
* interrupt transfer processing:
*
di_buf          tst.b   tdir_off(a3)            which direction transfer?
		bne.s   di_bufo                 branch if output


*
* buffered input:
*
di_bufi         nop

*
* buffered output:
*
di_bufo         equ *

*
* int and frw transfer termination
*
di_ti_term      equ *

di_to_term      move.b  #0,d0                 disable other interrupts
*               bsr     di_eir
		jsr     stclr                 mark the buffer finished
		bra     isr_end              end of isr


*
* fast r/w transfer processing:
*
di_frw          ori     #$2700,sr               disable all other ints
*                                       the PASCAL system will re-enable&rte
		tst.b   tdir_off(a3)          which direction transfer?
		bne.s   di_frwo                skip if output

*
* fast r/w input:
*
di_fri          nop

*
* fast r/w output:
*
di_frwo         equ *
		bra     di_to_term              else we are done!
		page
********************************************************************************
*
*       isr1
*
*         the following routine does all the grunt work for the isr. it is
*         separated out so it can be called from background.
*
********************************************************************************

di_isr1         lea     intreg(a1),a0           point to the interrupt condition register
		lea     intmask(a1),a4          point to the interrupt mask register
*
* DCL
*
		btst    #0,(a0)                 DCL interrupt?
		beq.s   di_no_DCL               branch if not
		bsr     di_log                  else do normal logging
		bclr    #0,(a4)                 mask off the interrupt
di_no_DCL       equ *
*
* SRQ
*
		btst    #4,(a0)                 SRQ interrupt?
		beq.s   di_no_SRQ               branch if not
		bsr     di_log                  else do normal logging
		bclr    #4,(a4)                 mask off the interrupt
di_no_SRQ       equ *
*
* POL
*
		btst    #5,(a0)                 POL interrupt?
		beq.s   di_no_POL               branch if not
		bsr     di_log                  else do normal logging
		bclr    #5,(a4)                 mask off the interrupt
di_no_POL       equ *
*
* SCG
*
		btst    #7,(a0)                 SCG interrupt?
		beq.s   di_no_SCG               branch if not
		bsr     di_log                  else do normal logging
		bclr    #7,(a4)                 mask off the interrupt
di_no_SCG       equ *
		rts

*
* di_log    mark that an isr condition is pending
*
di_log          bset    #1,flags(a2)            set condition
		rts

		ttl iolib extdi - disc interface transfer
		page
********************************************************************************
*
*       di_tfr
*
*         driver call for execution of tfr statement
*
*         entry:  conditions other than normal a1,a2 are:
*                 a3.l = pointer to transfer information
*
********************************************************************************

di_tfr          jsr     check_tfr               wait for tfr to finish (timed)

		tst.b   t_bw_off(a3)            don't allow word transfers
		bne     di_noword

		move.l  tcnt_off(a3),d0         get count

		moveq   #0,d1
		move.b  tusr_off(a3),d1         user specified transfer type
		add     d1,d1                   two bytes per table entry
		jsr     testdma                 DMA available?
		beq.s   di_nodma                branch if not; use the first half of table
		add     #20,d1                  otherwise use the second half of table
di_nodma        move    tfr_table(d1),d1        routine offset
		jmp     tfr_table(d1)           jump to the appropriate routine

*
* transfer jump table
*
*                                               --------------------    DMA uninstalled or unavailable
tfr_table       dc      hterr_b-tfr_table       serial  interrupt
		dc      hterr_d-tfr_table       serial  DMA
		dc      di_t_fhs-tfr_table      serial  fhs
		dc      di_t_fhs-tfr_table      serial  fastest
		dc      hterr_b-tfr_table       serial  overlap
*                                               --------------------
		dc      di_t_int-tfr_table      overlap interrupt
		dc      hterr_d-tfr_table       overlap DMA
		dc      di_t_bst-tfr_table      overlap fhs
		dc      di_t_bst-tfr_table      overlap fastest
		dc      di_t_int-tfr_table      overlap overlap
*                                               --------------------    DMA available
		dc      hterr_b-tfr_table       serial  interrupt
		dc      di_t_DMA-tfr_table      serial  DMA
		dc      di_t_fhs-tfr_table      serial  fhs
		dc      di_t_DMA-tfr_table      serial  fastest
		dc      hterr_b-tfr_table       serial  overlap
*                                               --------------------
		dc      di_t_int-tfr_table      overlap interrupt
		dc      di_t_DMA-tfr_table      overlap DMA
		dc      di_t_bst-tfr_table      overlap fhs
		dc      di_t_DMA-tfr_table      overlap fastest
		dc      di_t_DMA-tfr_table      overlap overlap
		page
*
* transfer DMA
*
di_t_DMA        move.b  #tt_DMA,tact_off(a3)    set tfr type to DMA

		move.l  d0,d1                   total count
		subq.l  #1,d1                   total count minus 1
		moveq   #0,d0
		move.w  d1,d0                   first burst count minus 1
		sub.l   d0,d1                   remaining count (multiple of $10000)
		move.l  d1,DMA_count(a2)        remember it
		addq.l  #1,d0                   burst count [1..65536]

		clr.b   cardcontrol(a1)         disable card interrupts
		jsr     getdma                  get a DMA channel
		bclr    #0,d2                   always clear the DMA interrupt enable bit
		tst.b   t_DMApri(a3)            DMA priority requested?
		beq.s   di_arm_DMA              branch if not
		bset    #3,d2                   otherwise set the DMA priority bit
di_arm_DMA      move    d2,(a4)                 arm the channel
		move.l  a4,DMA_arm_addr(a2)     remember the DMA channel arm address
		move    d2,DMA_arm_word(a2)     remember the DMA channel arm word

		lea     0,a4                    no DMA termination routine (no DMA interrupt enabled)
		jsr     DMA_stbsy               set DMA channel, buffer busy

		tst.b   tdir_off(a3)            test the transfer direction
		bne.s   di_tod                  branch if output

*
* transfer input DMA:
*
di_tid          bset    #1,intmask(a1)          interrupt on DMA completion or fifo idle
		bclr    #1,control(a1)          select the inbound fifo for DMA
		add.l   d1,d0                   recompute the total count again
		bsr     input_tfr_en            enable the transfer
		bra.s   di_DMA_en               enable the card & wait if serial


*
* transfer output DMA:
*
di_tod          bset    #1,control(a1)          select the outbound fifo for DMA
		bset    #7,control(a1)          assume no EOI tag (8-bit mode)
		clr.b   status(a1)              clear the high-order bits
		tst.l   d1                      remaining count 0?
		bne.s   di_tod_1                branch if not
		tst.b   tend_off(a3)            EOI tag set?
		beq.s   di_tod_1                branch if not, otherwise...
		bclr    #7,control(a1)          clear 8-bit mode (tag last byte with EOI)
di_tod_1        bset    #3,d3                   set the card's output DMA enable bit
di_DMA_en       move.b  d3,cardcontrol(a1)      enable card interrupts & DMA

di_DMA_w        cmpi.b  #5,tusr_off(a3)         overlap transfer?
		bge.s   di_DMA_w2               branch if so

di_DMA_w1       cmpi.b  #255,t_sc_off(a3)       if not then wait till done
		bne.s   di_DMA_w1

di_DMA_w2       rts

		page
*
* transfer interrupt
*
di_t_int        move.b  #tt_int,tact_off(a3)    set tfr type to interrupt
		bra     hterr_b


*
* transfer burst (intr on 1st byte fhs on rest)
*
di_t_bst        move.b  #tt_burst,tact_off(a3)  set tfr type to burst
		bra     hterr_b


*
* transfer fast handshake
*
di_t_fhs        move.b  #tt_fhs,tact_off(a3)    set tfr type to fhs
		bra     hterr_b

		page
*
* input transfer enable
*
input_tfr_en    btst    #4,status(a1)           active controller?
		beq.s   te_rts                  branch if not

		cmp.l   #256,d0                 count low enough for counted transfer?
		ble.s   te_ect                  branch if so

		move.b  #$C0,status(a1)
		move.b  #$00,fifo(a1)           uncounted transfer enable
te_rts          rts

te_ect          move.b  #$80,status(a1)         inhibit LF detection
		move.b  d0,fifo(a1)             counted transfer enable
		rts


*
* input transfer term
*
input_tfr_term  btst    #4,status(a1)           active controller?
		beq.s   tt_rts                  branch if not

		btst    #1,intreg(a1)           fifo idle?
		bne.s   tt_empty_fifo           branch if so
*
* (input) transfer enable byte still active - must init outbound fifo
*
		btst    #3,status(a1)           system controller?
		beq.s   tt_non_sys              branch if not

		ori.b    #$11,control(a1)       assert IFC & init outbound fifo
*   tttt jws    moveq   #80,d0                  must hold IFC at least 100us...
*   tttt jws    dbra    d0,*                    to satisfy the bus standard
		move.l  #100,-(sp)              use timer routine  tttt jws
		jsr     delay_timer             for this delay     tttt jws
		bclr    #4,control(a1)          release IFC
		bra.s   tt_empty_fifo           go empty the inbound fifo

tt_non_sys      bset    #0,control(a1)          init outbound fifo; TCA like this is hazardous!!!
*
* empty inbound fifo
*
tt_empty_fifo   bset    #2,intmask(a1)          unmask fifo byte condition
		btst    #2,intreg(a1)           fifo byte?
		beq.s   tt_fifo_empty           branch if not
		tst.b   fifo(a1)                otherwise, discard it and...
		bra     tt_empty_fifo           go check for more

tt_fifo_empty   bclr    #2,intmask(a1)          re-mask fifo byte condition

tt_rts          rts


		end

@


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


56.1
log
@Automatic bump of revision number for PWS version 3.25
@
text
@a0 1371
		ttl iolib extdi - 98625 disc interface drivers
		page
********************************************************************************
*
*       copyright (c) 1985 by HEWLETT-PACKARD COMPANY
*
********************************************************************************
*
*
*       iolib     extdi
*
*
********************************************************************************
*
*
*
*       library - iolib
*       author  - Joe Cowan
*       phone   - 303-226-3800  ext. 2404
*
*       purpose - this set of assembly language code is intended to be used as
*                 a PASCAL module for i/o drivers for use by the external i/o
*                 procedures library.
*
*       date    - 05/03/82
*       update  - 08/10/83        BY J Schmidt
*       release - 7/12/85
*
*
*       source  - IOLIB:DISCINT.TEXT
*       object  - IOLIB:DISCINT.CODE
*
*
********************************************************************************
*
*
*       released
*       version         3.1
*
*
********************************************************************************
		page
****************************************************************************
*                                                                          *
*                                                                          *
*      bug fix history         - after release                             *
*                                                                          *
*                                                                          *
*      bug #   by  / on        loc             description                 *
*      -----   -----------     --------------  ----------------------      *
*      tttt    J Schmidt       di_wfc           Changes to use timer       *
*              8/10/83         di_IFC           on UMM boards if avail.    *
*                              input_tfr_term                              *
*                                                                          *
*      dew1    D Willis        di_p_poll        new 375 machines have      *
*              12/89                            decreased access time to   *
*                                               medussa chip, causing      *
*                                               parallel poll to fail.     *
*                                               added additional reads     *
*                                               to medussa.                *
*                                                                          *
*                                                                          *
****************************************************************************
		page
********************************************************************************
*
*
*       the following lines are used to tell the linker/loader what this module
*       looks like in PASCAL terms.
*
*       note that it is possible to create assembly modules that are functions.
*       these routines are called through an indirect pointer using the call
*       facility which does not permit functions.
*
*       this module is called 'extdi' ( upper or lower case - doesn't matter )
*       independent of the file name ( by use of the mname pseudo-op ).
*
*       all the externally used procedures are called 'extdi_@@@@@@@@@@@@@@@@' in
*       this module.  if you are using assembly to access them use the
*       'extdi_@@@@@@@@@@@@@@' name.  if you are using PASCAL use the '@@@@@@@@@@@@@@'
*       name.
*
********************************************************************************

 mname extdi

 src module extdi;
 src import iodeclarations;
 src export
 src        procedure edi_init  ( temp : anyptr );
 src        procedure edi_isr   ( temp : anyptr );
 src        procedure edi_rdb   ( temp : anyptr ;  var x : char);
 src        procedure edi_wtb   ( temp : anyptr ;  val   : char);
 src        procedure edi_rdw   ( temp : anyptr ;  var x : io_word);
 src        procedure edi_wtw   ( temp : anyptr ;  val   : io_word);
 src        procedure edi_rds   ( temp : anyptr ;  reg   : io_word;
 src                                               var x : io_word);
 src        procedure edi_wtc   ( temp : anyptr ;  reg   : io_word;
 src                                               val   : io_word );
 src        procedure edi_tfr   ( temp : anyptr ;  bcb   : anyptr );
 src        procedure edi_send  ( temp : anyptr ;  val   : char );
 src        procedure edi_end   ( temp : anyptr ;  var x : boolean );
 src        procedure edi_ppoll ( temp : anyptr ;  var x : char );
 src        procedure edi_clr   ( temp : anyptr ;  line  : io_bit );
 src        procedure edi_set   ( temp : anyptr ;  line  : io_bit );
 src        procedure edi_test  ( temp : anyptr ;  line  : io_bit ;
 src                                               var x : boolean );
 src
 src end; { of extdi }
		page
********************************************************************************
*
*       symbols for export as procedure names
*
********************************************************************************

		def     extdi_extdi
		def     extdi_edi_init
		def     extdi_edi_isr
		def     extdi_edi_rdb
		def     extdi_edi_wtb
		def     extdi_edi_rdw
		def     extdi_edi_wtw
		def     extdi_edi_rds
		def     extdi_edi_wtc
		def     extdi_edi_tfr

		def     extdi_edi_send
		def     extdi_edi_ppoll
		def     extdi_edi_set
		def     extdi_edi_clr
		def     extdi_edi_test
		def     extdi_edi_end



********************************************************************************
*
*       symbols for import - common assembly language routines
*
*       the routines are in the module common_assembly and powerup
*
********************************************************************************

		refa    dropdma         give up DMA resource
		refa    getdma          actually get DMA
		refa    testdma         check to see if DMA is available
		refa    logint          branch to user isr
		refa    logeot          branch to user eot
		refa    stbsy           set buffer busy
		refa    stclr           set buffer not busy
		refa    DMA_stbsy       set buffer DMA busy
		refa    itxfr           is there a tfr active ?
		refa    abort_io        kill any tfr active
		refa    wait_tfr        timed wait for tfr active
		refa    check_tfr       timed wait for tfr - direction
		refa    check_timer     use for timeouts with hw timer tttt jws
		refa    delay_timer     use for all delays            tttt jws


		lmode   dropdma,getdma,testdma,logint,logeot,stbsy
		lmode   stclr,DMA_stbsy,itxfr,abort_io,wait_tfr,check_tfr
		lmode   check_timer,delay_timer                       tttt jws


		ttl iolib extdi - common equates and definitions
		page
		include COMDCL
		ttl iolib extdi - disc interface card temp definitions
		page
*
* disc interface card temp definitions
*

ABI             equ     avail_off+0     PHI/ABI flag
EOI_in          equ     avail_off+1     EOI flag for previous byte in
EOI_out         equ     avail_off+2     EOI flag for next byte out

flags           equ     avail_off+5     driver flags and status byte 0 mask:
*                                       bit 0:  pass control flag
*                                       bit 1:  not used
*                                       bit 2:  error indicator
*                                       bit 3:  IFC indicator
*                                       bit 4:  dcl indicator
*                                       bit 5:  get indicator
*                                       bit 6:  current rsv status bit.
*                                       bit 7:  if set, 9914 is in holdoff mode, therefore
*                                               issue release hold off before reading, and
*                                               use take control sync to set ATN.

ppollmsk        equ     avail_off+6     value to put in di_ppoll when ist = 1
*               equ     avail_off+7     value to put in di_ppoll when ist = 0

DMA_count       equ     avail_off+8     remaining DMA count
DMA_arm_addr    equ     avail_off+12    arm address of the assigned DMA channel
DMA_arm_word    equ     avail_off+16    arm word of the assigned DMA channel

		ttl iolib extdi - PASCAL entry points
		page
********************************************************************************
*
*         PASCAL driver entry points for disc interface cards
*
********************************************************************************

*
* module initialization
*
extdi_extdi     rts                             do nothing

*
* driver initialization
*
extdi_edi_init  movea.l (sp)+,a0                get return address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_init

*
* interrupt service routine
*
extdi_edi_isr   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_isr

*
* read a byte
*
extdi_edi_rdb   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_rdb                  call read byte
		move.b  d0,(a3)                 save character
		rts

*
* write a byte
*
extdi_edi_wtb   movea.l (sp)+,a0                get return address
		move.b  (sp)+,d0                get value
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_wtb                  call write byte

		page
*
* read a word
*
extdi_edi_rdw   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_rdb                  read first byte
		move.b  d0,(a3)+                save first byte
		bsr     di_rdb                  read second byte
		move.b  d0,(a3)                 save second byte
		rts

*
* write a word
*
extdi_edi_wtw   movea.l (sp)+,a0                get return address
		move    (sp)+,d0                get word value
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		move.b  d0,d5                   save second byte
		lsr     #8,d0
		bsr     di_wtb                  write the byte
		move.b  d5,d0                   get the second byte
		bra     di_wtb                  write the byte

*
* read status
*
extdi_edi_rds   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		move    (sp)+,d1                get register number
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_rds                  read status
		move    d0,(a3)                 save status info
		rts

*
* write control
*
extdi_edi_wtc   movea.l (sp)+,a0                get return address
		move    (sp)+,d0                get value
		move    (sp)+,d1                get register number
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_wtc                  write control

		page
*
* transfer
*
extdi_edi_tfr   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get buffer control block address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_tfr                  transfer

*
* send an 'ATN' true command
*
extdi_edi_send  movea.l (sp)+,a0                get return address
		move.b  (sp)+,d0                get value
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_r6out                send command byte

*
* perform a parallel poll
*
extdi_edi_ppoll movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_p_poll               do a parallel poll
		move.b  d0,(a3)                 save value
		rts

*
* set an hpib line
*
extdi_edi_set   movea.l (sp)+,a0                get return address
		move    (sp)+,d1                get line
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_set                  call set line

*
* clear an hpib line
*
extdi_edi_clr   movea.l (sp)+,a0                get return address
		move    (sp)+,d1                get line
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bra     di_clr                  clear the line

		page
*
* test an hpib line
*
extdi_edi_test  movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		move    (sp)+,d1                get line
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		bsr     di_test                 read status
		move.b  d0,(a3)                 save character
		rts

*
* test for EOI/end condition
*
extdi_edi_end   movea.l (sp)+,a0                get return address
		movea.l (sp)+,a3                get var address
		movea.l (sp)+,a2                get temp address
		movea.l c_adr(a2),a1            get card address
		pea     (a0)                    push return address back on stack
		move.b  EOI_in(a2),d0           get eor flag byte
		lsr.b   #7,d0                   PASCAL needs it [0..1]
		move.b  d0,(a3)                 save condition
		rts

		ttl iolib extdi - disc interface card declarations
		page
********************************************************************************
*
*       disc interface card address equates  ( offsets from a1 )
*
********************************************************************************

cardid          equ $01   read          card identification
cardreset       equ $01   write         card software reset
cardstatus      equ $03   read          card status
cardcontrol     equ $03   write         card control
cardlatch       equ $07   read/write    latch for testing card buffers

intreg          equ $11   read/write    PHI/ABI interrupt register
intmask         equ $13   read/write    PHI/ABI interrupt mask
fifo            equ $15   read/write    PHI/ABI inbound/outbound fifo
status          equ $17   read/write    PHI/ABI status register
control         equ $19   read/write    PHI/ABI control register
address         equ $1B   read/write    PHI/ABI hp-ib address register
ppolmask        equ $1D   read/write    PHI/ABI parallel poll mask register
ppolsense       equ $1F   read/write    PHI/ABI parallel poll sense register


********************************************************************************
*
*       hp-ib command equates
*
********************************************************************************

gtl             equ     1               go to local
sdc             equ     4               selective device clear
ppc             equ     5               ppoll configure
get             equ     8               group execute trigger
tct             equ     9               take control
llo             equ     17              local lockout
dcl             equ     20              device clear
ppu             equ     21              ppoll unconfigure
spe             equ     24              spoll enable
spd             equ     25              spoll disable
unl             equ     63              unlisten
unt             equ     95              untalk
ppe             equ     96              ppoll enable
ppd             equ     112             ppoll disable
		ttl iolib extdi - disc interface drivers
		page
********************************************************************************
*
*       di_init
*
*         initialize a disc interface card
*
********************************************************************************

di_init         moveq   #30,d0                  my address if active controller
		bsr.s  di_init_s                start software reset
		bne    di_IFC                   if system controller, branch
		rts



********************************************************************************
*
*       di_int_s
*
*         subroutine used for both initialization and wtc:
*
********************************************************************************

*
* software reset the card
*
di_init_s       moveq   #$80,d1                 prepare to...
		move.b  d1,cardreset(a1)        software reset the card (PHI/ABI pon)
		move.b  d1,control(a1)          set 8-bit mode
		move.b  d1,control(a1)          once more, to guarantee high-order bit values
		move    d0,ma_w(a2)             save my address
		add.b   d1,d0                   set the "online" bit
		move.b  d1,status(a1)           prepare to enable CRC if ABI
		move.b  d0,address(a1)          bring PHI/ABI online with specified address
		tst.b   address(a1)             is this an ABI?
		btst    #7,status(a1)           a writeable CRC bit will tell
		sne     ABI(a2)                 remember it
*
* set up the interrupt register & driver temps
*
		jsr     abort_io                cleanup any attached buffer
		sf      EOI_in(a2)              clear the EOI in flag
		sf      EOI_out(a2)             clear the EOI out flag
		lea     status(a1),a0           point to the status register
		move.b  #$80,(a0)               set high-order bits
		move.b  #$00,intmask(a1)        initial interrupt mask ????????????????
		move.b  #$80,cardcontrol(a1)    enable card interrupts

		btst    #3,(a0)                 is this THE system controller?
		rts                             (leave cc for caller)

		page
********************************************************************************
*
*       di_rdb
*
*         read a byte of data from hp-ib
*
*         exit:   d0.l = byte read
*
********************************************************************************

di_rdb          lea     status(a1),a0           point to the status register
		btst    #1,(a0)                 make sure addressed to listen
		beq.s   di_lsterr               else give error
		btst    #4,(a0)                 active controller?
		beq.s   di_rdb1                 branch if not
		move.b  #$80,(a0)               inhibit LF detection
		move.b  #1,fifo(a1)             enable a 1 byte counted transfer
di_rdb1         bsr.s   di_wait_fb              now wait for fifo byte
		moveq   #0,d0                   clear upper part of d0
		move.b  fifo(a1),d0             and put data in lower byte
		btst    #6,status(a1)           tagged with EOI?
		sne     EOI_in(a2)              remember it
		rts                             done!



********************************************************************************
*
*       di_wtb
*
*         write a byte of data to hp-ib
*
*         entry:  d0.b = byte to write
*
*         hpl routine
*
********************************************************************************

di_wtb          btst    #2,status(a1)           make sure addressed to talk
		beq.s   di_tlkerr               else error
		bsr.s   di_wait_fi              wait for fifo idle
		move.b  EOI_out(a2),d2          EOI out flag
		lsl.b   #7,d2                   prepare to...
		move.b  d2,status(a1)           set the high-order bits
		move.b  d0,fifo(a1)             move the data out
		sf      EOI_out(a2)             clear the EOI out flag
		rts                             done!

		ttl iolib extdi - error escapes
		page
********************************************************************************
*
*       error escapes
*
********************************************************************************

di_scbsy        moveq   #sc_busy,d0             buffer is busy
		bra.s   esc_err

di_sc_err       moveq   #bad_sct,d0             bad set/clear/test
		bra.s   esc_err

di_notactl      moveq   #no_actl,d0             not active controller
		bra.s   esc_err

di_notsctl      moveq   #no_sctl,d0             not system controller
		bra.s   esc_err

hterr_b         moveq   #tfr_err,d0             bad transfer specification
		bra.s   esc_err

hterr_d         moveq   #no_DMA,d0              DMA not installed
		bra.s   esc_err

di_noword       moveq   #no_word,d0             word transfers not allowed
		bra.s   esc_err

di_lsterr       moveq   #not_lstn,d0            not addressed as listener
		bra.s   esc_err

di_tlkerr       moveq   #not_talk,d0            not addressed as talker
		bra.s   esc_err

di_tmo          moveq   #tmo_err,d0             timeout
*               bra.s   esc_err


esc_err         move.l  d0,ioe_rslt(a5)         save error in io space
		move.b  io_sc(a2),d0            \ get sc for error
		move.l  d0,ioe_sc(a5)           /
		move    #ioe_error,esc_code(a5) save system esc code
		trap    #10                     escape

		page
********************************************************************************
*
* wait for fifo idle or fifo byte routines
*
********************************************************************************

di_wait_fi      moveq   #1,d1                   fifo idle is bit 1
		bra.s   di_wfc

di_wait_fb      moveq   #2,d1                   fifo byte is bit 2

*
* generalized wait for condition routine
*
di_wfc          clr.b   cardcontrol(a1)         disable card interrupts
		bset    d1,intmask(a1)          unmask the appropriate interrupt bit
		lea     intreg(a1),a0           point to the interrupt register
*
* quick low-overhead loop
*
		move.l  #254,d2                 quick loop counter
*
* Count changed from 127 to 254                  tttt jws 8/10/83
*
di_wfc_quick    btst    d1,(a0)                 condition met?
		bne.s   di_wfc_done             branch if so
		dbra    d2,di_wfc_quick         loop until quick count expires
*
* timed wait loop
*
		move.l  timeout(a2),d2          current timeout
		beq.s   di_wfc_infinite         branch if infinite timeout
		btst    #timer_present,sysflag2 check if timer     tttt jws
		beq.s   di_wfc_timer            br if got it       tttt jws
		mulu    #491,d2                 loop iterations per millisecond

di_wfc_timed    btst    d1,(a0)                 condition met?
		bne.s   di_wfc_done             branch if so
		subq.l  #1,d2                   decrement the loop counter
		bhi     di_wfc_timed            loop until count expired

		bclr    d1,intmask(a1)          re-mask the appropriate interrupt bit
		move.b  #$80,cardcontrol(a1)    re-enable card interrupts
		bra     di_tmo                  escape with timeout error
*
* infinite wait loop
*
di_wfc_infinite btst    d1,(a0)                 condition met?
		beq     di_wfc_infinite         loop until so
*
* wait for condition done
*
di_wfc_done     bclr    d1,intmask(a1)          re-mask the appropriate interrupt bit
		move.b  #$80,cardcontrol(a1)    re-enable card interrupts
		rts                             done!
*
*  Wait using the timer                                     tttt jws
*
di_wfc_timer    move.b  #1,-(sp)         setup timer record  tttt jws 8/10/83
		move.l  d2,-(sp)                             tttt jws 8/10/83
di_wfc_tloop    btst    d1,(a0)          check condition     tttt jws 8/10/83
		bne.s   di_wfc_texit     if true, exit       tttt jws 8/10/83
		pea     (sp)             else call timer     tttt jws 8/10/83
		jsr     check_timer      check routine       tttt jws 8/10/83
		bpl     di_wfc_tloop     ok -- loop          tttt jws 8/10/83
		addq    #6,sp            timeout, clean stk  tttt jws 5/2/84
		moveq   #10,d2           try again with a    tttt jws 5/2/84
		bra     di_wfc_timed     short count         tttt jws 5/2/84
di_wfc_texit    addq    #6,sp            cleanup stack       tttt jws 8/10/83
		bra     di_wfc_done      and continue        tttt jws 8/10/83
		page
********************************************************************************
*
*       di_rds
*
*         read status
*
*         PASCAL routine
*
********************************************************************************

di_rds          cmp     #8,d1                   register within range?
		bhi.s   rds_err                 branch if not
		add     d1,d1                   two bytes per table entry
		move    rds_table(d1),d1        load routine offset
		jmp     rds_table(d1)           jump to the appropriate routine

*
* rds jump table
*
rds_table       dc      rds_0-rds_table         status 0
		dc      rds_1-rds_table         status 1
		dc      rds_2-rds_table         status 2
		dc      rds_3-rds_table         status 3
		dc      rds_4-rds_table         status 4
		dc      rds_5-rds_table         status 5
		dc      rds_6-rds_table         status 6
		dc      rds_7-rds_table         status 7
		dc      rds_8-rds_table         status 8

rds_1           equ *
rds_2           equ *
rds_4           equ *
rds_5           equ *
rds_7           equ *
rds_8           equ *

rds_err         moveq   #bad_rds,d0             bad read status
		bra     esc_err

		page
*
* status 0 - card ID
*
rds_0           moveq   #8,d0                   Simon's ID
		rts


*
* status 3  -  controller status & address
*
rds_3           moveq   #0,d0                   ZZZZZZZZ ZZZZZZZZ
		move.b  status(a1),d0           ZZZZZZZZ 76543210
		rol.b   #4,d0                   ZZZZZZZZ 32107654
		lsl     #1,d0                   ZZZZZZZ3 2107654Z
		lsl.b   #6,d0                   ZZZZZZZ3 4ZZZZZZZ
		lsr     #1,d0                   ZZZZZZZZ 34ZZZZZZ
		add.b   ma(a2),d0               ZZZZZZZZ 34ZAAAAA
		rts


*
* status 6  -  interface status
*
rds_6           bsr     rds_3          ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ LLLLLLLL
		ror.l   #8,d0          LLLLLLLL ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ
		move.b  status(a1),d0  LLLLLLLL ZZZZZZZZ ZZZZZZZZ 76543210
		rol     #1,d0          LLLLLLLL ZZZZZZZZ ZZZZZZZ7 6543210Z
		ror.l   #1,d0          ZLLLLLLL LZZZZZZZ ZZZZZZZZ 76543210
		ror.b   #2,d0          ZLLLLLLL LZZZZZZZ ZZZZZZZZ 10765432
		ror.l   #1,d0          2ZLLLLLL LLZZZZZZ ZZZZZZZZ Z1076543
		rol.b   #2,d0          2ZLLLLLL LLZZZZZZ ZZZZZZZZ 076543Z1
		ror.l   #1,d0          12ZLLLLL LLLZZZZZ ZZZZZZZZ Z076543Z
		rol     #4,d0          12ZLLLLL LLLZZZZZ ZZZZZ076 543ZZZZZ
		ror.l   #4,d0          ZZZZ12ZL LLLLLLLZ ZZZZZZZZ Z076543Z
		ror.b   #3,d0          ZZZZ12ZL LLLLLLLZ ZZZZZZZZ 43ZZ0765
		ror.l   #1,d0          5ZZZZ12Z LLLLLLLL ZZZZZZZZ Z43ZZ076
		swap    d0             ZZZZZZZZ Z43ZZ076 5ZZZZ12Z LLLLLLLL
		rts                             whew!!!

		page
********************************************************************************
*
*       di_wtc
*
*         write control
*
*         entry:  d0.w = parameter
*
********************************************************************************

di_wtc          cmpi    #1,d1                   register within range?
		bhi.s   rds_err                 branch if not
		add     d1,d1                   two bytes per table entry
		jmp     hwtctbl(d1)             jump to the appropriate routine


hwtctbl         bra.s   di_wtc_rst              control 0 - do a reset
		bra.s   di_rqs                  control 1 - set SRQ response
*               bra.s   di_wtc_ppc              control 2 - ppoll configure
*               bra.s   di_wtc_sma              control 3 - set my addr
*               bra.s   rds_err                 control 4 - not used
*               bra.s   rds_err                 control 5 - enable interrupts


*
* software reset
*
di_wtc_rst      move.b  ma(a2),d0               else use previous address

hpl_wtc1        move.b  status(a1),-(sp)        save controller active state.
		bsr     di_init_s               do software reset
		btst    #4,(sp)+                were we active controller?
		beq.s   hpl_wtc2                if not, skip
		nop     ???????????????????????????????????????????????
hpl_wtc2        rts                             else done


*
* request service
*
di_rqs          bclr    #6,flags(a2)            assume rsv = 0 in this new byte
		move.b  d0,d1                   if rsv bit in the new byte is indeed
		bclr    #6,d1                   zero, then just output the new byte.
		beq.s   di_rqs2
*               move.b  d1,di_spoll(a1)         else first write the byte with rsv
		bset    #6,flags(a2)            clear. remember that rsv is set.
di_rqs2         move.b  d0,(a1) <<<di_spoll(a1)         write the byte with rsv correct.
		move    ppollmsk(a2),d1         go update the parallel poll response
hpl_wtc4        trap    #11                     get into supervisor mode   scs
* scs           move    sr,-(sp)                disable isr's while we figure
		ori     #$2700,sr               out which mask to set based on
		btst    #6,flags(a2)            current rsv bit.
		beq.s   hpl_wtc5                if rsv = 0, use right byte
		ror     #8,d1                   else use left byte
hpl_wtc5        move.b  d1,(a1) <<<di_ppoll(a1)
		move    (sp)+,sr                restore user mode       scs
		rts                                                     scs
* scs           rte                            re-enable isr's and return

		page
********************************************************************************
*
*       di_p_poll
*
*         conduct parallel poll
*
*         if not active controller give error
*         else value returned in d0.b
*
*         hpl routine
*
********************************************************************************

di_p_poll       btst    #4,status(a1)           active controller?
		beq     di_notactl              branch if not

		bsr     di_wait_fi              wait for fifo idle

		clr.b   cardcontrol(a1)         disable card interrupts
		bset    #5,intmask(a1)          unmask the poll response bit for ABI's sake
		clr.b   status(a1)              high-order bits
		st      ppolmask(a1)            look at all response bits
		clr.b   ppolsense(a1)           normal sense for all
		move.b  1(a1),d0                added additional wait as    - dew1
		move.b  1(a1),d0                chip has been speeded up.   - dew1
		move.b  1(a1),d0                ppoll takes 2us.            - dew1
		move.b  fifo(a1),d0             get the response
		bclr    #5,intmask(a1)          re-mask the poll response bit
		move.b  #$80,cardcontrol(a1)    re-enable card interrupts

		rts

		page
********************************************************************************
*
*       di_set
*
*         set an hpib line true
*
*         PASCAL routine
*
********************************************************************************

di_set          cmp     #7,d1                   register within range?
		bhi     di_sc_err               branch if not
		add     d1,d1                   two bytes per table entry
		move    set_table(d1),d1        routine offset
		jmp     set_table(d1)           jump to the appropriate routine

set_table       dc      di_REN-set_table        REN  - set REN
		dc      di_IFC-set_table        IFC  - pulse IFC (set REN/clr ATN)
		dc      di_sc_err-set_table     SRQ  - error
		dc      di_EOI-set_table        EOI  - pulse EOI on next byte out
		dc      di_sc_err-set_table     NRFD - error
		dc      di_sc_err-set_table     NDAC - error
		dc      di_sc_err-set_table     DAV  - error
		dc      di_sc_err-set_table     ATN  - error


*
* set REN
*
di_REN          btst    #3,status(a1)           system controller?
		beq     di_notsctl              branch if not
		bset    #5,control(a1)          set REN
		rts


*
* assert IFC for 100us
*
di_IFC          btst    #3,status(a1)           system controller?
		beq     di_notsctl              branch if not

		lea     control(a1),a0          point to the control register
		bclr    #5,(a0)                 clear REN
		bset    #4,(a0)                 assert IFC
*  tttt jws     moveq   #80,d0                  must hold IFC at least 100us...
*  tttt jws     dbra    d0,*                    to satisfy the bus standard
		move.l  #100,-(sp)              use the timer      tttt jws
		jsr     delay_timer             routine for this   tttt jws 8/10/83
		bclr    #4,(a0)                 release IFC
		bset    #5,(a0)                 set REN

		rts


*
* assert EOI on the next wtb
*
di_EOI          st      EOI_out(a2)             set the flag
		rts

		page
********************************************************************************
*
*       di_clr
*
*         set an hpib line false
*
*         PASCAL routine
*
********************************************************************************

di_clr          cmp     #7,d1                   register within range?
		bhi     di_sc_err               branch if not
		add     d1,d1                   two bytes per table entry
		move    clear_table(d1),d1      routine offset
		jmp     clear_table(d1)         jump to the appropriate routine

clear_table     dc      di_local-clear_table    REN  - clear REN
		dc      di_dmyrts-clear_table   IFC  - nothing
		dc      di_sc_err-clear_table   SRQ  - error
		dc      di_dmyrts-clear_table   EOI  - nothing
		dc      di_sc_err-clear_table   NRFD - error
		dc      di_sc_err-clear_table   NDAC - error
		dc      di_sc_err-clear_table   DAV  - error
		dc      di_sc_err-clear_table   ATN  - error


*
* clear REN
*
di_local        btst   #3,status(a1)            system controller?
		beq    di_notsctl               branch if not
		bclr   #5,control(a1)           clear REN
di_dmyrts       rts

		page
********************************************************************************
*
*       di_test
*
*         get an hpib line's state
*
*         entry :       d1 = line parameter
*                            0 = REN
*                            1 = IFC
*                            2 = SRQ
*                            3 = EOI
*                            4 = NRFD
*                            5 = NDAC
*                            6 = DAV
*                            7 = ATN
*
*         PASCAL routine
*
********************************************************************************

di_test         bra             di_sc_err

		page
********************************************************************************
*
*       di_r6out
*
*         emulation of r6 out for hp-ib
*
*         entry:  d0 = byte to output
*
*         exit:   if not active controller, sts cleared and error bit set
*                 else operation is done and any addressing decoded.
*
*         hpl routine ( modified )
*
********************************************************************************

di_r6out        jsr     wait_tfr                if a tfr is active wait till it isn't

		btst    #4,status(a1)           active controller?
		beq     di_notactl              branch if not

		bsr     di_wait_fi              wait for fifo idle
		move.b  #$40,status(a1)         following byte is a command
		move.b  d0,fifo(a1)             send it

		rts

		ttl iolib extdi - disc interface interrupt service routine
		page
********************************************************************************
*
*       di_isr
*
*         interrupt service routine for hp-ib cards
*
*         entry : a1,a2 are set up
*
*         the isr will track down the buffer control block
*
*         hpl routine ( modified )
*
********************************************************************************

di_isr          bclr    #1,flags(a2)            clear user isr pending flag
		bsr     di_isr1                 process the interrupting condition(s)
		jsr     itxfr                   go see if transfer is active
		beq.s   isr_end                 if not, then we are done.
		cmp.b   #tt_burst,d1            if frw is active, go process it
		beq     di_frw
		cmp.b   #tt_int,d1              if int then go process it
		beq     di_buf
		cmp.b   #tt_DMA,d1              if DMA
		beq.s   di_isrdma
isr_end         bclr    #1,flags(a2)            if isr pending then do it
		beq.s   di_isr_ex
		jsr     logint
di_isr_ex       rts                             otherwise return

		page
*
* DMA transfer interrupt:
*
di_isrdma       movea.l DMA_arm_addr(a2),a4     DMA arm & status register address
		tst.b   tdir_off(a3)            test direction
		bne.s   isrdma_out              branch if output


*
* input DMA transfer
*
		lea     tfil_off(a3),a0         point to the buffer fill pointer

		btst    #6,status(a1)           last byte in tagged with EOI?
		sne     EOI_in(a2)              remember it

		btst    #0,1(a4)                DMA channel unarmed?
		beq.s   isrdma_unarmed          branch if so

		btst    #1,intreg(a1)           fifo idle?
		bne.s   isrdma_in_term          branch of so (terminate tfr)
		bra     isr_end                 otherwise, keep going

isrdma_unarmed  tst.l   DMA_count(a2)           more to transfer?
		bgt.s   isrdma_restart          branch if so

isrdma_in_term  bsr     input_tfr_term          clean up the fifo's if possible
		bclr    #1,intmask(a1)          re-mask fifo idle condition
		bra.s   isrdma_term


*
* output DMA transfer
*
isrdma_out      lea     temp_off(a3),a0         point to the buffer empty pointer

		btst    #0,1(a4)                DMA channel still armed?
		bne.s   isr_end                 branch if so; keep going

		bset    #7,control(a1)          re-set 8-bit mode if necessary
		clr.b   status(a1)              clear the hi-order bits

		cmpi.w  #1,DMA_count(a2)        [ cmpi.l #$10000,DMA_count(a2) ]
		blt.s   isrdma_term             branch if no more to transfer

		bgt.s   isrdma_restart          branch if additional bursts remain
		tst.b   tend_off(a3)            last burst: EOI tag set?
		beq.s   isrdma_restart          branch if not, otherwise...
		bclr    #7,control(a1)          clear 8-bit mode (tag last byte with EOI)

		page
*
* DMA transfer restart
*
isrdma_restart  subq.w  #1,DMA_count(a2)        [ sub.l #$10000,DMA_count(a2) ]
		move.l  tcnt_off(a3),d0         previous burst length
		add.l   d0,(a0)                 update the appropriate buffer pointer
		move.l  #$10000,tcnt_off(a3)    next burst length
		move    DMA_arm_word(a2),(a4)   re-arm the DMA channel
		bra     isr_end                 done!


*
* DMA transfer termination
*
isrdma_term     move.b  #$80,cardcontrol(a1)    disable card DMA
		move.l  a0,-(sp)                save a0
		jsr     dropdma                 free the DMA channel
		movea.l (sp)+,a0                restore a0
		move.l  tcnt_off(a3),d3         intended number of bytes transfered
		sub.l   d4,d3                   actual number of bytes transferred
		add.l   d3,(a0)                 update the appropriate buffer pointer
		add.l   DMA_count(a2),d4        total remaining count
		move.l  d4,tcnt_off(a3)         record it
		jsr     stclr                   mark the tfr done and log branch
		bra     isr_end                 done!




*
* interrupt transfer processing:
*
di_buf          tst.b   tdir_off(a3)            which direction transfer?
		bne.s   di_bufo                 branch if output


*
* buffered input:
*
di_bufi         nop

*
* buffered output:
*
di_bufo         equ *

*
* int and frw transfer termination
*
di_ti_term      equ *

di_to_term      move.b  #0,d0                 disable other interrupts
*               bsr     di_eir
		jsr     stclr                 mark the buffer finished
		bra     isr_end              end of isr


*
* fast r/w transfer processing:
*
di_frw          ori     #$2700,sr               disable all other ints
*                                       the PASCAL system will re-enable&rte
		tst.b   tdir_off(a3)          which direction transfer?
		bne.s   di_frwo                skip if output

*
* fast r/w input:
*
di_fri          nop

*
* fast r/w output:
*
di_frwo         equ *
		bra     di_to_term              else we are done!
		page
********************************************************************************
*
*       isr1
*
*         the following routine does all the grunt work for the isr. it is
*         separated out so it can be called from background.
*
********************************************************************************

di_isr1         lea     intreg(a1),a0           point to the interrupt condition register
		lea     intmask(a1),a4          point to the interrupt mask register
*
* DCL
*
		btst    #0,(a0)                 DCL interrupt?
		beq.s   di_no_DCL               branch if not
		bsr     di_log                  else do normal logging
		bclr    #0,(a4)                 mask off the interrupt
di_no_DCL       equ *
*
* SRQ
*
		btst    #4,(a0)                 SRQ interrupt?
		beq.s   di_no_SRQ               branch if not
		bsr     di_log                  else do normal logging
		bclr    #4,(a4)                 mask off the interrupt
di_no_SRQ       equ *
*
* POL
*
		btst    #5,(a0)                 POL interrupt?
		beq.s   di_no_POL               branch if not
		bsr     di_log                  else do normal logging
		bclr    #5,(a4)                 mask off the interrupt
di_no_POL       equ *
*
* SCG
*
		btst    #7,(a0)                 SCG interrupt?
		beq.s   di_no_SCG               branch if not
		bsr     di_log                  else do normal logging
		bclr    #7,(a4)                 mask off the interrupt
di_no_SCG       equ *
		rts

*
* di_log    mark that an isr condition is pending
*
di_log          bset    #1,flags(a2)            set condition
		rts

		ttl iolib extdi - disc interface transfer
		page
********************************************************************************
*
*       di_tfr
*
*         driver call for execution of tfr statement
*
*         entry:  conditions other than normal a1,a2 are:
*                 a3.l = pointer to transfer information
*
********************************************************************************

di_tfr          jsr     check_tfr               wait for tfr to finish (timed)

		tst.b   t_bw_off(a3)            don't allow word transfers
		bne     di_noword

		move.l  tcnt_off(a3),d0         get count

		moveq   #0,d1
		move.b  tusr_off(a3),d1         user specified transfer type
		add     d1,d1                   two bytes per table entry
		jsr     testdma                 DMA available?
		beq.s   di_nodma                branch if not; use the first half of table
		add     #20,d1                  otherwise use the second half of table
di_nodma        move    tfr_table(d1),d1        routine offset
		jmp     tfr_table(d1)           jump to the appropriate routine

*
* transfer jump table
*
*                                               --------------------    DMA uninstalled or unavailable
tfr_table       dc      hterr_b-tfr_table       serial  interrupt
		dc      hterr_d-tfr_table       serial  DMA
		dc      di_t_fhs-tfr_table      serial  fhs
		dc      di_t_fhs-tfr_table      serial  fastest
		dc      hterr_b-tfr_table       serial  overlap
*                                               --------------------
		dc      di_t_int-tfr_table      overlap interrupt
		dc      hterr_d-tfr_table       overlap DMA
		dc      di_t_bst-tfr_table      overlap fhs
		dc      di_t_bst-tfr_table      overlap fastest
		dc      di_t_int-tfr_table      overlap overlap
*                                               --------------------    DMA available
		dc      hterr_b-tfr_table       serial  interrupt
		dc      di_t_DMA-tfr_table      serial  DMA
		dc      di_t_fhs-tfr_table      serial  fhs
		dc      di_t_DMA-tfr_table      serial  fastest
		dc      hterr_b-tfr_table       serial  overlap
*                                               --------------------
		dc      di_t_int-tfr_table      overlap interrupt
		dc      di_t_DMA-tfr_table      overlap DMA
		dc      di_t_bst-tfr_table      overlap fhs
		dc      di_t_DMA-tfr_table      overlap fastest
		dc      di_t_DMA-tfr_table      overlap overlap
		page
*
* transfer DMA
*
di_t_DMA        move.b  #tt_DMA,tact_off(a3)    set tfr type to DMA

		move.l  d0,d1                   total count
		subq.l  #1,d1                   total count minus 1
		moveq   #0,d0
		move.w  d1,d0                   first burst count minus 1
		sub.l   d0,d1                   remaining count (multiple of $10000)
		move.l  d1,DMA_count(a2)        remember it
		addq.l  #1,d0                   burst count [1..65536]

		clr.b   cardcontrol(a1)         disable card interrupts
		jsr     getdma                  get a DMA channel
		bclr    #0,d2                   always clear the DMA interrupt enable bit
		tst.b   t_DMApri(a3)            DMA priority requested?
		beq.s   di_arm_DMA              branch if not
		bset    #3,d2                   otherwise set the DMA priority bit
di_arm_DMA      move    d2,(a4)                 arm the channel
		move.l  a4,DMA_arm_addr(a2)     remember the DMA channel arm address
		move    d2,DMA_arm_word(a2)     remember the DMA channel arm word

		lea     0,a4                    no DMA termination routine (no DMA interrupt enabled)
		jsr     DMA_stbsy               set DMA channel, buffer busy

		tst.b   tdir_off(a3)            test the transfer direction
		bne.s   di_tod                  branch if output

*
* transfer input DMA:
*
di_tid          bset    #1,intmask(a1)          interrupt on DMA completion or fifo idle
		bclr    #1,control(a1)          select the inbound fifo for DMA
		add.l   d1,d0                   recompute the total count again
		bsr     input_tfr_en            enable the transfer
		bra.s   di_DMA_en               enable the card & wait if serial


*
* transfer output DMA:
*
di_tod          bset    #1,control(a1)          select the outbound fifo for DMA
		bset    #7,control(a1)          assume no EOI tag (8-bit mode)
		clr.b   status(a1)              clear the high-order bits
		tst.l   d1                      remaining count 0?
		bne.s   di_tod_1                branch if not
		tst.b   tend_off(a3)            EOI tag set?
		beq.s   di_tod_1                branch if not, otherwise...
		bclr    #7,control(a1)          clear 8-bit mode (tag last byte with EOI)
di_tod_1        bset    #3,d3                   set the card's output DMA enable bit
di_DMA_en       move.b  d3,cardcontrol(a1)      enable card interrupts & DMA

di_DMA_w        cmpi.b  #5,tusr_off(a3)         overlap transfer?
		bge.s   di_DMA_w2               branch if so

di_DMA_w1       cmpi.b  #255,t_sc_off(a3)       if not then wait till done
		bne.s   di_DMA_w1

di_DMA_w2       rts

		page
*
* transfer interrupt
*
di_t_int        move.b  #tt_int,tact_off(a3)    set tfr type to interrupt
		bra     hterr_b


*
* transfer burst (intr on 1st byte fhs on rest)
*
di_t_bst        move.b  #tt_burst,tact_off(a3)  set tfr type to burst
		bra     hterr_b


*
* transfer fast handshake
*
di_t_fhs        move.b  #tt_fhs,tact_off(a3)    set tfr type to fhs
		bra     hterr_b

		page
*
* input transfer enable
*
input_tfr_en    btst    #4,status(a1)           active controller?
		beq.s   te_rts                  branch if not

		cmp.l   #256,d0                 count low enough for counted transfer?
		ble.s   te_ect                  branch if so

		move.b  #$C0,status(a1)
		move.b  #$00,fifo(a1)           uncounted transfer enable
te_rts          rts

te_ect          move.b  #$80,status(a1)         inhibit LF detection
		move.b  d0,fifo(a1)             counted transfer enable
		rts


*
* input transfer term
*
input_tfr_term  btst    #4,status(a1)           active controller?
		beq.s   tt_rts                  branch if not

		btst    #1,intreg(a1)           fifo idle?
		bne.s   tt_empty_fifo           branch if so
*
* (input) transfer enable byte still active - must init outbound fifo
*
		btst    #3,status(a1)           system controller?
		beq.s   tt_non_sys              branch if not

		ori.b    #$11,control(a1)       assert IFC & init outbound fifo
*   tttt jws    moveq   #80,d0                  must hold IFC at least 100us...
*   tttt jws    dbra    d0,*                    to satisfy the bus standard
		move.l  #100,-(sp)              use timer routine  tttt jws
		jsr     delay_timer             for this delay     tttt jws
		bclr    #4,control(a1)          release IFC
		bra.s   tt_empty_fifo           go empty the inbound fifo

tt_non_sys      bset    #0,control(a1)          init outbound fifo; TCA like this is hazardous!!!
*
* empty inbound fifo
*
tt_empty_fifo   bset    #2,intmask(a1)          unmask fifo byte condition
		btst    #2,intreg(a1)           fifo byte?
		beq.s   tt_fifo_empty           branch if not
		tst.b   fifo(a1)                otherwise, discard it and...
		bra     tt_empty_fifo           go check for more

tt_fifo_empty   bclr    #2,intmask(a1)          re-mask fifo byte condition

tt_rts          rts


		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.2
log
@Fixed 375 parallel poll problem.
@
text
@@


40.1
log
@Automatic bump of revision number for PWS version 3.23c
@
text
@d55 8
d810 3
@


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