#27 sprintf with floats for z80

closed-out-of-date
Maarten Brock
None
5
2006-12-29
2004-10-10
Wilfried Grueger
No

because the z80-version of the sprintf only supports
sprintf with int-variables I wrote a sprintf-version, which
includes the usual formats like "%3.2f", "%4.4g" and so
on. The program is written completely in C. So it can be
used at any processor. But it doesn't support doubles,
only floats. And it doesn't support "\n" and "\t".

Because it is written in C, it takes some memory.

To make a difference, I named the function as "sprintff
()".

Best regards

Wilfried Grueger

Discussion

  • sprintff

     
    Attachments
  • Maarten Brock
    Maarten Brock
    2006-12-29

    Logged In: YES
    user_id=888171
    Originator: NO

    Wilfried,

    The z80-target can also use printf_large from the libraries. If you recompile it with -D USEFLOAT=1 it supports printing floats. After a small bug fix today it passes the regression tests.

    I hope some people still made good use of your code. I will not integrate it in the SDCC library though in order not to complicate things.

    Thanks,
    Maarten

     
  • Maarten Brock
    Maarten Brock
    2006-12-29

    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-out-of-date