🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5847

<None>

#5847
From: Alex Andekian
Date: Thu, 18 Apr 1991 00:56
30 lines
2182 bytes
First of all I would like to thank Frank Whaley for his shar file
containing C source to some interrupt-driven serial i/o routines.
It was well written (with plenty of comments), and it finally helped
me overcome my fear of writting interrupt handlers.
Thank you Frank.
It is a professional job and if you want it to be public domain,
I suggest you send it to one of those archive places.

Now for my new question.
I am writing C applications that require collecting data from the serial
port and from an analog to digital converter. I also need to save the
data collected on disk. I have two interrupt handlers that collect the
data while  the main program is busy doing calculations.
So I was wondering if it was possible to save the data to
disk from inside the interrupt handlers. I tried this but the system
hangs up and I have to use the "three finger solution" to get back
control of the PC. Inside the handler, before calling the fprintf and
fflush functions of turboC, I enabled the interrupts of the CPU, and I
tried to fool the Interrupt Controller chip by sending it END OF
INTERRUPT command to make it think that my interrupt handler is finished
and hopefully the DOS stream and disk I/O routines can be invoked. But
it didn't work. I should also mention that I used IRQ7 for my analog to
digital card's interrupts which makes it a lower priority than the disk
I/O interrupts. Can anyone explain why it didn't work?
Shouldn't it be possible to call DOS functions that do stream and low
level I/O from within an interrupt handler? If it's possible, can anyone
please tell me how to do it?

Thank you
~
Technical Details
Message-ID: <1991Apr18.005609.7055@sol.UVic.CA>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!nic.csu.net!beach.csulb.edu!csus.edu!decwrl!wuarchive!rice!uw-beaver!ubc-cs!news.UVic.CA!sirius!andekian

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!nic.csu.net!beach.csulb.edu!csus.edu!decwrl!wuarchive!rice!uw-beaver!ubc-cs!news.UVic.CA!sirius!andekian
From: andekian@sirius.UVic.CA (Alex  Andekian)
Newsgroups: comp.os.msdos.programmer
Subject: <None>
Message-ID: <1991Apr18.005609.7055@sol.UVic.CA>
Date: 18 Apr 91 00:56:09 GMT
Sender: news@sol.UVic.CA
Reply-To: andekian@sirius.UVic.CA (Alex  Andekian)
Organization: University of Victoria, Victoria, BC, Canada
Lines: 30
Nntp-Posting-Host: edwin.uvic.ca