FIFO functions are provided in the libraries

LIB/fifo_lib.bas


 
fifo_init initialise a block of RAM for subsequent use as a FIFO.
FIFOs must be initialised before they are used.
BEWARE: FIFOs are initialised by XCSB before use, do not use fifo_init unless you are creating FIFOs yourself dynamically.
fifo_read get the next byte from a FIFO
fifo_write add a byte to a FIFO
fifo_empty check if there is any data available to be read from a FIFO.
fifo_full check if a FIFO can accept any data (if it is full or not).