What to do next? (with OS kernel)

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
Tomzdrake

What to do next? (with OS kernel)

Post by Tomzdrake »

Hi, I'am begginer in OS making so I have many questions.
I done tutorial from page:
http://www.1cplusplusstreet.com/xq/ASP/ ... owCode.htm

And I done it well. But I don't know what to do next. In kernel_c.c file I put line:
printf("Hello");

It compiled well, but when I used linker:
ld -Ttext 0xFF800000 --oformat binary -o kernel.bin
kernel.o kernel_c.o

...it say's: "kernel_c.o(.text+0x3f):kernel_c.c: undefined reference to '_printf'

What can I do, please help.

PS. Sorry for my english but I'am from Poland, and yet my english isn't good :-X
Tomzdrake

Re:What to do next? (with OS kernel)

Post by Tomzdrake »

Oh, and one more thing... Iheard that I must port something, but I don't know how, so if you could, please help. :-\
Tom

Re:What to do next? (with OS kernel)

Post by Tom »

could I see the code? (hey, another Tom?)
grey wolf

Re:What to do next? (with OS kernel)

Post by grey wolf »

when you're writing a kernel in C, you won't have any of the standard C or C++ functions like printf(), malloc(), free(), etc. you have to implement these functions yourself. i believe there is a good example of a printf() function somewhere on this forum.
Tom

Re:What to do next? (with OS kernel)

Post by Tom »

Duh...didn't see that link...looking at the code
Tom

Re:What to do next? (with OS kernel)

Post by Tom »

try the printf in FritzOS....
and in that link I don't see a def for the printf C code...

are you a experienced(1 1/2 at least) C coder/C++ coder?
Tomzdrake

Re:What to do next? (with OS kernel)

Post by Tomzdrake »

;D I haven't much experience in C programming, but I know Pascal,Basic,PHP, but I can learn C coding too. Anyway, thanks for help.
Post Reply