Hi,
Ready4Dis wrote:
i just disable ints, drop to r-mode, do interrupt, come back to p-mode and re-enable ints...
In general, interrupts should only be disabled for a few instructions. Switching video modes takes ages and you'll have extremely high interrupt latency because interrupts are disabled for far too long. This can cause some major problems for some devices - packets lost for high speed ethernet, missed timer IRQs, missed keypresses causing the keyboard to lock up, etc.
In addition, AFAIK nothing guarantees that the video ROM won't enable interrupts, causing IRQs to be delivered while the CPU is in real mode. There's nothing you can do to prevent this from causing your devices to fail, your OS to crash, etc that doesn't make things worse (e.g. you could mask the IRQs to prevent crashes, etc but then you'd miss IRQs completely instead of postponing them). Most video cards probably don't enable interrupts, but unless you test every video card ever made you can't know that all video cards don't enable interrupts.
Of course there are other problems, like being unable to use this method to support multiple video cards. For virtual80x86 you can map each video card's ROM at 0x000C0000 in different virtual address spaces (and build a fake BDA, IVT, etc for them).
It's a bit like using paint to make your naked body look like it's fully clothed - it works while you're lucky (but let's hope it doesn't rain, and don't ask which pocket the car keys are in)...
Cheers,
Brendan