From: SourceForge.net <no...@so...> - 2003-01-24 19:22:00
|
Bugs item #587877, was opened at 2002-07-29 02:54 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=587877&group_id=599 Category: None Group: unreproducable >Status: Closed Resolution: None Priority: 2 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: 32bit return value got stomped! Initial Comment: I compiled the following code under Windows, with SDCC : mcs51 2.3.1-pj3 (Jan 20 2002) (MINGW) command-line parameters: sdcc -D_DEBUG --code-loc 0x2000 --data-loc 0x30 -- xram-loc 0x0000 --stack-after-data --idata-loc 0xE8 --no- peep -ICode --model-large --main-return -c Code/Main/Main.c Don't worry about compile or link errors... all that matters is you get a .rst file from the compile (or reference the included one?) Inside the .rst file, you'll see that at line 211/213, R2 is pushed & popped around a call to STRING_CreateStringInCODE(), and then at 216, is moved from R2 to DPL. This causes the return value from STRING_CreateStringInCODE() to be damaged before being given to SERIAL_Print(), since DPL is part of the 32-bit value which makes up the return- value/parameter. *IF* you define the body of the function STRING_CreateStringInCODE() locally, where it's currently commented out (instead of linking to it in another file, which is what I was doing), then those three evil lines will go away and the code looks like it should work propertly. for more information, contact rog...@sh... -- remove NOSPAM ---------------------------------------------------------------------- Comment By: Johan Knol (johanknol) Date: 2003-01-07 19:04 Message: Logged In: YES user_id=63512 This can't be reproduced in 2.3.2. Can you confirm it still exists? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=587877&group_id=599 |