🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ISR writes to disk. Tips needed.

#6679
From: D. Curtis Deno
Date: Thu, 16 May 1991 00:32
33 lines
2327 bytes
I am about to embark on a programming effort to permit background
data collection on 286 and above MSDOS machines.  My program should
service a hardware timer interrupt every, say, 1-100 seconds and
collect some data from an A/D board and a counter.  The possibly
tricky part comes when I wish to write this recent data to a disk
file.  The reason this can potentially cause trouble is that the
main program, which runs in the foreground, can shell to DOS and
the user must be able to run an editor, copy, and delete files at
will.  I am concerned DOS will get confused if it is in the middle
of writing some sectors from the DOS shell application at the same
time the interrupt service routine wishes to write some other
sectors.

I have experience writing hardware ISRs and have done hardware timer
interrupt controlled data acquisition to RAM succesfully in the
past.  By saving the state of the numeric coprocessor at the top
of the ISR I have even done floating point computations in both the
ISR and main program/DOS shell application.

A related issue is that of streaming data to disk with double/ring
buffering.  I am concerned that techniques that work here need not
work under the conditions described above.  Do I need to look into
storing/saving copies of DOS's disk transfer area when I interrupt
a procedure in progress?  Tips and pointers to vocabulary,
discussions, or example code are all welcome.

Post replies to the newsgroup, if you feel appropriate, or email
directly to me at dcdeno@united.berkeley.edu.  I will summarize
to the net a  successful approach, when I understand it and have
tested one.  Thanks.

-- Curt Deno
dcdeno@united.berkeley.edu
Technical Details
Message-ID: <42177@ucbvax.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!panisse.berkeley.edu!dcdeno
References: <13073@monu1.cc.monash.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!panisse.berkeley.edu!dcdeno
From: dcdeno@panisse.berkeley.edu (D. Curtis Deno)
Newsgroups: comp.os.msdos.programmer
Subject: ISR writes to disk. Tips needed.
Keywords: ISR interrupt disk BIOS multitask
Message-ID: <42177@ucbvax.BERKELEY.EDU>
Date: 16 May 91 00:32:57 GMT
References: <13073@monu1.cc.monash.oz>
Sender: nobody@ucbvax.BERKELEY.EDU
Reply-To: dcdeno@panisse.berkeley.edu (D. Curtis Deno)
Followup-To: comp.os.msdos.programmer
Organization: EECS Dept, UC Berkeley
Lines: 33