a very, very odd thing.... #define BUFFER_SZ 64 unsigned char sBuf0tail; sBuf0tail = ((sBuf0tail + 1) % BUFFER_SZ); .. this increments a circular buffer index just fine. #define BUFFER_SZ 64 unsigned char sBuf0tail; sBuf0tail = ((sBuf0tail++) % BUFFER_SZ); .. this one never, ever increments. huh? is this some strange quirk of C I have never run into or is this a c51 compiler problem?
"Advanced students can study the rules about 'sequence points' for extra credit." You could start by just putting "sequence point" into the search function on this forum - it's been discussed a number of times before...