At 12:03 12/29/98 -0700, Dwayne Reid wrote: >The only implementations of circular buffers >that I've seen do NOT overwrite the old values when popping - the pointers >change but the old values remain. This is different from the pic stack >behaviour. actually all circular implementations i know do overwrite (that's why they are circular) -- of course not when popping, but when pushing. how about char stack[N]; char *p = stack; void push(char c) { *p++ = c; // normal push if (p >= stack+N) p=stack; // make it circular } char pop(void) { if (--p < stack) p=stack+N-1; return *p; } ge