printf & scanf

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
Ivan

printf & scanf

Post by Ivan »

can anyone tell me how to make those functions (scanf and printf) for my own kernel, since those in stdio.h can't be used when linking? :)

can anyone send me the code for those functions that works? :)

thanks.


ivan
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:printf & scanf

Post by Pype.Clicker »

hey, dude.

if you're expecting a vanillia printf/scanf to work in your OS environment by just drag'n'dropping, you'll be disappointed.

Even if i have scanf(), it couldn't work without hooking keyboard interrupt, and this will be specific to your OS.

However, you could try something like OSLIB which may contain it, or tiny libc in g00gle (no time to search right now, i have to go) ...
hefeteig

Re:printf & scanf

Post by hefeteig »

I've ported the DJGPP (its GNU) printf to my os.
it works well and it looks like this printf has all the standard fields/flags/.... etc

hefeteig
Ivan

Re:printf & scanf

Post by Ivan »

can you please send me that port?
btw. did you or anyone else by any chance port the scanf function or some similar? i really need it.


ivan
hefeteig

Re:printf & scanf

Post by hefeteig »

tell me an email address and i'll do.
in theory you just have to write a k_putchar() function which is specific to my OS and it "should" work.
Ivan

Re:printf & scanf

Post by Ivan »

here is my mail: [email protected]
thanks.


ivan
Post Reply