delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/18/09:31:04

Date: Tue, 18 Aug 1998 16:30:18 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: russell DOT thamm AT dsto DOT defence DOT gov DOT au
cc: djgpp AT delorie DOT com
Subject: Re: Realtime & DJGPP
In-Reply-To: <6r8bu2$ce9$1@nnrp1.dejanews.com>
Message-ID: <Pine.SUN.3.91.980818162454.12510i-100000@is>
MIME-Version: 1.0

On Mon, 17 Aug 1998 russell DOT thamm AT dsto DOT defence DOT gov DOT au wrote:

> I would like to implement pre-emptive scheduling, but it appears
> that real-mode is going to be a major problem.
> Ideally, I would like to prevent the timer interrupt from occuring
> while the processor is in real-mode.

If you never let your program to call DOS or BIOS services, the processor 
will never switch to real mode, and you will have no problem to achieve 
this.

If not, I don't think you can.  Disabling the timer tick for prolonged 
periods of time can have bad consequences.

> the timer interrupt still goes off in real mode. On the other hand, if
> I redirect the output of my program to a file  (xxx > xxx.lis), the
> timer interrupt does NOT appear to go off in real-mode. wierd huh.

I think this is an illusion.  Redirecting stdout makes it fully buffered, 
so for small amounts of output, the 16KB buffer holds all the output, and 
the program doesn't really call DOS untill it exits, at which time the 
buffer is flushed.  Even if it does call DOS, it does so many more times 
when the output goes to the screen as opposed to a file.

- Raw text -


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