GCC 3.4.6
Код
#define F0 5
const int F0BIT = (1<<F0);
uint16_t v;
int main(void)
{
if(v & F0BIT) PORTD = 0; else PORTD = 0xFF;
while(1){};
}
Код
---- main.c ---------------------------------------------------------------------------------------
23: if(v & F0BIT) PORTD = 0; else PORTD = 0xFF;
+00000032: 91800062 LDS R24,0x0062 Load direct from data space
+00000034: 91900063 LDS R25,0x0063 Load direct from data space
+00000036: FF85 SBRS R24,5 Skip if bit in register set
+00000037: C002 RJMP PC+0x0003 Relative jump
+00000038: BA12 OUT 0x12,R1 Out to I/O location
+00000039: C002 RJMP PC+0x0003 Relative jump
+0000003A: EF8F SER R24 Set Register
+0000003B: BB82 OUT 0x12,R24 Out to I/O location
33: while(1){};
+0000003C: CFFF RJMP PC-0x0000 Relative jump
Никто ничего не вычисляет