A89: Re: Few Code Questions Plz.


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

A89: Re: Few Code Questions Plz.





-----Original Message-----
From: Niklas Brunlid <e96nbr@efd.lth.se>
To: assembly-89@lists.ticalc.org <assembly-89@lists.ticalc.org>
Date: Tuesday, November 30, 1999 2:10 PM
Subject: A89: Re: Re: Few Code Questions Plz.


>
>void sprintf(char *destinationtext, char *printfstring, [value1,
[value2...]]);
>
>An example in asm:


Hmmm...

what is sp?  I don't understand this... what will this do?  Enable you to
press the arrow key's and the number will change?

exe

right add's +100
left sub's  -100
up +1`
down -1
something like that so i can do the money for DW.  I am not sure how to add
getkeky's and stuff with it also never done this b4  sorry for confusion :
 also what is %d!?


>---------- BEGIN CODE ------------
>...
>  move.w  d0,-(sp)  ;Your value
>  pea  dstruct(pc)     ; Your printf string
>  pea  dstr(pc)
>  jsr    doorsos::sprintf
>  lea   10(sp),sp
>...
>  Code that prints/uses dstr.
>...
>  dstr ds.b 100
>  dstruct  dc.b "The number is %d!",0;
>...
>---------- END CODE ------------
>
>In this example I use an "int" type by putting a "%d" in the printf string.
>Check any good C page on the net for a secription of printf and you'll get
it.
>
> / Niklas Brunlid
>Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
>Random PQF Quote follows:
>
>- "Do you know, humans think the world was made by a sort of big human?"
>- "Get away?"
>- "It took a week."
>- "I expect it had some help, then,' said Dorcas.
>        -- The Nomes discuss religion
>           (Terry Pratchett, Diggers)
>
>
>



Follow-Ups: