Page 1 of 1

kernel print function

Posted: Thu Jul 19, 2001 8:49 am
by shawnd
OK i do not want to involve the GNU libc into this, and looking at sourcefiles from linux and other kernels is difficult b/c they open several other header files, which in turn does the same. its too messy.

I am looking for a printing mechanism to the screen that understands \n , color, scrolling, etc. is there any independent function anywhere?

Shawn

Re: kernel print function

Posted: Thu Jul 19, 2001 10:02 pm
by df
do you want us to write your os for you? You will have to write some of your own code at some point in time....

a text screen driver is pretty basic stuff.

Re: kernel print function

Posted: Mon Jul 23, 2001 3:53 pm
by Chris Giese

Re: kernel print function

Posted: Mon Jul 23, 2001 3:54 pm
by Chris Giese

Re: kernel print function

Posted: Mon Jul 23, 2001 5:44 pm
by BLoggins02
I agree with DF here (though maybe not with his tone), you should be looking for GOOD sample code to emulate, not code you can just copy and paste into your OS. ?Now maybe when it comes time to get an assembler or compiler working, you'd just want to grab GCC and port it, but something like a text driver should be written yourself. ?The more you write, the more you understand. ?

Here's a tip for linux code-browsing, if you go here:

http://lxr.linux.no

You can browse through the linux kernel easily. ?The key here is the version number at the top of the page, click on 1.0.9 (I think). ?Things are MUCH simpler (as in original written by Linus himself 1991 386 code). ?It's kind of fun to look at, he had segment descriptors with 8MB limits (probably b/c that's how much RAM he had and he hadn't implemented demand paging/virtual memory, etc...) ?

Yeah it'll still be confusing (esp the AT&T assembler syntax) but it can be an enlightening experience.

HTH,
Breckin

Re:kernel print function

Posted: Tue Aug 16, 2005 7:27 am
by codemastersnake
Can check out my OS's code... IT has a stdIO.h /stdIO.cpp files which is exactly what you need.... It is independent.....

http://magneto.easyhost4all.info

Re:kernel print function

Posted: Tue Aug 16, 2005 7:33 am
by AR
This thread is 4 years old, if a thread is older than a few months and does not raise any particularly interesting design questions then there is no point resurfacing it - this is just a basic "how do I ..." thread.