Coupel question on OS Development

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
KingTomato
Posts: 9
Joined: Sun Aug 05, 2007 12:58 am
Location: Arkansas

Coupel question on OS Development

Post by KingTomato »

Hey yall, I'm seth. I'm new here and new to OS Development. I've been messing with Windows for about 10 years and Linux for about 3. I program in vb6, vb.net and perl, and used to mess around with Pascal.

I have a couple questions because I have recently gotten interested in OS Dev. I know Pascal and heard that I could make an OS with that but C or C++ would be better. So my questions are How can I get started making an OS with Pascal, Can I use the Linux Kernel, and then build my own shell on top of it with Pascal, What tools do I need for Development under Windows, or Linux. I haven't decided on a development environment yet. Probably Linux but I've changed my mind about things before.

This isn't one of those "this OS will replace windows and linux." Since I'm a programmer i like a challenge, and I think this would be a good one. Like I said all I know really is how to program in Pascal, I don't know Assembly and I'm still learnign C.

I would like to use the Linux Kernel, and then build my own features with Pascal, but I have no idea what I need to link them, or compile the linux kernel, and make it boot or nothing. So if yall can help me out with any of these areas I would be enternally greatful. Thanks

Also, I tend to get excited when I start talking about something I want to do, and my fingers move faster then my brain, so excuse my typos.
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

Well i cant help you with the pascal issues... but to compile and run the linux kernel you will need to use GCC (as its written in c) to compile the C and then ld as a linker.

This dumps it into the format you specify. You can then create a .img or .iso using various programs: e.g

MagicISO
VFD

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

Post by Dex »

Here is a freepascal OS http://www.dex4u.com/demos/AnonymOS.zip
Also inflater's old OS was written with turbo pascal.

But if you think the linux route will be easier think again.
KingTomato
Posts: 9
Joined: Sun Aug 05, 2007 12:58 am
Location: Arkansas

Thanks guys

Post by KingTomato »

Hey yall, thanks for the replies. I have a book I'm reading called Operatign Systems Concepts and Design, by Milan Milenkovic, I bought it about two years ago when I was 16. Although it was old then, and it old now do you think this would be a good beginning developers book?

luken_95, thanks for the info on how I could compile and the linker. Dex thanks for the link.

Thanks for yall's help so far, and please if you know pascal, please tell me if tha is a good choice?

Thanks again
User avatar
jerryleecooper
Member
Member
Posts: 233
Joined: Mon Aug 06, 2007 6:32 pm
Location: Canada

Post by jerryleecooper »

The first macintosh operating system was written in pascal and assembly, it was based on lisa. There's not a lot of difference between pascal and c. I know that from the code I transcrived from pascal to c in my Inside Macintosh books (2 books) when i was younger. Pascal is a very capable language, and I don't see reasons for you not to make an OS in it.
You need to know your compiler.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Re: Thanks guys

Post by Alboin »

KingTomato wrote:Hey yall, thanks for the replies. I have a book I'm reading called Operatign Systems Concepts and Design, by Milan Milenkovic, I bought it about two years ago when I was 16. Although it was old then, and it old now do you think this would be a good beginning developers book?
If it's in good condition, I would sell it. :twisted: In all seriousness, I've never heard of the book myself, and I've gone through a few of them.
KingTomato wrote: Thanks for yall's help so far, and please if you know pascal, please tell me if tha is a good choice?

Thanks again
I should say that the language is irrelevant. As long as you like it, all is well. (Standing that it compiles to a feasible point.)
C8H10N4O2 | #446691 | Trust the nodes.
KingTomato
Posts: 9
Joined: Sun Aug 05, 2007 12:58 am
Location: Arkansas

Post by KingTomato »

Hey thanks again yall for the posts and thoughts. The compiler I'm using Dev-Pascal, but I think I've heard some good thigns about Turbo Pascal, so I might give it a try. That link, Dex gave me when I looked at it, I was a bit scared, lol. But I've waned to build an OS for a couple years, and I think I'm ready thanks again.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

I started by writing a pascal OS many moons ago, in turbo pascal.
You need to start with the basics, try a simple Hello world! and than go from there.

Example
Step 1. Get "bootprog" (it a bootloader that can load com or exe from a floppy or Hdd) see here: http://alexfru.chat.ru/epm.html#bootprog

Step 2. Next using turbo pascal do this:

Code: Select all

program Hello World OS;

uses
  Crt;

begin
  WriteLn('Hello World')
  Readln;
end.

Step 3. Compile it, put it on the bootprog floppy ( name it the same as the name that bootprog looks for )

Step 4. Reboot if all goes well, you are on the rocky path to making your own OS.

PS: Note the "uses Crt;" you need this, as it makes turbo pascal used bios instead of Dos 8) int's.
KingTomato
Posts: 9
Joined: Sun Aug 05, 2007 12:58 am
Location: Arkansas

Post by KingTomato »

Thanks again Dex, I know the basic of Pascal. I just been reading my book to get refreshed it's been about 3 years of so since I touched Pascal. Thanks for the link.
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post by inflater »

@dex: Or direct video RAM access if directvideo = true (default) ;) - applies for WriteLn, Window, Gotoxy, .. etc. :)

KingTomato, my OS was written in pascal and its abanonded so I can send you the source. PM me if you want (its a mess, but if you do pascal good, you may sucsess :))

inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
Post Reply