> >To check to see if there's anything in the buffer, compare the input and output pointers. They are the same if the buffer is empty. > >To see if the buffer is full, read the output pointer, add 1 (and if it ran off the end of the buffer, set the result back to the start of the buffer), and compare this result with the input pointer. If they are equal, the buffer is full. when i did this, i found it simpler and faster to maintain a byte count. put incs it, and get dec's it. for fullness, compare to the length of the buffer. >For even more fun, write a dynamic buffer that goes and gets more ram when needed, and releases it when it's not needed. We did this in Turbo Pascal for a system where we needed LOTS of variable sized buffers. that, i've not tried yet. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics