FreePascal help

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.
John Goodman

FreePascal help

Post by John Goodman »

Hi, I see there are a lot of FreePascal OS project, and I see that some of forum users have their own FreePascal OS projects. Could anyone tell me where I could find any tutorials or howtos on making an OS in FreePascal.
Kim

Re:FreePascal help

Post by Kim »

If I get some time, I will make a starter package using GRUB as bootloader. With precompiled crossbintools for win32.

EDIT:

You can find it here:
http://users.skynet.be/towp/freepascal_barebone_os.rar
Crazed123

Re:FreePascal help

Post by Crazed123 »

And still nobody knows how to link the thing so we can get some RTL functions compiled in? I've asked on FreePascal forums and haven't gotten a reply for a while.
Crazed123

Re:FreePascal help

Post by Crazed123 »

First of all, never mind the above post.

Second of all, check out this VESA/VBE code for Pascal. Claims to only work for Go32v2, but if we picked it apart we could probably rewrite it to depend on our functions. I'll get on that when it isn't 12:26 on a night when I have to wake up at 6.

[edit]And could somebody set things so Pascal files can be uploaded?
Kim

Re:FreePascal help

Post by Kim »

Because its for Go32 (Dos Extender), they switch to realmode to do bios interrupts... so unless you have code in your kernel to switch to realmode or have v86 you won't be able to port this...
Crazed123

Re:FreePascal help

Post by Crazed123 »

Well the point was that most of us probably will have V86 so...
Crazed123

Re:FreePascal help

Post by Crazed123 »

Using a main program of the begin...end. structure, what's a good method to send the Multiboot number and info struct pointer from the assembler stub to main program?
John Goodman

Re:FreePascal help

Post by John Goodman »

Hey Kim, could you give us a tutorial or something about your barebones os ???
just a stranger

Re:FreePascal help

Post by just a stranger »

Could anyone tell me what needs to be written by me if I wanted to write my kernel in FreePascal. I see you people mention some RTLs...please direct me, I want to learn as much as possible. THANK YOU !!!
Dex4u

Re:FreePascal help

Post by Dex4u »

Here is a full freepascal OS, with code. http://www.mega-tokyo.com/forum/index.p ... 4;start=30
Kim

Re:FreePascal help

Post by Kim »

I forgot to say, if you want to use the bat file to compile, you will need WinXP or some updated Win2000, because it uses some extensions not included in some older windows releases.
About a tutorial, not realy much to tell about, if you want some more basic info check out the nice FAQ on this site or the quicklinkz thread... Check Brandon's tutorial on osdever.net and get the intel docs if you want to add more stuff. Like gdt/idt, timer, etc
Crazed123

Re:FreePascal help

Post by Crazed123 »

Somebody? How to get Multiboot info from assembly stub to Pascal kernel? ???
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:FreePascal help

Post by Pype.Clicker »

Crazed123 wrote: Somebody? How to get Multiboot info from assembly stub to Pascal kernel? ???
Check out freepascal_barebone posted above: it can do it (actually, you just have to push those values in proper order and declare your kernel init function to have them as argument).

that's in .../kernel/kernel.pas, .../kernel/stub.asm and .../kernel/support/multiboot.pas
Crazed123

Re:FreePascal help

Post by Crazed123 »

I saw that, but I'm using a program declared with a begin... end.
Kim

Re:FreePascal help

Post by Kim »

You could use global vars in your asm stub... the easy option would be doing what I am doing.
Post Reply