head     56.3;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

41.1
date     89.12.22.11.30.55;  author jwh;  state Exp;
branches ;
next     1.1;

1.1
date     89.12.14.15.53.19;  author dew;  state Exp;
branches ;
next     ;


desc
@This file represents the low level interface that connects the HP PARALLEL
(centronics) driver to the COMASM common IO routines.
@


56.3
log
@
pws2rcs automatic delta on Wed Jan 27 13:14:25 MST 1993
@
text
@	  MNAME PLLEL_ASM
	  SRC MODULE PLLEL_ASM;
	  SRC IMPORT IODECLARATIONS;
	  SRC EXPORT
	  SRC   TYPE
	  SRC     TIMER_REC = RECORD
	  SRC                   TIME : INTEGER;
	  SRC                   FLAG : IO_WORD;
	  SRC                 END;
	  SRC
	  SRC     PROCEDURE START_TIMER(VAR TIME : TIMER_REC);
	  SRC     FUNCTION  TIME_EXPIRED(VAR TIME : TIMER_REC):BOOLEAN;
	  SRC     PROCEDURE ABORT_IO;
	  SRC     PROCEDURE STBSY;
	  SRC     PROCEDURE STCLR;
	  SRC     FUNCTION GETDMA:INTEGER;  {returns dma channel (0,1) being used}
	  SRC     FUNCTION DROPDMA:INTEGER; {returns dma final count+1; 0, not -1, means normal completion}
	  SRC
	  SRC END; { PLLEL_ASM }

	  DEF PLLEL_ASM_PLLEL_ASM
	  DEF PLLEL_ASM_START_TIMER
	  DEF PLLEL_ASM_TIME_EXPIRED
	  DEF PLLEL_ASM_ABORT_IO
	  DEF PLLEL_ASM_STBSY
	  DEF PLLEL_ASM_STCLR
	  DEF PLLEL_ASM_GETDMA
	  DEF PLLEL_ASM_DROPDMA

*         include IOLIB:COMDCL
	  include COMDCL

*************************************************************************
* START_TIMER                           timing setup
*
*   ASSUMES:
*       - sp+4 points to location of a timer record
*              the TIME field is a delay in milliseconds
*   RETURNS:
*       - The TIME field contains a value to match against the timer
*         (no timer present then this field is a scaled count)
*************************************************************************

	REFA    CHECK_TIMER   in system POWERUP code
	LMODE   CHECK_TIMER

PLLEL_ASM_START_TIMER equ *
	movea.l 4(sp),a0        get addr of timer rec
	btst    #timer_present,sysflag2
	bne.s   soft_start
	st      4(a0)   set the first time flag
	jmp     CHECK_TIMER

soft_start equ  *
*       scale the time out value for use as a counter
	move.l  (a0),d0
	lsl.l   #4,d0           x 16
	move.l  d0,(a0)
	move.l  (sp)+,(sp)      move the return address
	rts
*************************************************************************
* FUNCTION TIME_EXPIRED(VAR TIME: INTEGER):BOOLEAN;
*   ASSUMES:
*       - sp+4 points to a timer record (set up by start_timer)
*************************************************************************

PLLEL_ASM_TIME_EXPIRED  EQU *
	clr.b   8(sp)           clear the function value
	btst    #timer_present,sysflag2
	bne.s   soft_check
	move.l  4(sp),-(sp)     copy the timer rec address
	jsr     CHECK_TIMER
	bpl.s   timex1
timex0  move.b  #1,8(sp)
timex1  move.l  (sp)+,(sp)      move the return address
	rts
soft_check equ  *
	movea.l 4(sp),a0
	subq.l  #1,(a0)
	bpl     timex1
	bra     timex0
