• if condition
    Hello, I was compiling my firmware program written in C using Keil microVision2 V2.4 compiler. The target is c8051F120 microcontroller. I noticed that the compiler accepted the following: if...
  • problem while giving input to 8051
    I have use following code for 8051 by NXP(p89v51rd2) #include<reg51.h> #define p2 P2 sfr P1=0x90; sbit led1=p2^0; sbit s=P1^0; void main() { s=1; while(1) { if(s==0) { led1=1; } else {...
  • assembler conditional
    00DE 18 IXLENGTH equ 222; 19 20 21 $IF ((LOW IXLENGTH) = 0 ) 0000 7E00 22 mov r6,#HIGH IXLENGTH 23 $ELSE mov r6,#((HIGH IXLENGTH) +1) $ENDIF 26 27 0100 28 XLENGTH equ 256; 29 30 31...
  • "conditional source"
    cross posted at 8052.com I have a module, which is used in four different products, that has way too many #ifdef's to be readable in debug and, at the same time, there is so much common code that making...
  • Conditional Compile
    I am using version 6.0 with a GNU makefile. I have conditional code (both *.C and *.A51)I want to enable/disable through the make file on the command line. I am using the #ifdef DEBUG #endif // for...