My first kernel-outputing text problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Bill

My first kernel-outputing text problem

Post 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
Kemp

Re:My first kernel-outputing text problem

Post 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.
Mark

Re:My first kernel-outputing text problem

Post by Mark »

Hi,

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

cheers
Mark
Post Reply