Re: [cc65] Possible bug?

From: Groepaz <groepaz1gmx.net>
Date: 2004-06-10 01:23:43
On Wednesday 09 June 2004 23:29, Ullrich von Bassewitz wrote:

> 3. Use a do loop:
>
>     #define disable_irq(n)     	\
> 	do { asm ("lda #$80"); asm ("trb $fd01+"#n"*4"); } while (0)

just curious, is there really a difference between

     #define disable_irq(n)     	\
 	do { asm ("lda #$80"); asm ("trb $fd01+"#n"*4"); } while (0)

and

     #define disable_irq(n)     	\
	{ asm ("lda #$80"); asm ("trb $fd01+"#n"*4"); } 

? i've seen the first variant a couple of times now, but always used
the second one without problems ... so is there a reason to prefer the
first? (can you show an example where the second wouldnt work?)

gpz



----------------------------------------------------------------------
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 Jun 10 01:24:06 2004

This archive was generated by hypermail 2.1.8 : 2004-06-10 01:24:14 CEST