Is there an asynchronous longmove?
Perry
Posts: 253
I one is doing double-buffering how could one implement and an asynchronous longmove in spin/pasm?
like about 480 longs?
like about 480 longs?
DAT org 0 AMOVE cogid me mov tempt,par rdlong source,par add tempt,#4 rdlong destination,par add tempt,#4 rdlong moving,tempt aloop rdlong source,tempt add source,#4 wrlong destination,tempt add destination,#4 djnz moving,tempt cogstop me me res 1 tempt res 1 source res 1 destination res 1 moving res 1
Comments
You could dedicate a cog to moving longs around. It would check some hub locations for source and destination addresses and a count of the longs to be moved. You'd set the count to a non-zero value to start the copy operation and the move cog would zero the count when it was done. That would reduce the latency (for startup) considerably since the move cog would continue running, checking the count regularly.