Page 1 of 1
OS Dev Library
Posted: Thu Oct 24, 2013 4:19 pm
by kingg
I have made a simple kernel using GRUB as my boot loader and C as my kernel but I have come across some problems. I cannot find a good list of memory locations such as the one in this link
http://www.ousob.com/ng/asm/ng6f862.php; please note that this link is only for assembly and I would prefer something similar for C or C++. Other than that does anyone know a great OS Dev Library; like OpenGL is for graphics. However, this one may come with a few functions that connect to the video card, mouse, keyboard, sound card, etc. Just the basics.
Thanks in advanced King.
Re: OS Dev Library
Posted: Thu Oct 24, 2013 4:35 pm
by Rew
There are not really any "libraries" for OS dev. Libraries usually sit on top of an OS and use the functionality exposed by the kernel to implement higher level logic. When an OS gets to the point of having the required functionality for a library, the library can then be ported to run on the OS. There are several C libraries that have fairly minimal requirements and can be ported with a minimal kernel(minimal here greatly depends on your perspective. It is more quantity of knowledge then quantity of code to get something basic running).
Basically, if you are not interesting in working with the lowest level of the hardware (and spending as much time reading as coding) and building the subsystem to run libraries on, then OS dev may not be for you.
Re: OS Dev Library
Posted: Thu Oct 24, 2013 4:44 pm
by Rew
You may also want to do some research on VBE and INT 10h Bios calls.
the "library" you linked is a reference chart for Bios calls that relate to VESA. At some point (pretty soon) you will want to stop using Bios calls. The interrupt vector functions only support a subset of what the full VBE spec is capable of and also are slower.
Re: OS Dev Library
Posted: Thu Oct 24, 2013 5:18 pm
by sortie
There are no "good memory locations." Indeed, what you actually want to do is enumerate PCI devices and detect the actual GPU devices. You'll then need to write actual GPU drivers. This is a lot of work, but is totally worth it.
Re: OS Dev Library
Posted: Thu Oct 24, 2013 11:40 pm
by bluemoon
kingg wrote:does anyone know a great OS Dev Library; like OpenGL is for graphics.
For things like OpenGL, there are open source implementation that you may port into your OS, some member of this site already done this , look at their screenshot!
You may also want to port the C library (few people would do it from scratch, or even not support it) - common choice are newlib, uclibc, pdlibc, or glibc.
It is also possible to use boost, especially for data structures.
kingg wrote:However, this one may come with a few functions that connect to the video card, mouse, keyboard, sound card, etc.
If you mean driver, you may grab the related data sheet and start coding, you may also examine linux code base, and note the license and messy design.
Re: OS Dev Library
Posted: Fri Oct 25, 2013 8:07 pm
by kingg
Thanks for all of your replies, however, I mean more like a base not a library. Just a really simple kernel that has initialized just the basics and have supplied me with functions such as printf or putpixel etc. If not I will just spend some time writing it myself.