Once you have your data in the buffer you can write out a number of characters at a time with the
write()
function, as described
here[
^]. You just need to write the first block from the buffer, then the 8 new characters, and lastly the second block from the buffer.