I have made a very basic boot loader based on MikeOS boot loader ( Link ). I'm using NASM and QEMU for assembling and testing. And I'm trying to enable protected mode for my OS. So, I started searching web for more details and to know more about BIOS interrupts. I came across wikipedia and read an article....
Many modern operating systems (such as Linux and newer versions of Windows) bypass the built-in BIOS interrupt communication system altogether, preferring to use their own software to control the attached hardware directly. The original reason for this was primarily that these operating systems run the processor in protected mode, whereas calling BIOS requires switching to real mode and back again, and switching to real mode is slow. However, there are also serious security reasons not to switch to real mode, and the BIOS code has limitations both in functionality and speed ( Source: wikipedia ( Link ) )
The article in wikipedia says that
.....primarily that these operating systems run the processor in protected mode, whereas calling BIOS requires switching to real mode and back again, and switching to real mode is slow......
( Source: wikipedia ( Link ) )
According to what I understood, it is not much advisable to use much BIOS interrupts for all procedures in protected mode, am I right ? If I'm right, then my boot loader also uses many BIOS interrupts to print characters on screen... Is it good or bad ? If it's bad, why ? and what changes do I need to make to create a print character procedure ?
As I want to make my OS for protected mode, I am confused whether I should use BIOS interrupts or not ? Currently I have made a boot loader only which prints string on the screen, currently I don't have any another functions in my bootloader which uses any BIOS interrupts. If it is not good to use BIOS interrupts for protected mode, what should I do for print string function when I load my kernel in protected mode ( when I make it :p ) ?
Also,
Many modern operating systems (such as Linux and newer versions of Windows) bypass the built-in BIOS interrupt communication system altogether, preferring to use their own software to control the attached hardware directly. ( Source: wikipedia ( Link ) )
How are those developers able to develop those software ? Are those softwares made in Assembly or any other language ? Does they require deep hardware-software knowledge ? If its possible to make those softwares in my OS then I am thinking to add those.... Is it advisable to do so, or should I use BIOS interrupts only ?
gcc -c -Os, and disassemble it into a NASM function with Agner Fog'sobjconvdisassembler. agner.org/optimize/#objconv - Peter Cordes