On Mon, Aug 28, 2006 at 07:32:47PM +0200, Easy B wrote:
> >volatile int i;
> >i=7;
> >stdout=STREAM_USER;
> >printf("%s", i);
> 
> Wont work. But "printf("%c", i); "  results the character with the  
> ASCII code 7. Strings and characters aren't the problem though. As  
> soon as I use something other than "%c/s" my program hangs. It  
> doesn't make a difference if I use int, char or directly the number.

My first guess is that you're overflowing the stack.  Can you make it
bigger and see if that helps?

That was the problem I had with weird behaviour (but not using printf).
I hacked up a script to work out the stack usage so that it wouldn't get
me again.  (http://www.nosreme.org/projects/sdcc-stackusage/, if you
want to give it a go)

Regards,

Chris

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to