OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 6:19 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: does anyone have an OS skeleton?
PostPosted: Thu Mar 21, 2002 8:58 am 
I'm learning C and learning to make an OS, but I'm finding it hard to learn due to C tutorials and info being hard to find. I'm also getting frustrated with all the libraries that are required, I read a lot of the posts and tried to accomplish them but my knowledge is very limited of C. I've managed to get a procedure called kprinf which is the nearest I can find to printf.
Does anyone have a skeleton of an OS which I can use to learn from the routines and the way in which eveything is initilized. I'm confused about the "IDT,GDT" thing, I've not found any info about it/them.
Ive also read the FAQ on this site and several other sources of information.

any info would be grately apreciated


Top
  
 
 Post subject: Re: does anyone have an OS skeleton?
PostPosted: Thu Mar 21, 2002 9:18 am 
OS kernel skeleton? Check out the new Downloads section at  Bona Fide OS Development:
http://surf.to/osdev

Finding little info about C? Try:
http://www.cprogramming.com

If you're looking for a book, then I highly recommend C by Example from QUE.

IDT and GDT. First, get the Intel 386 Programmer's Reference Manual:
http://www.execpc.com/~geezer/os/index.htm

Basically, you have 1 GDT and 1 IDT. The GDT holds several descriptors and the IDT holds addresses that point to Interrupt Service Routines(ISR).

Hopefully that helps,
K.J.


Top
  
 
 Post subject: Re: does anyone have an OS skeleton?
PostPosted: Thu Mar 21, 2002 12:01 pm 
Thanks for the links, I'll have a propper read later.
however the link to your site redirected twice and couldnt find index.htm, so i just knocked off the index.htm bit from the url in the address bar. I downloaded kernel1.zip, kernel2.zip, and kernel3.zip which dont compile properly for some reason.
kernel.c give this error:
[glow=red,2,300]c:/djgpp/bin/ld.exe: warning: cannot find entry symbol start; defaulting to ff800000[/glow]
kernel2.c and kernel3.c give the same errors:
[glow=red,2,300]k_entry.asm:8: parser: instruction expected
k_entry.asm:25: symbol `gdt' redefined
k_entry.asm:42: invalid operand type
k_entry.asm:50: invalid operand type
k_entry.asm:60: operand 1: expression is not simple or relocatable[/glow]
I got the latest DJGPP and NASM/W and I used the kernbuild.bat to compile it.
Maybe you've encountered this problem?


Top
  
 
 Post subject: Re: does anyone have an OS skeleton?
PostPosted: Thu Mar 21, 2002 1:14 pm 
The first error that you report:
c:/djgpp/bin/ld.exe: warning: cannot find entry symbol start; defaulting to ff800000

isn't an error. The kernel compiles fine even though the compiler says this(try making gcc/djgpp output to the AOUT format instead of the default COFF).

Oops, those next errors are just mistakes that I made,
k_entry.asm:8: parser: instruction expected
change gdt [gdt_ptr] to lgdt [gdt_ptr]

Just do that and it should fix all of these errors:
k_entry.asm:25: symbol `gdt' redefined
k_entry.asm:42: invalid operand type
k_entry.asm:50: invalid operand type
k_entry.asm:60: operand 1: expression is not simple or relocatable


K.J.


Top
  
 
 Post subject: Re: does anyone have an OS skeleton?
PostPosted: Thu Mar 21, 2002 1:18 pm 
Or you can go a download the ZIP files again(I just updated them) :)

Thanks for pointing out the error,
K.J.


Top
  
 
 Post subject: Re: does anyone have an OS skeleton?
PostPosted: Sat Mar 30, 2002 8:26 am 
your links seem to no longer work.


Top
  
 
 Post subject: Re: does anyone have an OS skeleton?
PostPosted: Sat Mar 30, 2002 12:15 pm 
I know. My web host is switching to a different server right now.

If you want the ZIP file, just email me at [email protected] and I'll send it to you(and anyone else who wants it as well).

K.J.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 153 guests


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group