Date: Tue, 18 Aug 1998 16:30:18 +0300 (IDT) From: Eli Zaretskii 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.