[A89] Re: BCD in sprintf


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

[A89] Re: BCD in sprintf




At 08:31 +0200 2/9/02, Sebastian Reichelt wrote:
>  >    lea     -30(sp),sp
>>      move.w  8(a6),-(sp)
>>      move.l  4(a6),-(sp)
>>      move.l  (a6),-(sp)
>>      pea     DispString(pc)
>>      pea     14(sp)
>>      move.l  sprintf(a5),a4
>>      jsr     (a4)
>>
>>DispString:
>>      .string "r=%f"
>
>This looks correct to me, except that I don't know about ".string"; whether
>it even exists in A68k.  Could you try removing the "%f" in the string,
>just to test the call to sprintf?

it's GNU as syntax. The sprintf works ok.

>  >but it's not working.
>
>What does it do?

in returns "r=0", I tried with the format string "r=%d,%d,%hi" and it 
returned "r=0,19456,3". I know that 19456 is for the 4C00 (the 
exponent of the BCD), but the "3"?...

>Sebastian Reichelt

regards,
ra.-



Follow-Ups: References: