;Enable KCPSM Interrupt so that the KCPSM Interface can reset the KCPSM ENABLE INTERRUPT ;Check if there is new data packet in memory ;if no data, signal KCPSM Interface that process is done with no write ;if there is data, proceed to process data INIT: INPUT SA,03 ;LOAD M[03] TO SA SUB SA,00 ;COMPARE SA TO 00 JUMP NZ,CHK ;DATA IN MEMORY, PROCEED LOAD SA,00 ;NO DATA, LOAD 00 TO SA, no write, signal done OUTPUT SA,FF ;WRITE 00 TO M[FF], no write, signal done JUMP WAIT ;WAIT ;Assembly code to process data CHK: ;Assembly code goes here ;Signal KCPSM Interface that process is done, and needs to write it out DONE: LOAD SA,FF ;LOAD FF TO SA, signal done OUTPUT SA,FF ;WRITE FF TO M[FF], write, signal done ;Jump to end of program, Suspend KCPSM ADDRESS FE WAIT: JUMP WAIT