[comp.sys.ibm.pc] BEEP too long with Paradise VGA card..

jcb@loral.UUCP (Jay Bowden) (12/15/89)

I am convinced that the BEEP that my PC emits has become
toooooooo lonnnnnnnnnnnggggggg since I installed a Paradise
Basic VGA card in it.  Seems strange , but I can rationalize that
the VGA BIOS on the card might be responsible for handling
a control-G beep under DOS screen I/O.  Can anyone out there
confirm or refute this?

The PC is an AST 386 Model 340, and the program I notice it
in most is MKS vi, since I have gotten into the habit of 
hitting redundant escapes, and using the beep to confirm that
I am not in insert mode.

I mean, this beep has got to be at least 2 seconds...

Thanks!

- Jay

-- 
------------------------------------------------------------------
Jay Bowden, EE/Consultant; see also Bowden Engineering
Currently contracted at Loral Instrumentation, San Diego
{ucbvax, ittvax!dcdwest, akgua, decvax, ihnp4}!ucsd!loral!jcb

darcy@druid.uucp (D'Arcy J.M. Cain) (12/16/89)

In article <2426@loral.UUCP> jcb@loral.UUCP (Jay Bowden) writes:
>I am convinced that the BEEP that my PC emits has become
>toooooooo lonnnnnnnnnnnggggggg since I installed a Paradise
>Basic VGA card in it.  Seems strange , but I can rationalize that
>the VGA BIOS on the card might be responsible for handling
>a control-G beep under DOS screen I/O.  Can anyone out there
>confirm or refute this?
I would make the same assumption since the VGA BIOS does replace the
screen handling calls.

>
>The PC is an AST 386 Model 340, and the program I notice it
>in most is MKS vi, since I have gotten into the habit of 
>hitting redundant escapes, and using the beep to confirm that
>I am not in insert mode.
>
>I mean, this beep has got to be at least 2 seconds...
>
>Thanks!
>
>- Jay
>

The following kept me sane (OK, kept me from going more insane 8-> )
Assemble the following and put it in your autoexec.bat

 ---------------------------- cut here ----------------------------------
	page	56, 132
;
; CUTBEEP.ASM
;
; Written by D'Arcy J.M. Cain
; West Hill, Ontario
; darcy@druid.UUCP
;
; A driver to intercept the screen interupt and handle the beep
;
; This code is freely distributable as long as the copyright notice
; is left in.
;
code    segment
assume  cs:code, ds:code
org     100h
;
start:        jmp     init            ; initialization code doesn't stay resident
;
service	proc	near
s:
	cmp	ax, 0e07h                     ; capture beep call
	jnz	bios
;
	sti
	push	ax
	push	cx
	mov	al, 0b6h
	out	43h, al
	jmp	beep_1                         ; These silly looking jumps have
beep_1:                                ; a purpose but I can't remember what
	jmp	beep_2
beep_2:
	mov	al, 04h
	out	42h, al
	jmp	beep_3
beep_3:
	jmp	beep_4
beep_4:
	out	42h, al
	in	al, 61h
	jmp	beep_5
beep_5:
	jmp	beep_6
beep_6:
	or	al, 03
	out	61h, al
	mov	cx, 4000h                         ; controls length of beep
beep_7:
	loop	beep_7
;
	and	al, 0fdh
	out	61h, al
;
	pop	cx
	pop	ax
	iret
;
bios:
; A jump to this location will cause a far jump to the original interupt
; routine
;
	db	0eah			; far jump
bios1   dw      2 dup (0)
;
service	endp
;
; The following code does not stay resident after initialization
;
msg         db      'CUTBEEP - shortens long beeps to '
            db      'acceptable levels', 0dh, 0ah
            db      'Copyright 1989 D''Arcy J.M. Cain', 0dh, 0ah
            db      'West Hill, Ontario', 0dh, 0ah
            db      '(416) 281-6094', 0dh, 0ah, 0ah, 0
init:
        mov     ax, cs
        mov     ds, ax
        mov     si, offset msg
;
prt_msg:
        lodsb
        or      al, al
        jz      replace_int
        push    si
        mov     ah, 0eh
        int     10h
        pop     si
        jmp     prt_msg
;
replace_int:
        mov     ax, 3510h               ; get existing interupt
        int     21h
        mov     bios1, bx
        mov     ax, es
        mov     bios1+2, ax
;
        mov     dx, offset s       ; new service routine
        mov     ax, 2510h
        int     21h
;
        mov     dx, offset init  ; terminate and stay resident
	int	27h
;
;
code	ends
        end     start
;
 --------------------------- end here -------------------------------

-- 
D'Arcy J.M. Cain (darcy@druid)     |   Thank goodness we don't get all 
D'Arcy Cain Consulting             |   the government we pay for.
West Hill, Ontario, Canada         |
No disclaimers.  I agree with me   |