[A89] Re: printf?


[Prev][Next][Index][Thread]

[A89] Re: printf?




At 16:09 -0400 29/6/02, Scott Noveck wrote:
>Nope.  TIGCC's implementation is just a wrapper around sprintf and DrawStr.
>Observe:
>
>#define printf_xy(x,y,f...) \
>({char __s[200]; _rom_call(short,(char*,const char*,...),53)(__s ,##f); \
>_rom_call(void,(short,short,const char*,short),1A9)(x,y,__s,4);})
>
>It looks ugly, but what it's really doing is allocating a 200-byte buffer,
>sprintf'ing to that buffer, and then DrawStr'ing the contents of the buffer.
>It's quite simple -- why would you really need a separate printf rom call?
>
>     -Scott

well, I guess that I'll have to write my own macro. I just didn't 
want to reinvent  the wheel.
regards,
ra.-



References: