So much fun

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
Martyn

So much fun

Post by Martyn »

Hello all
This stuff is so much fun!
After 6 months of doing the tuts and looking over source code I have made a simple os you know text on screen keyboard input upper case and lower, even got the keyboard lights to work. :D but i cant seem to work out how to get varibels to show up in my printf ("Secs %d ",time) it just prints Secs %d.
Please be gental with me.
Thanks.
HardEnough

Re:So much fun

Post by HardEnough »

check linux 0.0.1 or 1.0 for the unkown paramters
ur printf should be defined as void printf(*fmt, ...);
Warrior

Re:So much fun

Post by Warrior »

It is very fun :). Welcome to the OSDev community dude.

About the printf() thing, Chris Giese has a stripped down printf() on his website http://my.execpc.com/~geezer/osd/design.htm
OZ

Re:So much fun

Post by OZ »

a nice tutorial on howto implement variable sized parameter lists can be found here: http://codezen.org/newviridis/index.php?q=node/25
I'm sorry I can't tell you the name of the guy behind the whitepapers, but he's also in the board.
if you just want to implement simple output of variables - preferable integers you'll need.
  • vaargs
  • a function to convert from int to char*
  • check whether there is a %d inside your output string - then take an int from vaargs list, convert it and insert it
Hope it helps.

btw: if you [the guy behind viridis] maybe read this - where have the other nice papers gone - I think recently there were some more of them?
Martyn

Re:So much fun

Post by Martyn »

Thank for the help but at the moment I think it's a bit over my head, need to take a step back and practice my programing.
Post Reply