Re: [cc65] calling an asm .proc from C with arguments

From: Groepaz <groepaz1gmx.net>
Date: 2009-02-19 10:22:33
On Mittwoch 18 Februar 2009, Tachdaun wrote:
> I'm re-writing my library in asm, but still want to link it from C code.
> So I would like to know how to access the arguments from within the asm
> .proc
>
> I think this may be target-specific, as in nes.cfg says:
> "# $0500-$0800 3 pages for cc65 parameter stack"
>
> I've seen from generated asm code, that cc65 uses some routines such as
> "pushax", but I don't yet totaly understand it.
> any help would be appreciated.

look at the sourcecode of the runtime library, and also at the code which the 
compiler generates from your library. it should be fairly easy to understand 
the calling conventions then.

-- 

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

Perhaps there should be a new 'quantum' datatype; you would be able to take 
its address or value, but not both simultaneously. 
<Michael Shields>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Feb 19 10:22:32 2009

This archive was generated by hypermail 2.1.8 : 2009-02-19 10:22:34 CET