[A89] Re: printf?
[Prev][Next][Index][Thread]
[A89] Re: printf?
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.
---------------------------------
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup
Follow-Ups:
References: