Hi Andy,
Andy Green schrieb:
> The code for printf (printf_large.c) is as follows. My question is,
> should the space conditions be '>=' rather than just '>' ? (I did some
Yes, good catch! Could you file a bug report so this is automatically
seen on sdcc-devel?
(if it's too much hassle I'll file a report tomorrow)
Greetings and thanks,
Frieder
> raw byte dumps of a __code U08 *, and the type was 0x80. And with the
> change made, I get the correct output from printf!
>
> Cheers,
> Andy
>
> case 'P':
> PTR = va_arg(ap,ptr_t);
>
> [...]
> #elif defined (SDCC_mcs51)
> {
> unsigned char memtype = value.byte[2];
> if (memtype > 0x80) // <-- should this
> be >= 0x80 ???
> c = 'c';
> else if (memtype > 0x60) // and these?
> c = 'p';
> else if (memtype > 0x40)
> c = 'i';
> else
> c = 'x';
> }
> OUTPUT_CHAR(c, p);
> OUTPUT_CHAR(':', p);
> OUTPUT_CHAR('0', p);
> OUTPUT_CHAR('x', p);
> if ((c != 'I' /* idata */) &&
> (c != 'P' /* pdata */))
> {
> OUTPUT_2DIGITS( value.byte[1] );
> }
> OUTPUT_2DIGITS( value.byte[0] );
> #else
> [...]
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user