va_list etc...
Posted: Thu Aug 30, 2001 12:32 am
Hi,
I'm thinking about writing my own OS (to learn more about OS-architecture), and well... I'm stuck... and I'm not even started yet.
I wrote a simple "Hello World !" bootsector (I think everybody tries that sooner or later), and I was thinking : Now I need a printf()-like function so I can display more useful information. I know how to use va_list and va_start in normal C-apps, but in an OS, you have to define those macros yourself.... and that's my problem.
I looked at the stdarg.h file from other Operating Systems (linux 0.1 and Thix 0.3.x), but those macro definitions don't make sense to me... I don't want to "cut & paste" them, because I want to understand the code (instead of just using it).
Do you have any information about what those macros actually do ?? It looks like voodoo to me...
Thnx in advance,
Jeroen Jacobs
I'm thinking about writing my own OS (to learn more about OS-architecture), and well... I'm stuck... and I'm not even started yet.
I wrote a simple "Hello World !" bootsector (I think everybody tries that sooner or later), and I was thinking : Now I need a printf()-like function so I can display more useful information. I know how to use va_list and va_start in normal C-apps, but in an OS, you have to define those macros yourself.... and that's my problem.
I looked at the stdarg.h file from other Operating Systems (linux 0.1 and Thix 0.3.x), but those macro definitions don't make sense to me... I don't want to "cut & paste" them, because I want to understand the code (instead of just using it).
Do you have any information about what those macros actually do ?? It looks like voodoo to me...
Thnx in advance,
Jeroen Jacobs