That code is writing to a Microchip MCP4922 DAC on the SPI bus.
SP_INT_FLAG VAR PIR1.3 which is SSP1IF indicating the SPI write was completed by the micro.
I suppose it could be an infinite loop if the micro fails to write to the SPI bus, but unlikely.
Bookmarks