A video explanation of the code can be found at: https://youtu.be/fzhhhUzdHOk To use this either download the .asm file and launch a new project in MPLAb v8.xx or clone as a zip and launch 'circularbuffer.mcp' in MPLABv8.xx