🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #151

Keyboard interrupt conflict?

#151
From: Andrew Wang
Date: Mon, 13 Apr 1992 07:44
48 lines
2194 bytes
Hello,
    I am having a problem with keyboard interrupts crashing my
program.  It is a control program with a real-time hardware interrupt
driven at 39 hz. Everything works fine until a) the keyboard buffer
fills up and the computer tries to beep or b) sometimes a single keypress 
will cause it to crash.

This is what I have in my (QuickC) interrupt handler:

void _far _interrupt() 
{
   reset_timer();		/* Reset hardware timer for next interrupt */
   clr_int();			/* Clear interrupt request from timer */
   outp(8259control,0x20);	/* Re-enable 8259 for next interrupt? */
   _enable();


   (body of interrupt handler)


}

The interrupt handler takes maybe 1 - 4 milliseconds to complete.
The program works on a 386-33, but neither of the AMI bios 486's
that we have (25,33 mhz).

Here are the things I've tried:

   Removing _enable() will cause the program to crash after a certain amount
   of time. This is possibly due to other interrupts not getting serviced? 
   Refresh?

   Ignoring the keyboard entirely (not fetching any keys) will cause the
   computer to crash when the buffer fills up and beeps.  Quick C says never
   to use INT10 to beep when the video BIOS routines are running, otherwise a 
   crash may occur. My main routine is very video-intensive, but I never TRY
   to make the computer beep.  The interrupt handler does not touch video.

   Hmm, I tried some other things but now I can't remember!

Does anyone know how to disable the keyboard interrupt? I would like to try
to disable it during my interrupt handler. I'll be sure to post a follow-up
if this works!

Thanks in advance for any help you might be able to provide me!!!!

Andrew
(arrgh!)
Technical Details
Message-ID: <sbe4gINN2a9@agate.berkeley.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!crown.berkeley.edu!andywang

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!crown.berkeley.edu!andywang
From: andywang@crown.berkeley.edu (Andrew Wang)
Newsgroups: alt.msdos.programmer
Subject: Keyboard interrupt conflict?
Date: 13 Apr 1992 07:44:16 GMT
Organization: University of California, Berkeley
Lines: 48
Message-ID: <sbe4gINN2a9@agate.berkeley.edu>
NNTP-Posting-Host: crown.berkeley.edu
Keywords: interrupt real time