www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/03/04/21:54:29

From: Charles Sandmann <sandmann AT praline DOT no DOT NeoSoft DOT com>
Subject: Re: Interrupt Handling Issues. ???
To: Matthew DOT Lamari AT jcu DOT edu DOT au (Matthew Lamari)
Date: Sat, 4 Mar 1995 20:02:31 -0600 (CST)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

> crashed occasionally.  I gave this a 'temporary' fix by removing the 
> real-mode interrupts, and hoped to incorporate the code making use of the 
> now protected-mode-only interrupts.  The same went for my keyboard 
> routines, which, to date, are also protected-mode only.  Yet now, with 
> further understanding of how GO32 etc. works, I understand that the CPU 
> also spends some time in REAL mode for certain situations, which would 
> effectively render the Protected mode vector useless for the duration.

This is the case only when running under GO32 without DPMI.  Under DPMI,
ALL hardware interrupts get reflected to PM, even when you may temporarily 
be executing in real mode.  Because of the bugs in GO32 with HW interrupts,
I recommend only hooking HW ints when running under DPMI.  Even under
DPMI this is not a trivial task.  You MUST call the DPMI page locking
services for all code and data pages you will touch from the HW interrupt.
Since none of the current wrappers do this for you, get a copy of the
DPMI spec and read it.  --> ftp.qdeck.com:/pub/memory/dpmispec.zip

If you need help after reading the DPMI specification a few times, 
send me a message.  Using DJGPP and DPMI you can write stable HW interrupt
code under V1.1x, but it does require a bit of work.

BTW, if you have lots of memory and never page fault, you may be able to
skip some of this work on your machine.  But that same code may hang on
a machine with less memory.  And yes, I cheat on programs I know never
will run anywhere but my machine :-)

- Raw text -


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