Re: [cc65] Stack problems with several segments.

From: Shawn Jefferson <jefferson_shawn_a8bit1yahoo.com>
Date: 2004-11-17 17:21:20
--- Karri Kaksonen <karri@sipo.fi> wrote:
> When I compare the codes in the working and
> non-working setup I found that
> there is a missing
> 
> ldy #$01
> 
> statement in the non-working version.
> 
> Working:
> 
> lda #$00
> jsr pusha
> ldy #$01
> jsr _check_channels
> 
> Non-working (check_channels is in a different
> segment):
> 
> lda #$00
> jsr pusha
> jsr _check_channels

Where is the y register used even?  Is this compiled
with optimization?  I've seen where unoptimized code
has things like this, but the optimizer takes them out
(registers given values that they don't really need.)

> The check_channels is defined as
> 
> extern void check_channels(unsigned char action);

You aren't using __fastcall__ , or is one side of
things assuming you are (like in your check_channels
code?)  Are you popping the action value off the stack
or getting it from the a register?
 
That's all I could think of from what you've
mentioned.

--
Shawn


		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Nov 17 17:21:26 2004

This archive was generated by hypermail 2.1.8 : 2004-11-17 17:21:36 CET