Bona Fide OS Developer
View unanswered posts | View active topics It is currently Fri Aug 23, 2019 10:50 am



Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2, 3  Next
 Multiple main()s 
Author Message

Joined: Sat Jul 25, 2009 6:10 am
Posts: 112
Location: United Kingdom
Post Re: Multiple main()s
ctimko wrote:
Oh, neato. So then you are just using the loader as the first position on the "primary disk"


My inital loader is in assembly. I plan to use a secondary loader to load other systems later on

Quote:
so no grub.


Of course not - I hate using premade software for my own programs - I made my own bootloader.

_________________
Thanks,
Michael Sammels

OS Developing is 10% luck, 20% skill, 15% concentrated power of will. 5% pleasure, 50% pain, and a 100% reason continue the game.


Sun Oct 18, 2009 1:16 pm
Profile

Joined: Wed Oct 14, 2009 9:39 am
Posts: 198
Location: United States
Post Re: Multiple main()s
nifty. did you follow a tutorial or make it without one... I would like to see that tutorial, or if you could make one, that would be neat.

Charles

_________________
Charles Timko
push %esp ;Musings of a computer addict


Sun Oct 18, 2009 2:14 pm
Profile WWW

Joined: Sat Jul 25, 2009 11:26 am
Posts: 81
Post Re: Multiple main()s
As a clarification, you can't have the same symbol defined twice or you'll get a linker error. Apart from that, you can also have only one entry point (which may or may not be main(), depending on the implementation of the compiler). That's why you can never link two executable object files together.


Mon Oct 19, 2009 4:14 pm
Profile

Joined: Wed Oct 14, 2009 9:39 am
Posts: 198
Location: United States
Post Re: Multiple main()s
+rep (speaking of, we need rep system)

_________________
Charles Timko
push %esp ;Musings of a computer addict


Mon Oct 19, 2009 10:57 pm
Profile WWW
Site Admin

Joined: Sat Jul 25, 2009 7:44 am
Posts: 274
Location: United Kingdom
Post Re: Multiple main()s
I was thinking the same, a rep system would be good :)

_________________
Thank you for reading,

Kieran C G Foot


Tue Oct 20, 2009 2:58 am
Profile WWW

Joined: Sat Jul 25, 2009 11:26 am
Posts: 81
Post Re: Multiple main()s
Michael wrote:
Quote:
so no grub.


Of course not - I hate using premade software for my own programs - I made my own bootloader.


There's something wrong with your judgement here. This is the whole point of open source - people don't need to rewrite the same crap over and over again and can focus on whatever they want to bring new.


Tue Oct 20, 2009 10:58 am
Profile

Joined: Sat Jul 25, 2009 6:10 am
Posts: 112
Location: United Kingdom
Post Re: Multiple main()s
Yes, but I still dislike using Open Source Projects for my Projects.

_________________
Thanks,
Michael Sammels

OS Developing is 10% luck, 20% skill, 15% concentrated power of will. 5% pleasure, 50% pain, and a 100% reason continue the game.


Tue Oct 20, 2009 11:06 am
Profile

Joined: Wed Oct 14, 2009 9:39 am
Posts: 198
Location: United States
Post Re: Multiple main()s
I understand where he is coming from. I decided that I wanted to write my own, for the experience and the learning, but then I realized that it would be a little more work than I should start with. I tried starting with the boot loader, but I really had no idea what was going on, so I picked Grub. I would like to customize it a bit more, but I will worry about it after the kernel is running.

_________________
Charles Timko
push %esp ;Musings of a computer addict


Tue Oct 20, 2009 4:08 pm
Profile WWW

Joined: Sat Jul 25, 2009 11:26 am
Posts: 81
Post Re: Multiple main()s
Well okay, Michael. But you won't get very far. You know how many lines of code real OSes have? You wouldn't have time to code anything serious on your own if you lived 200 years.


Thu Oct 22, 2009 1:59 am
Profile
Site Admin

Joined: Sun Aug 16, 2009 7:28 am
Posts: 60
Location: The Netherlands
Post Re: Multiple main()s
I was running my small kernel with GRUB first. But afer then i wanted my kernel in 3GiB and some other paging stuff, so i made my simple bootloader with elf parser and paging. Most code is seen on the tutorials of Mike (brokenthorn)

// PHPnerd

_________________
Jinix {Operating System}


Thu Oct 22, 2009 4:32 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin and tweaked by the BF Team.