I am new in os developement.

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
facada
Posts: 2
Joined: Wed Jan 16, 2008 4:38 am

I am new in os developement.

Post by facada »

Hi! Everyone I am new in os development & writting my first kernel in c (Platform=XP) that is basically a "helo world" kernel.My queries are!
-------------------------------------------------------------------------------
1> which compiler,assembler,linker should i use?
2> I use Grub as bootloader.Later i want to write my own bootloader...Is
there any tutorial making a bootloader.
3> I want to make my kernel to take a input string and display it to screen.
how do i do this?
4> Is there any way to test my kernel from harddisk of my current os.
I use Virtual PC for testing.I just dont want to write a floppy.
5> If you have such a kernel please give me as an example.
6> Further advices are appreciated.THANK YOU!
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Welcome,

I expect that you didn't read the FAQ thread as 5 of the 6 questions have either been answered or are trivial to answer.

1: see the wiki, [wiki]Category:Compilers[/wiki], [wiki]Category:Linkers[/wiki], Tool Comparison
2: see wiki
3: see wiki
4: use a floppy image instead
5: see wiki
6: the main advice is that you please use google before asking.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

a "helo world" kernel
1: spell hello world correctly in your kernel... YES IT MAKES A DIFFERENCE! :lol:
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Post by neon »

1> which compiler,assembler,linker should i use?
This is debatable. Assuming you are using C++, some members use GCC with LD. Some also use Cygwin's GCC port with LD. You can also use DJGPP, or Microsoft Visual C++. ...There are other options as well.
2> I use Grub as bootloader.Later i want to write my own bootloader...Is
there any tutorial making a bootloader.
I can probably point you here as it covers creating a small 2 stage bootloader that boots a 32 bit kernel.
3> I want to make my kernel to take a input string and display it to screen.
how do i do this?
This depends on several factors. You can use the BIOS when in real mode, or develop a basic keyboard driver and video driver to render text in protected mode... dont worry about this yet until you get a basic bootloader up for now.

4> Is there any way to test my kernel from harddisk of my current os.
I use Virtual PC for testing.I just dont want to write a floppy.
Of course! I never used GRUB, so dont know how with it (I believe it does support hdd booting)
5> If you have such a kernel please give me as an example
I can post a basic example here, but a) Im on a laptop with no mouse at work..Ugh! ..And b) There is no need to--There are already alot of good examples avialble. Check out some of the previus links posted.
6> Further advices are appreciated.THANK YOU!
Just two:

1) OS Development is NOT easy. Dont expect to create anything big for a long time.
2) Good luck and try not to quit! Take it one step at a time, and never rush.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
facada
Posts: 2
Joined: Wed Jan 16, 2008 4:38 am

Post by facada »

Thank you neon.Your suggestions are helpful...Thank to Combuster too,there are really great TUTORIAL for beginer specially the babystep series in wiki section.
User avatar
naiksidd_85
Member
Member
Posts: 76
Joined: Thu Jan 17, 2008 1:15 am

USE Nasm thats what am using

Post by naiksidd_85 »

hi,

you can write your boot loader in NASM and use Nasm compilre to compile it.
I have done the same thing.
try to switch over to the protected mode and execute your kernel .
i can send you the boot loader..
see if its usefull.
try these
Attachments
boot3.asm
(1.38 KiB) Downloaded 23 times
newBootSect.asm.txt
(5.35 KiB) Downloaded 53 times
Learning a lot these days THANKS to OSdev users
Post Reply