Page 1 of 1

What to do next? (with OS kernel)

Posted: Mon Nov 04, 2002 4:19 pm
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

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

Posted: Mon Nov 04, 2002 4:21 pm
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. :-\

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

Posted: Mon Nov 04, 2002 5:29 pm
by Tom
could I see the code? (hey, another Tom?)

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

Posted: Mon Nov 04, 2002 7:10 pm
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.

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

Posted: Mon Nov 04, 2002 7:18 pm
by Tom
Duh...didn't see that link...looking at the code

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

Posted: Mon Nov 04, 2002 7:21 pm
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?

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

Posted: Tue Nov 05, 2002 7:59 am
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.