
Two basic PMode questions
Quote:
> I've only just started to code a little in on my own pmode server
> and I've got a few basic questions:
> 1. To call a realmode interrupt, do I have to enter realmode,
> restore IDT, stack and all that?For 286 systems, yes. For i386+ systems you can simulate the interrupt
using a V86 task. This way to stay in protected mode.
Quote:
> 2. The IRQs generated. If I want to redirect them to their realmode
> handlers. Do I have to enter realmode then?Same answer as for 1.
> I've been looking on some pmode-server code. The documentation
> says the IRQs are refirected to their default RM handlers but
> I can't see that the CPU-mode is changed in the code...If you like, I can send my own protected mode header (D32). It uses
a V86 task (actually it 'morphs' your task to a V86 task) to simulate
the interrupt. For this you have to set up a V86 stack frame, a V86
stack (the real mode stack) and set the virtual mode bit in the EFLAGS.
Herman