[Prev][Next][Index][Thread]
Re: I big question
> The OSKit works in protected mode. You cannot execute realmode
> code without any tricks, and the BIOS works in realmode. No
> modern OS uses the BIOS, so you had better not either :)
>
> If you're really desparate, you could try to install some
> VM86 mode code in order to execute realmode stuff. However,
> this is really not worth the effort, IMO. The OSKit has
> a pretty complete set of drivers that'll replace the BIOS,
> and will be at least 10x as fast for a PM OS than using
> the BIOS (am I exaggerating here ? don't think so.)
> If you need an example of V86 anyway, there's one at
> http://www.erols.com/johnfine/ (AVIX.ZIP or something like
> that. It's not for the OSKit though.)
This is all true. However, if you are looking to use the BIOS only in a
very restricted environment (i.e. when you can afford to switch to real
mode and back), such as for a few queries or magic actions in your bootup
sequence before you start your real device drivers, then that is more doable.
The headers <oskit/x86/i16.h> and <oskit/x86/pc/*i16*.h> contains some
macros for switching into 16-bit real mode and doing simple BIOS or DOS
calls. These are likely to work basically only if you have a very minimal
base oskit environment set up, have not initialized any real oskit device
drivers yet, etc. I'm not sure this stuff has been used or tested much or
at all in quite some time, so what you see is what you get. Expect some
finickiness in assembling/linking the 16-bit code if you don't have exactly
the right gcc and binutils (and I'm not sure off hand which ones those are :-).
References: