puts function help

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
dozerl
Posts: 19
Joined: Tue May 10, 2005 11:00 pm
Location: here

puts function help

Post by dozerl »

I have my putch function working correlty. It will output the character i want it to. I have it set up like this:
void putch(unsigned char c)

But when I run my puts function and compile it, the kernel.bin file is not a binary file. When I open it up it just has in it what ever text I passed to puts(). Here is my puts function:

void puts(char *text)
{
int i;

for (i = 0; text != '\0'; i++){
putch(text);
}
}

I don't beleive I'm doing anything wrong, but it doesn't want to work. If you guys need some more of my code to look at to fix the problem just let me know.

Thanks.
Post Reply