Page 1 of 1
Coupel question on OS Development
Posted: Tue Aug 07, 2007 9:17 am
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.
Posted: Tue Aug 07, 2007 10:13 am
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
Posted: Tue Aug 07, 2007 11:30 am
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.
Thanks guys
Posted: Tue Aug 07, 2007 12:52 pm
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
Posted: Tue Aug 07, 2007 1:05 pm
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.
Re: Thanks guys
Posted: Tue Aug 07, 2007 2:09 pm
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 Evil :twisted:](./images/smilies/icon_twisted.gif)
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.)
Posted: Tue Aug 07, 2007 2:48 pm
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.
Posted: Wed Aug 08, 2007 1:46 pm
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
![Cool 8)](./images/smilies/icon_cool.gif)
int's.
Posted: Wed Aug 08, 2007 2:07 pm
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.
Posted: Wed Aug 08, 2007 2:08 pm
by inflater
@dex: Or direct video RAM access if directvideo = true (default)
![Wink ;)](./images/smilies/icon_wink.gif)
- 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
![Smile :)](./images/smilies/icon_smile.gif)
)
inflater