Re: [cc65] Macro/asm problem

From: Greg King <gngking1erols.com>
Date: 2004-06-06 10:39:38
From: Shawn Jefferson; on Date: Friday, May 28, 2004, at 10:40 AM

> --- stefan <carlosofcascade@gmx.net> wrote:
> > i would suggest something like this:
> > #define WAITSUSHI  \
> >     do{ \
> >     asm ("bit $fc92"); \
> >     }while(<0); \
>
> The compiler doesn't like the while(<0) line. 
> "Expression expected."

But, he had the right idea:  compare it to zero.

#define WAITSUZY do ; while (*(signed char*)0xfc92 < 0);

The optimizer will produce what you want:

Lxxxx: ldx $fc92
       bmi Lxxxx

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jun 6 11:09:42 2004

This archive was generated by hypermail 2.1.8 : 2004-06-06 11:09:51 CEST