• Strange warning L16 (LX51)
    Very simple code: #define LEVELS 8 unsigned int code table[LEVELS] = { 1, 8, 27, 64, 125, 216, 343, 512 }; unsigned int get_distance (void) { unsigned char ii; ii = 3; // return table[ii]; /...
  • Avoiding macro using 32 bits shift warning
    Hi, I use below macro #define SFRX(Sfr,Msk) (Sfr=((Sfr & (~ ((Msk)>>8)) ) |(Msk))) to simply both Set and Reset specified bits in some register. If I write SFRX ( MyReg , 0x0100 ) this macro...
  • shift operator
    When compiling with Realview : unsigned long x; x = 1<<31; I get the message: Main.c(121): warning: #61-D: integer operation result is out of range Main.c(121): warning: #68-D: integer...
  • Strange warnings and errors in live syntax check
    I'm getting some really weird errors and warnings in live syntax check (I'm using Keil 4.72a). The most annoying is "pragma once in main file" on every single one of my "#pragma once" though I'm using...
  • shifting arrays
    hi, i'm using uVision3.33 , uC-80c31x2. my question is: I'v initilize buffer array which is been loaded with 24 Byte each interval time. now i want to shift the all array right/left by 1 bit....