• How to get C51 to generate a DJNZ loop?
    I want a fast and simple delay routine: #pragma OT(8,SPEED) // Switch to speed optimization for this routine void my_delay(BYTE count) { register BYTE i; for (i=count; i; i--); } Is the...
  • How to do more efficiency ?
    Hi,All I try to define the start_address type, //------------------------------------- unsigned char xdata Start_Address _at_ 0x2000; //------------------------------------- and also need to access...
  • For loop
    can i use the for loop like this in accessing the 2-d array. for(u=0;u<=4;u++) { for(v=v1;;) { arr[u][v] += 1; } } bcos in the second for loop i want to do the increment in some other...
  • efficient packing
    First, I am using 7.5 so it is an old compiler, but that is the way it is. I have a number of bit variables that I am trying to pack into a byte. they are scattered all across the bit area volatile...
  • Code efficiancy
    Hi all, My code is based on C and I have a lot of cases where I assign a value to a variable. Is it more efficiency to just place the value or first to check if the variable already has this value? ...