From: Rod B. <rod_boyce@DMCWave.com> - 2000-04-11 23:29:56
|
The only thing I can think of is to try putting an L at the end of the declaration of foo. EG: Unsigned long foo = 0x01234567L; This should tell the compiler that this is a long value. You could also try for debugging making this a const value to see if it has anything to do with pre-initialised variables being copied into RAM. Regards, Rod Boyce PS if this doesn't help send me the map file... -----Original Message----- From: J.J.van der Sande [mailto:vd...@pu...] Sent: Wednesday, 12 April 2000 10:34 To: sdc...@li... Subject: [Sdcc-user] printf() and DJGPP Hi, I'm having some problems with the printf() function: /* This program will print "foo = FE234567" */ #include <stdio.h> #include "serialio.h" void main(void) { unsigned long foo = 0x01234567 ; ser_init() ; printf("foo = %lX\r\n", foo) ; } I'm compiling using the DJGPP version of SDCC 2.1.8Ia with the --model-large and --stack-after-data flags. Any suggestions? By the way, has anyone already build a DOS executable of the new SDCC 2.2.0 version (for example using DJGPP)? I'm aware of the Cygnus version, however, I rather don't use Windows... Regards, Joris van der Sande _______________________________________________ Sdcc-user mailing list Sdc...@li... http://lists.sourceforge.net/mailman/listinfo/sdcc-user |