Comment by duskwuff
2 years ago
> Could be possible to modify lone to run on bare metal instead. Perhaps by replacing the Linux system call code with BIOS I/O functions
Certainly not. Calling BIOS interrupts requires the system to be running in real mode, which is incompatible with running 32-bit code.
>Calling BIOS interrupts requires the system to be running in real mode, which is incompatible with running 32-bit code.
Hold my beer[0].
0. https://en.wikipedia.org/wiki/DOS_Protected_Mode_Interface
DPMI is a software interface exposed by an operating system or a DOS extender, not part of the BIOS.
Sure, but then again, it does prove it is possible.
DPMI provides ability to do both DOS and BIOS calls "in protected mode".
Similar trickery is often used to leverage BIOS drivers on new OSs until adequate native drivers are available.
I see. Could it work in protected mode? The OSDev wiki page I linked uses that approach to write to video memory.
> Assuming that you are in protected mode and not using the BIOS to write text to screen, you will have write directly to "video" memory.
I have pretty superficial knowledge about OS development so I should probably refrain from speculating further.
What the OSDev page is describing here:
>> Assuming that you are in protected mode and not using the BIOS to write text to screen, you will have write directly to "video" memory.
... is bypassing the BIOS and interacting directly with hardware. Which is a thing you can do in some circumstances, but it's very limited -- especially if you want to do anything beyond simple console I/O.