> Jacqueline is an experimental bootloader written in Pascal (Free Pascal dialect) written for the i386 architecture, just because
Nice to see yet another experiment that isn't always C or C++.
KernelMain(); [public name 'kernelMain']; begin consoleClearDisplay(); consoleSetAttributes(White, Black); consolePutString('Hello world'); end;
Brian Kernighan tried to port his famous software tools (the code to go with the likewise famous book) to Pascal and failed, which led to a write-up, in which he identified 9 shortcomings of Pascal that C doesn't have. https://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pas...
But needless to say, there exist also many strenghs of Pascal over C, which he does not address. I find his claim that Pascal is only a toy language in which serious software can be written unprofessional and empirically untrue: for over a decade, PC software development in Pascal was thriving thanks to TurboPascal. Now admittedly that is not standard ISO Pascal, but at the same time, it is a well-known fact that it existed, and that it fixed some of the criticisms of Kernighan's paper, so it is regrettable he still elected to use such strongly negative language regardless. (And for the record, his paper was written 1981, when Pascal's successor Modula-2 was already available.)
I like C and Pascal, each in their own way, but Pascal is arguably much more readable, and perhaps it is fair to say many Pascal programmers were comfortable in the language and would not have bothered to learn/struggle with C.
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.
If that’s true, then neither was C, Algol, etc. When those languages were conceived, “low-level” programming was just “programming” and “high-level programming” was the exception. Mostly because the hardware ecosystem was far more fragmented and an OS wasn’t guaranteed.
To that effect, all of those languages give you the “features” necessary to “low-level” program, namely: raw pointers and ability to compile for freestanding environments.
phendrenad2•2h ago
andai•1h ago