Now that sdcc really looks like a compiler (thanks to the latest
contributions of Sandeep, and Kevin for the 390 part), I venture to expose
my %f implementation in vprintf.
It is a crude approach, but since we have no real math support yet (like
log() and sqrt(), :yes I'm working on it) it's a start.
The only hardware I have at the moment is a TINI (ds390) board, so I would
like very much someone else to test it on a generic 51/z80/avr platform
before commiting it to the source tree.
I guess it does need at least a -large-model environment, you don't want
these expensive functions otherwise, do you?
You can get the gnu-zipped tar-ball at http://www.iduna.nl/sdcc/printf.tgz . It
includes an example using a Makefile that overrules some default libfloat
routines needed for this example. Other libfloat patches will follow.
You will have to change the Makefile for your environment. For TINI you will
need to recompile sdcc using the src/ds390/gen.c from the tar-ball with the
"clr c"/"div ab" patch.
Please let me know your findings!