Hey, does anyone knows about developing OS in Pascal? Are there any projects with _any_ working kernel, or something, that shows how to prepare Pascal compilers to OSDEV?
Thx
oses in Pascal
RE:oses in Pascal
Well, I guess no. There are serveral points that degree Pascal in OS developing. First, it is a high level language so it is very porable but is quite hard to optimize an application for a certain platform / architecture (OSes usually are handling this issue) and as far as I know there are problems in linking pascal-generated objects into plain binary files (which probably you need). Try to use C & ASM
RE:oses in Pascal
Several systems have been written in Pascal, most notably the UCSD Pascal system; large parts of MacOS were originally in Pascal as well. However, standard Pascal has several faults that limit it, most notably the lack of separate compilation; your compiler would have to support something like the Turbo Pascal 'uses', which is not a standard construct, and would have to allow you to replace the built-in read and write functions (few will, but I believe FreePascal does).
I would suggest looking into Wirth's later languages, notably Modula-2 and Oberon. While I personally find their syntax clumsy, they were designed specifically for systems programming and have precisely the facilities Pascal lacks. and most good Modula-2 compilers (which are hard to find these days, admittedly) will outperform even C for speed and code size on average (while it is less efficient to compile directly, it is far easier to optimize). I would *not* recommend Ada, as it is extremely hairy and would be a pain to move to your system once you have gotten to the point of using it for its own development; however, it is a suitable langauge if you think you can handle it.
Don't listen to those who tell you that C is the only high-level language suitable for systems development; it is, frankly, a bald-faced lie. One of the best operating systems ever, Generra, was written entirely in LISP, and the original Smalltalk-80 system was written in Smalltalk itself (not counting, in both cases, the necessary assembly language support that all OSes require). Java, BLISS, BCPL, PL/M, PL/1 (ugh), and Ada (double ugh) have all been used to write working operating systems in, and, as I've said before, other OSes have inded been written in Pascal variants. If you don't want to stick to what conventional wisdom insists upon, more power to you; for my part, my plans call for a system built in, of all things, a combination of C and E-LISP (ENOS, the Emacs Native Operating System, is one of the intermediate projects I mean to use to test out my ideas with - eventually).
I would suggest looking into Wirth's later languages, notably Modula-2 and Oberon. While I personally find their syntax clumsy, they were designed specifically for systems programming and have precisely the facilities Pascal lacks. and most good Modula-2 compilers (which are hard to find these days, admittedly) will outperform even C for speed and code size on average (while it is less efficient to compile directly, it is far easier to optimize). I would *not* recommend Ada, as it is extremely hairy and would be a pain to move to your system once you have gotten to the point of using it for its own development; however, it is a suitable langauge if you think you can handle it.
Don't listen to those who tell you that C is the only high-level language suitable for systems development; it is, frankly, a bald-faced lie. One of the best operating systems ever, Generra, was written entirely in LISP, and the original Smalltalk-80 system was written in Smalltalk itself (not counting, in both cases, the necessary assembly language support that all OSes require). Java, BLISS, BCPL, PL/M, PL/1 (ugh), and Ada (double ugh) have all been used to write working operating systems in, and, as I've said before, other OSes have inded been written in Pascal variants. If you don't want to stick to what conventional wisdom insists upon, more power to you; for my part, my plans call for a system built in, of all things, a combination of C and E-LISP (ENOS, the Emacs Native Operating System, is one of the intermediate projects I mean to use to test out my ideas with - eventually).
RE:oses in Pascal
Heh... I dont have to degree with anyone if OS can be programmed in Pascal..
RE:oses in Pascal
Well, I think that FPC would be OK. RTLs should be changed, or erased. small loader could jump to the code entry start. anyone have any ideas?/other ideas?
RE:oses in Pascal
is this is your first OS, C or asm is best, there is not much info on Pascal OS's at the time, and there is ALOT of info on C and ASM os's
and as Schol-R-LEA stated, it is a "a bald-faced lie" that C and asm are the only lanuages for an OS, but they are the best
who says "a bald-faced lie" anyway?
and as Schol-R-LEA stated, it is a "a bald-faced lie" that C and asm are the only lanuages for an OS, but they are the best
who says "a bald-faced lie" anyway?