Date: Wed, 11 Mar 92 08:35:04 EST From: DJ Delorie To: g8468891 AT rick DOT cs DOT ubc DOT ca Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Protected mode interrupt handler Status: O >I am asking this question for a friend who doesn't have net access. >He needs to write a protected mode interrupt handler to handle >hardware interrupts in DJGPP, but does not know how to start. - - - General information about interrupts and go32 - - - While running go32, the CPU is constantly (sort of) switching between real and protected mode. Each of these modes has it's own interrupt table, and interrupts can happen in either mode. Thus, even if you set up a handler in protected mode, you might get the interrupt in real mode, and your handler would not see it at all. Until proper support for protected mode interrupt handlers (aka signals) is implemented, the only recourse is to modify go32 to add an interrupt handler for that particular interrupt and fake out a protected mode interrupt by munging the 32-bit stack and EIP register, simulating the interrupt. An alternative is to use only a real mode handler to handle the interrupt, and use the protected mode code to deal with the data itself. Not as elegant, but also workable. DJ dj AT ctron DOT com Life is a banana.