Re[2]: [cc65] More assignments and typecasting questions

Date view Thread view Subject view

From: groepaz (groepaz_at_gmx.net)
Date: 2002-07-24 17:25:10


Hello Ullrich,

Wednesday, July 24, 2002, 7:56:45 AM, you wrote:


UvB> On Tue, Jul 23, 2002 at 01:07:56PM -0700, Shawn Jefferson wrote:
>> BTW: you really have to pay attention to warnings about functions not being
>> prototyped, as it can really screw the parameter stack!  Just spent about 30
>> minutes trying to debug this function that I threw cgetc() into just for
>> debugging and didn't bother to include conio.h since it was just temporary...
>> big mistake! :)

UvB> You can ignore *some* warnings, but not all. If a function is declared as
UvB> __fastcall__, you cannot call it without a prototype or bad things will
UvB> happen. Other functions should be ok as long as you supply the correct number
UvB> of parameters. Which means, that there shouldn't be problems with cgetc() -
UvB> are you sure about that?

mmmh, i experienced problems aswell although the number of parameters
was ok.... i think that the _size_ of parameters matters at this point
aswell

ie i had a function like

bla(unsigned char p1,unsigned short p2, [more params]);

and if compiled without prototype the generated code would pass "p1"
as a 16bit value, resulting in messed up parameters.


-- 
Best regards,
 groepaz                            mailto:groepaz_at_gmx.net


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


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-07-24 17:25:24 CEST