delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/14/14:30:00

Date: Fri, 14 Jan 2000 23:36:18 +0500 (MVT)
From: Prashant TR <prashant_tr AT yahoo DOT com>
To: Andrew Jones <xluminous AT hotmail DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Still problems with protected_mode_int
In-Reply-To: <Yylf4.28107$tT2.250319@quark.idirect.com>
Message-ID: <Pine.LNX.4.10.10001142253270.395-100000@yahoo.com>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 13 Jan 2000, Andrew Jones wrote:

> DOS maintains several internal data structures and other things.  Due to the
> nature of DOS, you cannot call a DOS function while another DOS function is
> executing.  Since your ISR is using (at the low level) a DOS function to
> print to the screen, when the timer increments and the ISR is called again
> it leaves the DOS function which you are still in, jumps to the ISR, and
> jumps back to the beginning of the DOS print to screen function.  This is a
> big no-no.

It's a no-no because DOS foolishly overwrites the contents of the stack
that was previously stored (I mean the stack containing the registers that
are to be restored before control is transferred back to the main
program), rather than pushing them in a new location. In short, it isn't
re-entrant.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019