Recent

Author Topic: OS kernel can be written in Pascal !!  (Read 2852 times)

Mussel

  • Newbie
  • Posts: 4
OS kernel can be written in Pascal !!
« on: January 07, 2022, 10:45:07 pm »
Well, I have just proved it !!

With reference to https://wiki.osdev.org/Pascal_Bare_Bones, although not 100% following his examples.

Is this a good news?

Thaddy

  • Hero Member
  • *****
  • Posts: 11517
Re: OS kernel can be written in Pascal !!
« Reply #1 on: January 08, 2022, 10:35:33 am »
There are more examples. E.g. for Raspberry Pi there is Ultibo to build kernels and aa long time ago a pascal flavor was used for many micro Os's.
FreePascal has good support for barebone/kernel programming.

It is always nice to write your own OS.  :)
« Last Edit: January 08, 2022, 10:37:23 am by Thaddy »
Путин преступник. Россияне дезинформированы.

PascalDragon

  • Hero Member
  • *****
  • Posts: 4000
  • Compiler Developer
Re: OS kernel can be written in Pascal !!
« Reply #2 on: January 08, 2022, 11:42:58 am »
With reference to https://wiki.osdev.org/Pascal_Bare_Bones, although not 100% following his examples.

That article essentially abuses the Linux target for this. However for barebones development FPC has the Embedded target (most might associate it with micro controllers, but in essence it means “without an OS”).

MarkMLl

  • Hero Member
  • *****
  • Posts: 4156
Re: OS kernel can be written in Pascal !!
« Reply #3 on: January 08, 2022, 01:12:28 pm »
Well, I have just proved it !!

I'd hardly call something which is in effect a "Hello, World!" an operating system, and it includes various assembler etc.

I have managed to write a bare-metal microkernel in Modula-2 (Wirth's next language), which relied heavily on the language's built-in coroutine support to switch between threads. Also it used an external binder to fudge descriptor tables etc.

I'm not sure that it's possible to write a useful OS from scratch in a high-level language unless you either

* Embed processor-specific assembler

or

* Have extensions to the language which might be great from the POV of the OS writer, but are definitely not the sort of thing that you'd allow most application programmers to get their hands on

or

* Have a specialist OS-builder to handle binary generation

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Leledumbo

  • Hero Member
  • *****
  • Posts: 8415
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: OS kernel can be written in Pascal !!
« Reply #4 on: January 08, 2022, 01:34:20 pm »
Is this a good news?
Yes, but you're about 10++ years too late. Feel free to take a look at all previous attempts. I wrote the first entry when I was in college, then I graduated and had no more time to develop. Among all listed, Ultibo to me is the most advanced and featureful. I don't mean to put you down, but take a look at it to see what can be done in Pascal with regard to OS development. It's not the language, it's the programmer, as always. If you go to OSDev forum, there are still people making 16-bit OSes using Turbo Pascal for whatever reason.

Mussel

  • Newbie
  • Posts: 4
Re: OS kernel can be written in Pascal !!
« Reply #5 on: January 10, 2022, 05:23:06 pm »
Thank you Thaddy, PascalDragon and MarkMLI for the insights.

Yes, but you're about 10++ years too late.

Wow, I just found out your are one of maintainer of FPOS on GitHub.
It is certainly encouraging to see what FPOS can do, especially the command prompt!!
I will not copy anything from FPOS.

----

For update on my OSFP, check out github.com/fliermatex/osfp
PS/2 keyboard support has just been added (but without caps lock support).
« Last Edit: January 14, 2022, 05:30:45 pm by Mussel »

 

TinyPortal © 2005-2018