*************************************************************************
* pascal wrapper routines for the iocomasm driver routines that have
* assembly only interfaces.
*************************************************************************
	  refa  pllel_util
	  refa  abort_io
	  refa  stbsy
	  refa  stclr
	  refa  itxfr
	  refa  getdma
	  refa  dma_stbsy
	  refa  dropdma
	  lmode pllel_util
	  lmode abort_io
	  lmode stbsy
	  lmode stclr
	  lmode itxfr
	  lmode getdma
	  lmode dma_stbsy
	  lmode dropdma

gettmp  equ *
	movea.l pllel_util-4(a5),a2
	rts

*************************************************************************
* PROCEDURE ABORT_IO
*************************************************************************
PLLEL_ASM_ABORT_IO equ *
	bsr     gettmp
	jsr     abort_io
	rts

*************************************************************************
* PROCEDURE STBSY
*************************************************************************
PLLEL_ASM_STBSY equ *
	bsr     gettmp
	jsr     itxfr
	move.l  d3,d0
	jsr     stbsy
	rts

*************************************************************************
* PROCEDURE STCLR
*************************************************************************
PLLEL_ASM_STCLR equ *
	bsr     gettmp
	jsr     stclr
	rts

*************************************************************************
* FUNCTION GETDMA:INTEGER
*    o acquires DMA channel
*    o set up DMA address
*    o set up DMA count
*    o set up DMA arm word for priority and ARMS!
*    o returns the channel, either 0 or 1.
*************************************************************************
PLLEL_ASM_GETDMA equ *
	bsr     gettmp
	jsr     itxfr
	move.l  d3,d0
	movea.l c_adr(a2),a1
	jsr     getdma
	addq.w  #8,d2           ;dma priority
	move.w  d2,(a4)         ;arm DMA channel
	sub     #$81,d3
	moveq   #0,d0
	move.b  d3,d0
	move.l  d0,4(sp)        ;return channel #
	rts

*************************************************************************
* PROCEDURE DROPDMA
*************************************************************************
PLLEL_ASM_DROPDMA equ *
	bsr     gettmp
	jsr     DROPDMA
	move.l  d4,4(sp)
	rts
*
*       module initialization
*
PLLEL_ASM_PLLEL_ASM EQU *
	  RTS

	end
@


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


56.1
log
@Automatic bump of revision number for PWS version 3.25
@
text
@a0 169
	  MNAME PLLEL_ASM
	  SRC MODULE PLLEL_ASM;
	  SRC IMPORT IODECLARATIONS;
	  SRC EXPORT
	  SRC   TYPE
	  SRC     TIMER_REC = RECORD
	  SRC                   TIME : INTEGER;
	  SRC                   FLAG : IO_WORD;
	  SRC                 END;
	  SRC
	  SRC     PROCEDURE START_TIMER(VAR TIME : TIMER_REC);
	  SRC     FUNCTION  TIME_EXPIRED(VAR TIME : TIMER_REC):BOOLEAN;
	  SRC     PROCEDURE ABORT_IO;
	  SRC     PROCEDURE STBSY;
	  SRC     PROCEDURE STCLR;
	  SRC     FUNCTION GETDMA:INTEGER;  {returns dma channel (0,1) being used}
	  SRC     FUNCTION DROPDMA:INTEGER; {returns dma final count+1; 0, not -1, means normal completion}
	  SRC
	  SRC END; { PLLEL_ASM }

	  DEF PLLEL_ASM_PLLEL_ASM
	  DEF PLLEL_ASM_START_TIMER
	  DEF PLLEL_ASM_TIME_EXPIRED
	  DEF PLLEL_ASM_ABORT_IO
	  DEF PLLEL_ASM_STBSY
	  DEF PLLEL_ASM_STCLR
	  DEF PLLEL_ASM_GETDMA
	  DEF PLLEL_ASM_DROPDMA

*         include IOLIB:COMDCL
	  include COMDCL

