Date: Sun, 3 Mar 1996 10:02:01 +0200 (IST) From: Eli Zaretskii To: Martynas Kunigelis Cc: DJGPP mailing list Subject: Re: HW interrupts In-Reply-To: <199603011224.HAA08125@delorie.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 1 Mar 1996, Martynas Kunigelis wrote: > Shame on me, but read the FAQ section on hw int handling only after posting > the above zip to DJ. And one thing confused me, so here's my question: > if I hook the protected mode herdware interrupt and *don't* chain, what will > happen if the interrupt happens while CPU is in real mode (e.g. reading from > HD) ? I thought if I hook the PM int 9 and don't chain, the keyboard is mine > *forever*. So how would it be? It *is* yours forever. Under DPMI, the hw interrupts are always passed to PM handler first, and only if unhandled, the RM handler is called. That means that if the interrupt happens while the processor is in real mode, it switches to protected mode, calls the PM handler, then switches back to real mode and returns to whatever it was doing. For what I know, the FAQ says this explicitly. If it isn't clear enough, please tell me and I'll change the wording.