2 ms·
> 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
by duskwuff 3y 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.
- matheusmoreira 3y agoI 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.
- duskwuff 3y agoWhat 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.
- snvzz 3y ago>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 https://en.wikipedia.org/wiki/DOS_Protected_Mode_Interface
- duskwuff 3y agoDPMI is a software interface exposed by an operating system or a DOS extender, not part of the BIOS.
- snvzz 3y agoSure, 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.