I have an example of a barebone OS which you can get here (beware of ads, free hosting ).
http://dbx.orgfree.com/bareos/index.html
I used the code from the OSDev Pascal barebone wiki page, put it in units and done some stuff to get a buildable iso. I've provided a built iso. Read the included bareOS.txt file which explains how to build the code.

Also an interesting example, but way more complex is Free Pascal Operating System. The google code page is a mess, but the OS is quite effective. Seeing as the author(s) did not update in quite some time, I'm not sure if this is going anywhere.

Quote Originally Posted by Ñuño Martínez
First I must say that IMHO C is the best option to code an operating system because it was designed for such work and Pascal is much higher level.
The above examples show that it is possible to do an OS in Pascal. There is no significant advantage of C over Pascal. Both will require the use of some assembly anyway. The higher level thing is wrong, as it is possible to use FPC for programming embedded systems (which btw, is something low level). In Delphi it is also possible, but rather difficult which makes Delphi unsuited for this task. It may be true that C may be better suited (in my opinion not, as it's as easy to do OS development in FPC as it is in C), but if you want to program in Pascal, there is no reason to use C.