Re: [cc65] assembler/C stack issue

From: Joseph Rose <rose.joseph121yahoo.com>
Date: 2011-02-11 17:15:51
I have a theory as to what's wrong: maybe one of the routines written in 
assembler doesn't operate the stack properly.  I'll check.



----- Original Message ----
From: Groepaz <groepaz1gmx.net>
To: cc651musoftware.de
Sent: Fri, February 4, 2011 11:38:32 AM
Subject: Re: [cc65] assembler/C stack issue

On Freitag 04 Februar 2011, you wrote:
> On Fri, Feb 4, 2011 at 10:19 AM, Joseph Rose <rose.joseph121yahoo.com>wrote:
> > If I create a function in assembler and declare it as __fastcall__, which
> > is
> > responsible for popping the stack: the caller or the callee?  What other
> > stack
> > issues do I have to watch out for?  Examples of needed function
> > declarations
> > follow:
> > 
> > unsigned char __fastcall__ foo1 (char*);
> > void __fastcall__ foo2 (char*, unsigned char);
> 
> I'll give you the same advice that I received the first time I had this
> question.  Write a stub method in C and compile it with the debug option
> turned on using cc65 and then use the resulting .s file as the starting
> point for your assembler functions.

alternativly, just look at the runtime library. there should be more than one 
example that does exactly what you want.

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

IBM is not a necessary evil. IBM is not necessary. 
<Ted Nelson>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo1musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.



      
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Feb 11 17:16:01 2011

This archive was generated by hypermail 2.1.8 : 2011-02-11 17:16:04 CET