From: SourceForge.net <no...@so...> - 2003-10-27 00:56:12
|
Bugs item #827117, was opened at 2003-10-20 15:31 Message generated for change (Settings changed) made by epetrich You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=827117&group_id=599 Category: z80 port >Group: unreproducable >Status: Closed >Resolution: Rejected Priority: 5 Submitted By: Philipp Krause (spth) Assigned to: Erik Petrich (epetrich) Summary: problem with passing pointer as parameter Initial Comment: The function call in line 162, calling the function at line 132 doesn't work as expected. The value of t remains unchanged. It seems like the first function parameter is not passed correctly. ---------------------------------------------------------------------- Comment By: Philipp Krause (spth) Date: 2003-10-25 06:59 Message: Logged In: YES user_id=564030 It seems it was a problem with the emulator I use, not sdcc. Sorry. ---------------------------------------------------------------------- Comment By: brian witt (wittb) Date: 2003-10-21 15:25 Message: Logged In: YES user_id=592116 I'm a bozo.... please ignore my comment : 2003-10-21 20:19 (in fact delete it if you can! back to lurking...) lines 1382-83 do indeed store the value. Hmmm... stack corruption, then maybe? ---------------------------------------------------------------------- Comment By: brian witt (wittb) Date: 2003-10-21 15:19 Message: Logged In: YES user_id=592116 WRT Eriks' comment, it appears to be pushing the integer value "t" and not the address of "t" ... The code should: LD HL,#-10 ADD HL, IX PUSH HL to compute the address. I don't see where -10(IX) is being loaded with the address of "t". Lines 1891-92 of assem code read the value from -10(IX) ; not a store. (Feel free to rebuff me ; it's my first comment.) Phillip: before line 162 print "t" and the addr of "t", then in your function print "dest" and see how they relate. *brian ---------------------------------------------------------------------- Comment By: Erik Petrich (epetrich) Date: 2003-10-20 23:17 Message: Logged In: YES user_id=635249 This is a rather complex function, so I could be overlooking something, but I can't seem to find a problem. Local variable t is at offset -8(IX) or equivilently 26(SP), since SP=IX-34 by the function entry code. In line 151, &t is evaluated correctly and a copy of this value is kept in -9(IX) and -10(IX). The value in -9(IX) and -10(IX) is reused when &t is referenced in line 162. Please help point me in the right direction. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=827117&group_id=599 |