Hello everyone! It's been awhile since I am envious of the OSDev community, especially those who know OS development inside-out. Although coming from a third-world country, where almost nobody appreciate low-level programming, I still strive to make my first "Hello, world" OS kernel, written in Pascal!!
You heard it right, with reference to OSDev article itself, although not 100% following its "Pascal bare bones" example, I have it up and running! Plus, I created myself a PS/2 keyboard (8042 controller) routine, and a PCI enumeration routine (because I am planning to add support for USB 1.1 mouse).
As you see from the screenshot, it can accept keyboard input (no caps lock implementation though), and scan all buses for PCI devices.
The following devices were enumerated on QEMU:
* Network controller (Class 02)
* Display controller (Class 03)
* Host Bridge (Class 06)
* ISA Bridge (Class 06 Subclass 01)
As you can see, it is far from completion, even the HID mouse is not detected.
I studied the bootloaders from Redox OS and PeachOS. My first bootloader was simply displaying a "Hi" message using BIOS interrupt in real mode. My second bootloader was better, it loads another sector from disk, but still in real mode.
This is my third attempt, where I can successfully load kernel written in Pascal from assembly.
Code:
global _start
extern kmain
Without "extern" label in NASM, and without linker script, this project won't be possible.