RE: [cc65] Odd problems creating a new target.

From: Shawn Jefferson <sjefferson1shaw.ca>
Date: 2012-06-23 19:57:49
Have you verified that sp actually contains what you think it does?  It
seems to be (based on the mapfile) at zeropage location $00.

 

Doing a bit of googling, and it seems the 65EL02 may have separate stacks
for parameters and for return addresses?

 

 

  _____  

From: owner-cc65@musoftware.de [mailto:owner-cc65@musoftware.de] On Behalf
Of L. Adamson
Sent: Saturday, June 23, 2012 3:22 AM



On Sat, Jun 23, 2012 at 5:05 AM, Oliver Schmidt <ol.sc@web.de> wrote:

I've come upon another head-scratcher, which makes me think I have my C
stack set up wrongly somehow.

 

 I don't think so. I checked that already last time:

 

I presume you already read the (somewhat outdated)
http://www.cc65.org/doc/internal.txt.

 

Yes.  And again, just to be sure. :P

 

I turned off optimizations, just in case, and fixed up a little recursive
test function that should've been pushing a sequence of integers onto the C
stack as it called itself.  I also changed the memory size to A000, just in
case it was upset that the stack was hanging out in the area where the
interrupt vectors usually are.  I mashed the Step key in the emulator with
aplomb, but I did not see any values going onto the C stack, though I /do/
see return the function's return address stacking downwards from 0x02FF,
which seems strange, as I thought the 6502's stack was from $0x100-0x1FF....
The asm looks strange, too, but I think I am too tired to grok it right now.
I reckon I'll dig back into it tomorrow...

 

Thanks again!




----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Jun 23 20:01:30 2012

This archive was generated by hypermail 2.1.8 : 2012-06-23 20:01:34 CEST