Page 1 of 1

my first run and some noob Q's

Posted: Wed Oct 05, 2011 5:38 am
by evnix
after spending some time searching on google, i found this site and i was amazed to see how wrong I was about operating systems. #-o
I came to know about some new concepts such as kernels, scheduling etc.

Then with some courage, i thought of following the example program http://wiki.osdev.org/Bare_bones
after nearly 3 hours of fiddling, I got the desired output. I was so happy that i literally danced on my bed. although the ouput was a single character 'A'.

after some more fiddling, i was able to print a given string on the monitor. (I am sure there is a better implementation than my code below)

Code: Select all

unsigned char *videoram = (unsigned char *) 0xb8000;

void wrtie_string(char *str)
{

int i=0;
int j=0;

    for(i=0;str[j]!='\0';i=i+2){
    
        videoram[i]=str[j];
        videoram[i+1]=0x04;
        j++;
    }


}

So the next thing that i wanted to know was how many characters i could print horizontally and vertically. i wanted to know the size of 'videoram'.
so i thought of asking it here in the forum, but i could not even answer the "human or not" question while registering since it asked me a question related to OS. I din't know what to do so i called up some of my friends but none of them could answer. Then google came to the rescue :D
and as you can see i was able to register.

So my question is , how many characters can i print vertically and horizontally, is there any way i could calculate this size?
is there any noob friendly(and probably small) OS source code which i can hack through?

I am not even sure whether the questions i have framed are correct... so please give some advice [-o<

Re: my first run and some noob Q's

Posted: Wed Oct 05, 2011 5:47 am
by Combuster
Then google came to the rescue
That was meant to be a lesson :wink:

To answer your specific questions:
http://wiki.osdev.org/Category:Video and http://wiki.osdev.org/Resources - You may also want to try the forum rules since I have the idea you skipped it.

Re: my first run and some noob Q's

Posted: Wed Oct 05, 2011 7:16 am
by evnix
thanks a lot Combuster. =D>
I must say this site is better than going through Tanenbaums book with a huge pile of minix source code(I was so excited that i bought it today).

I found a lot of examples by exploring your links. i wouldn't find them if i had googled them because i would usually end with results pointing me towards an API(or some libraries for a language) already implemented by some OS.

is there a particular way i should be searching when it comes to searching OS development terms(any keywords that i should include)??

PS:
for anyone who wants some basic kernels(without the feature bloat) being implemented http://files.osdev.org/mirrors/geezer/osd/code/

Re: my first run and some noob Q's

Posted: Wed Oct 05, 2011 7:28 am
by Solar
Actually, and trying not to boast about it,

Code: Select all

keyword keyword site:osdev.org
is usually a good way to go about it. 8)

Re: my first run and some noob Q's

Posted: Wed Oct 05, 2011 10:04 am
by Love4Boobies
Solar wrote:Actually, and trying not to boast about it,

Code: Select all

keyword keyword site:osdev.org
is usually a good way to go about it. 8)
He's talking about Google queries, in case that made no sense :wink:
evnix wrote:I must say this site is better than going through Tanenbaums book with a huge pile of minix source code(I was so excited that i bought it today).
Textbooks will give you the neccessary theory, our wiki takes more of a hands-on approach, but it's no substitute for doing your own research. I suggest you keep at it. Good luck! :)

Re: my first run and some noob Q's

Posted: Wed Oct 05, 2011 2:14 pm
by VolTeK
evnix wrote:after spending some time searching on google
Already have set a milestone for having 2 posts, wanting to osdev, and searching google without being told to.
evnix wrote:I must say this site is better than going through Tanenbaums book with a huge pile of minix source code(I was so excited that i bought it today).
Sometimes your own ideas dont come from other's source code. Concepts build code. Others code examples give you concepts, but in my opinion doesnt make the programmers creativity any better.

Without knowing how something works, building an alternative that works just like it builds creativity and when you do look at the code, you may find that your alternative is faster, or badly designed.


To me, design, creativity, and logic (along with your favorite programming language) is key and the life of a project.