I know this may sound like a stupid question but exactly why are software ints disabled in protected mode, every doc ive read just say "you cant use software interrupts" but none of them have told me why exactly
could anyone tell me why
why are software ints disabled?(in pmode)
Re: why are software ints disabled?(in pmode)
One big issue would be segmentation, as the bios code in the software ints expects it to work like in real mode.
Worse might be the different meaning of opcodes in 32 bit mode then in 16 bit mode.
Worse might be the different meaning of opcodes in 32 bit mode then in 16 bit mode.
*post*
Re: why are software ints disabled?(in pmode)
If you want to use Bios(16bit) Ints with a 32bit os then you have 3 ways:
1.Use them befor jmp32 (boot)
2.Use them after jmp16 (reboot/halt)
3.Use them with v86 mode
1.Use them befor jmp32 (boot)
2.Use them after jmp16 (reboot/halt)
3.Use them with v86 mode
dw 0xAA55
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: why are software ints disabled?(in pmode)
Software interrupts are NOT disabled when you're in pmode. Software interrupts != BIOS. Beyond that, the BIOS isn't disabled when you're in pmode either. Feel free to call it, but the box will reset.
Software interrupts are enabled, as always, be sti... whether you're in pmode or not. The only difference is that, while in pmode, each interrupt is described by a descriptor in the IDT... when in real mode, the interrupt is described by an offset in the IDT.
As per the BIOS, yes, it's not usable in pmode. It's not designed to work in PMODE. But, as per your question, software interrupts are only disabled by a 'cli' (whether in pmode or rmode) so if interrutps are disabled... you must have disabled them.
Software interrupts are enabled, as always, be sti... whether you're in pmode or not. The only difference is that, while in pmode, each interrupt is described by a descriptor in the IDT... when in real mode, the interrupt is described by an offset in the IDT.
As per the BIOS, yes, it's not usable in pmode. It's not designed to work in PMODE. But, as per your question, software interrupts are only disabled by a 'cli' (whether in pmode or rmode) so if interrutps are disabled... you must have disabled them.