Page 1 of 1

My first kernel-outputing text problem

Posted: Tue Jul 19, 2005 9:21 am
by Bill
Hello, i have just recently decided to try and make a simple helloworld kernel as a personal accomplishment, and i was wondering in what manner should i ouput the text-my two options are
-Have existing free c libraries (so i can use prinf) ported to my os
-Have my kernel linked to assembly scripts which output the text

Which of the two is the better and more proffesional way-thanks!
Any help is apreciated

Re:My first kernel-outputing text problem

Posted: Tue Jul 19, 2005 9:26 am
by Kemp
Well, the C libraries will usually be linked into user-space programs, so if you're outputting "Hello World" from your kernel it's normal to either have a simple assembly routine to do it, or have a slightly cut-down version of some C library routines (such as printf minus some of the less useful formatting tags, like for floating numbers for example) built in.

Re:My first kernel-outputing text problem

Posted: Tue Jul 19, 2005 10:19 am
by Mark
Hi,

I used the code found in the FAQ for printf. It works well and supports decimal and hex numbers.

cheers
Mark