Date: Fri, 14 Jan 2000 23:36:18 +0500 (MVT) From: Prashant TR To: Andrew Jones cc: djgpp AT delorie DOT com Subject: Re: Still problems with protected_mode_int In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.