Jacqueline – A minimal i386 kernel written in Pascal (2019)
13 comments
·October 22, 2025sedatk
I remember writing my own bootloader for my DOS-successor OS project with its own FS when I was 17. Never got around other than running a primitive kernel that just displayed text on the screen though. Fun times! https://gist.github.com/ssg/546634
nn3
Thats the pascal kernel in all its glory. Its just a bare metal hello world
KernelMain(); [public name 'kernelMain']; begin consoleClearDisplay(); consoleSetAttributes(White, Black); consolePutString('Hello world'); end;
james_marks
Love it
> Jacqueline is an experimental bootloader written in Pascal (Free Pascal dialect) written for the i386 architecture, just because
jacquesm
Finally an OS I can really get behind.
phendrenad2
i386 is a great target for toy OSs. There's no risk of getting a bit megalomaniacal and thinking your OS could ever be anything more than a toy. Also, it's more challenging than RISC-V, ARM, and even x86-64, so it feels like more of an accomplishment if you actually make it to userland and back without catastrophic failures.
andai
"doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386" -Linux Torvalds, 1991
pjmlp
Remember kids, there were a few 1980's OSes that made use of Pascal.
Nice to see yet another experiment that isn't always C or C++.
jll29
Mac OS 9 was written in Pascal, and so was the Berkeley P-System, a portable Pascal development environment from the 1970s, featuring a virtual machine that influenced the later JVM. Apple's Lisa OS was also implemented in Pascal.
Rochus
Indeed, e.g. Apple Lisa OS and the first Mac OS. But the present one so far is only around 100 lines; the author calls it a "bootloader". Here is a list of more complete systems: https://wiki.freepascal.org/Operating_Systems_written_in_FPC.
null
HeavyStorm
Pascal? The author must hate himself.
jacquesm
How come? Pascal is a perfectly good language, it wouldn't be my first choice for anything but compared to quite a few other languages from that era it got lots of things right.
Hi, author of Jacqueline here. I read HN almost daily so it caught me off guard to see my stuff here.
It's been a long time since I did this (2019). It was a prototype just to see if a standard PC boot loader could hand-off into something that's not C (or Rust). And yes you can, as long as the programming language has a way to control how symbol names are exported, and then to link the object code with the rest of the boot loader.
You won't have a runtime unless you implement one, so for most languages there is no stdlib, no exception handling, no garbage collector... But it is fun anyway. As I said, this was a prototype and once it could say Hello World I considered it complete.
Happy to see it here though, and I'll be happy to answer any questions about what I remember, or what is like to write code in Pascal, or OS development or i386 in general.