actually this code is correct !0x02 -> 0 while ~0x02 -> 0xFD in the C language ! is a logical not and ~ is a bitwise not.
-Chris Takahashi -----Original Message----- From: Ricardo Wiggers [mailto:rwigg...@floripa.com.br] Sent: Monday, August 04, 2003 2:55 PM To: mspgcc-users@lists.sourceforge.net Subject: [Mspgcc-users] Possible bug or poor optimisation? Hi! I think both of the lines below should create the same code, but it's not what can I'm seing. Below is an extract of a .lst file. It's compiled with the win build 20030506. and compiler options "-mmcu=msp430x1232 -O2 -Wall -g" Thanks, Ricardo. U0IFG &= (!0x02);//UTXIFG0; e402: 5f 42 03 00 mov.b &0x0003,r15 ;0x0003 e406: c2 43 03 00 mov.b #0, &0x0003 ;r3 As==00 U0IFG &= 0xFD; e3ea: e2 c3 03 00 bic.b #2, &0x0003 ;r3 As==10 ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users