MASM, JWASM and the strange beast DPMI

Started by Gunther, September 23, 2010, 02:44:29 AM

Previous topic - Next topic

Antariy

Quote from: japheth on September 29, 2010, 09:14:57 AM
Quote from: sinsi on September 29, 2010, 07:41:16 AM
But in that case can't we just do a switch to real mode and then pushf/call far int*4 ?
I guess that won't work. A few interrupt handlers enable interrupts with STI as soon as possible to allow higher interrupts to be handled. At least I found such code in some keyboard interrupt handlers.

Using of 21h port is not gives anything?
I.e., before sinsi's suggestion:

mov al,0FFh
out 21h,al




Alex

japheth

Quote from: Antariy on September 30, 2010, 09:30:03 PM
Using of 21h port is not gives anything?
I.e., before sinsi's suggestion:

mov al,0FFh
out 21h,al


That's also a bit hackish. Some code inside interrupt handlers does not only enable interrupts, but does wait for further interrupts to occur. IIRC the DOS keyboard interrupt handler may enter such a wait loop if it has to modify the keyboard LEDs. Your hack wouldn't work then.

The best and most robust strategy is not to reprogram the PICs.

sinsi

The first instruction in my BIOS's timer interrupt is STI  :lol
The keyboard ISR enables interrupts and sends EOI because it waits for an ACK from the keyboard.
Light travels faster than sound, that's why some people seem bright until you hear them.