SiliconOS wrote:
I decided to use Pascal and ASM to write this OS.It's GUI-only, so it could more difficult to draw(The HyperDraw) the UI and etc.
There's a
Pascal kernel example in the repo, you can start from there. I've used Lazarus fpc under Linux, but it is said to be working on windows too.
As for the GUI, the loader sets up a linear framebuffer for you, which is technically a pixel buffer, so any library that can use pixels should work without a problem. Otherwise you have to write the code yourself: start with drawing primitives: draw a box, a rectangle, a circle, a line, etc. (Note: the example I've liked provides "Procedure Puts(s : PChar);" to demonstrate how to draw text using PSF2 fonts with Pascal, you can use that). Then build widgets using those: buttons, checkboxes, selectboxes, etc. So far pretty straightforward. Then finally (and this is the hardest) implement a windowing system.
If you would use C, then I would say try
nuklear, or some other simple to port GUI libraries. Not sure about Pascal though, I guess there must be similar projects.
This looks promising because it uses SDL, so should be straightforward to port (SDL window is using exactly the same kind of pixelbuffer like the linear framebuffer).
This might be harder to port, because it seems to have a lot more dependencies, but looks much better.
Cheers,
bzt