🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #6832

Re: Programming problem - DOS function calls

#6832
From: bill
Date: Tue, 10 Jun 1986 14:31
26 lines
1810 bytes
(I hope you like getting mail.  You'll probably get a lot for this one.)

Performing I/O via system services (either BIOS or DOS) from within an
interrupt service routine is almost always a no-no.  The "cleanest" way, from
an interrupt standpoint, to do screen I/O while servicing an interrupt
is probably to go straight to display memory, bypassing DOS.  I wouldn't
expect Int 21h functions to work; DOS functions are generally *not* reentrant.
As I understand it, when Int 21h is invoked, DOS makes attempts to keep the
interrupt system *active* as much as possible while processing the request;
I believe it also switches to a different stack.  The jist of this is that,
if the system is inside of an Int 21h function, then you interrupt it and
re-enter Int 21h again, you get screwed.

You might be able to use certain BIOS calls.  Int 10h video I/O might work
if you're careful.  Watch out, though -- it, too, re-enables interrupts
right off the bat.  It's entirely possible for you to interrupt Int 10h,
which may or may not (most likely, may not) be reentrant, depending on which
subfunction is interrupted.

Rule of thumb: if you're going to field hardware interrupts and insist on
performing I/O while inside the ISR, plan on doing all your I/O at the
lowest level (direct to hardware).

bill frolik
hp-pcd!bill
Technical Details
Message-ID: <13600012@hpcvla>
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!caip!nike!cad!ucbvax!hplabs!hpcea!hp-pcd!hpcvla!bill
References: <1662@homxb>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!caip!nike!cad!ucbvax!hplabs!hpcea!hp-pcd!hpcvla!bill
From: bill@hpcvla
Newsgroups: net.micro.pc
Subject: Re: Programming problem - DOS function calls
Message-ID: <13600012@hpcvla>
Date: Tue, 10-Jun-86 10:31:00 EDT
Article-I.D.: hpcvla.13600012
Posted: Tue Jun 10 10:31:00 1986
Date-Received: Sat, 14-Jun-86 05:13:54 EDT
References: <1662@homxb>
Lines: 26