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.
Ivan
Post
by Ivan » Mon Jun 23, 2003 6:36 am
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
Pype.Clicker
Member
Posts: 5964 Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:
Post
by Pype.Clicker » Mon Jun 23, 2003 10:00 am
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
Post
by hefeteig » Mon Jun 23, 2003 1:16 pm
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
Post
by Ivan » Mon Jun 23, 2003 1:49 pm
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
Post
by hefeteig » Mon Jun 23, 2003 2:00 pm
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.