Implementing a HLL in an OS

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
thegreatseph
Posts: 12
Joined: Wed Dec 19, 2007 6:40 pm

Implementing a HLL in an OS

Post by thegreatseph »

I have been working on an operating system for a while now, I have a fair amount of the Kernel done and a boot loader finished. The problem is the entire point of the OS is to make an operating system written in pascal and up to this point it is written in 80x86 asm (NASM).

So I need to start either implementing DOS interrupt services in order to use Turbo Pascal 7.0 or Find some Pascal Compiler (preferably as TP as possible in syntax) that does not use DOS interrupt services.

The first option would really mean I need GPL'd code that has DOS compatible services in ASM. I think FreeDOS implements them in C (I think) but there might be some code out there that I don't know about.

as far as the second option I know that plenty of people seem to be using GCC to implement operating systems, and it doesn't seem that they are having to rewrite linux/unix in order to use it, so is it possible to use something like Gnu Pascal to do something similar?
User avatar
astrocrep
Member
Member
Posts: 127
Joined: Sat Apr 21, 2007 7:21 pm

Post by astrocrep »

Welcome to the forum...

I will advise to always search, and check the wiki too...

http://www.osdev.org/wiki/Pascal

Again welcome to the forum and best of luck with your os!

-Rich
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

Here some pointer that may help you, first there is a way to gey TP to use BIOS instead of Dos, for some functions.
Example:

Code: Select all

program PascalOS;
 BEGIN
  WriteLn('Hello world from my OS ');
  Readln; 
END.
The above users Dos int's, but this users BIOS.

Code: Select all

program PascalOS;
uses Crt;

 BEGIN
  WriteLn('Hello world from my OS ');
  Readln; 
END.
You can boot code like this using BootProg a boot loader that loads exe from a floppy or hdd, see here: http://alexfru.chat.ru/epm.html#bootprog

Now for the Dos clone, i written one as a OS tut in asm, it very basic, but it will be simple to understand, it's call MiniDos you can get it here:
http://board.flatassembler.net/topic.php?t=5275&start=0

You can also go here: http://alexfru.narod.ru/emiscdocs.html
under "Pascal Related Docs" get "RTL sources for BP 7.0" these are the asm RTL you can find any that use Dos int's and write a BIOS ver, that what i did, but i have since lost the modded RTL.

Here's my very first attempt at a pascal OS many moons a go :oops:
Attachments

[The extension pas has been deactivated and can no longer be displayed.]

thegreatseph
Posts: 12
Joined: Wed Dec 19, 2007 6:40 pm

Post by thegreatseph »

Thank you this is the type of information I have been looking for. I see now from looking at the RTL source which units I can and cannot use.
Post Reply