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?
Rather than just one reference, several from http://www.eskimo.com/~scs/C-faq/s3.html seem to apply here, so I'll link the whole lot. I know referencing FAQs is the lazy man's approach, so call me lazy.