Actually with thought it can be made faster because it should be safe to increment four times per call before forcing the wrap around.
read_and_tx_entry () {
if (n_entires != 0) {
serial_tx (buffer[rd_ptr++]);
serial_tx (buffer[rd_ptr++]);
serial_tx (buffer[rd_ptr++]);
serial_tx (buffer[rd_ptr++]) ;
rd_ptr &= 0x00ff;
}
Rob