[A89] Re: printf?


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

[A89] Re: printf?




At 14:11 -0700 29/6/02, Joel Thompson wrote:
>Actually, printf is a function in tigcc.a. If you want to use it, 
>just use it like a normal TIOS function (parameters on the stack), 
>and do a bsr printf. So, to print somethig, do:
>
>moveq.w #1,-(a7)
>
>pea.l string(pc)
>
>bsr printf
>
>addq.l #6,a7;clean up the stack
>
>rts;return
>
>string:
>
>  dc.b 'Hello, World!, %i',0
>
>Then, it should display "Hello, World!, 1".  I hope I didn't butcher 
>it too much. I would recommend Kevin's _nostub ASM tutorial at 
>http://members.chello.at/gerhard.kofler/kevin/ti89prog/asmnstb.htm.

thanks!
btw, that's a really great tutorial (I was desperately looking for 
something like that)
regards,
ra.-



Follow-Ups: References: