From: Groepaz (groepaz_at_gmx.net)
Date: 2003-02-05 23:15:23
On Wednesday 05 February 2003 22:00, stefan wrote:
> on 06.02.2003 12:00 AM, Groepaz at groepaz_at_gmx.net wrote:
>
> of course, i could pass a pointer, but the reason for doing this with a
> struct, was that i can pass the parameter in a/x using __fastcall__
please think again (and, look at the assembler code generated by the
compiler!). if you want to do a __fastcall__ function, and you wanted to use
a struct, the _ONLY_ way is to use a pointer (at least if the struct has more
than 2 char members). also keep in mind that passing a struct to a function
(which isnt possible with cc65 at all) would actually mean pushing all the
struct members to the argument stack - you can NOT pass a struct in a/x (even
if cc65 would support it) since the actual struct could carry much more data
than a/x could hold. on the other hand, a/x can always hold a pointer to the
struct regardless of its size.
--
___ ___ .___________________ .___________ _______.
c=64 / | \| \__ ___/ \ \_ _____/ \ \ [groepaz]
gb / ' \ | | | / \ / \ | __)_ / | \ gp32
cgb \ . / | | |/ ' \| \/ | \ psx
gba \___|_ /|___| |____|\____|__ /_______ /\____|__ / dc
-----\/-----'---------------\/--------\/---------\/
http://www.hitmen-console.org Hitmen WWW Headquarters
http://fly.to/hitmen-groepaz my personal playground
http://rr.c64.org/silversurfer home of the RR debugger
ftp.musoftware.de/pub/groepaz cc65 dump site
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-02-05 23:13:49 CET