*************************************************************************
* START_TIMER                           timing setup
*
*   ASSUMES:
*       - sp+4 points to location of a timer record
*              the TIME field is a delay in milliseconds
*   RETURNS:
*       - The TIME field contains a value to match against the timer
*         (no timer present then this field is a scaled count)
*************************************************************************

	REFA    CHECK_TIMER   in system POWERUP code
	LMODE   CHECK_TIMER

PLLEL_ASM_START_TIMER equ *
	movea.l 4(sp),a0        get addr of timer rec
	btst    #timer_present,sysflag2
	bne.s   soft_start
	st      4(a0)   set the first time flag
	jmp     CHECK_TIMER

soft_start equ  *
*       scale the time out value for use as a counter
	move.l  (a0),d0
	lsl.l   #4,d0           x 16
	move.l  d0,(a0)
	move.l  (sp)+,(sp)      move the return address
	rts
*************************************************************************
* FUNCTION TIME_EXPIRED(VAR TIME: INTEGER):BOOLEAN;
*   ASSUMES:
*       - sp+4 points to a timer record (set up by start_timer)
*************************************************************************

PLLEL_ASM_TIME_EXPIRED  EQU *
	clr.b   8(sp)           clear the function value
	btst    #timer_present,sysflag2
	bne.s   soft_check
	move.l  4(sp),-(sp)     copy the timer rec address
	jsr     CHECK_TIMER
	bpl.s   timex1
timex0  move.b  #1,8(sp)
timex1  move.l  (sp)+,(sp)      move the return address
	rts
soft_check equ  *
	movea.l 4(sp),a0
	subq.l  #1,(a0)
	bpl     timex1
	bra     timex0
*************************************************************************
* pascal wrapper routines for the iocomasm driver routines that have
* assembly only interfaces.
*************************************************************************
	  refa  pllel_util
	  refa  abort_io
	  refa  stbsy
	  refa  stclr
	  refa  itxfr
	  refa  getdma
	  refa  dma_stbsy
	  refa  dropdma
	  lmode pllel_util
	  lmode abort_io
	  lmode stbsy
	  lmode stclr
	  lmode itxfr
	  lmode getdma
	  lmode dma_stbsy
	  lmode dropdma

gettmp  equ *
	movea.l pllel_util-4(a5),a2
	rts

*************************************************************************
* PROCEDURE ABORT_IO
*************************************************************************
PLLEL_ASM_ABORT_IO equ *
	bsr     gettmp
	jsr     abort_io
	rts

*************************************************************************
* PROCEDURE STBSY
*************************************************************************
PLLEL_ASM_STBSY equ *
	bsr     gettmp
	jsr     itxfr
	move.l  d3,d0
	jsr     stbsy
	rts

*************************************************************************
* PROCEDURE STCLR
*************************************************************************
PLLEL_ASM_STCLR equ *
	bsr     gettmp
	jsr     stclr
	rts

*************************************************************************
* FUNCTION GETDMA:INTEGER
*    o acquires DMA channel
*    o set up DMA address
*    o set up DMA count
*    o set up DMA arm word for priority and ARMS!
*    o returns the channel, either 0 or 1.
*************************************************************************
PLLEL_ASM_GETDMA equ *
	bsr     gettmp
	jsr     itxfr
	move.l  d3,d0
	movea.l c_adr(a2),a1
	jsr     getdma
	addq.w  #8,d2           ;dma priority
	move.w  d2,(a4)         ;arm DMA channel
	sub     #$81,d3
	moveq   #0,d0
	move.b  d3,d0
	move.l  d0,4(sp)        ;return channel #
	rts

*************************************************************************
* PROCEDURE DROPDMA
*************************************************************************
PLLEL_ASM_DROPDMA equ *
	bsr     gettmp
	jsr     DROPDMA
	move.l  d4,4(sp)
	rts
*
*       module initialization
*
PLLEL_ASM_PLLEL_ASM EQU *
	  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
@@


1.1
log
@Initial revision
@
text
@@
