SDP Data
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
I thought about this last night and realized it wasn't as tough as I
originally thought. I came up with a (untested) 20 instruction routine which
does an arbitrary non-overlapping block move, using 32 bytes (8 long word
registers) at a time. 32 bytes is a nice number because if the byte count is in
D0.L, then doing: MOVE.L D0,D1 and then LSR.L #5,D0 to get the # of iterations
for the MOVEM block move (using A0 as source and A1 as dest, use: MOVEM.L
(A0)+,D2-D7/A2-A3 and MOVEM.L D2-D7/A2-A3,(A1)+). Then a simple AND.W #31,D1
will get any leftovers to be moved using D1.W as a counter, if any. I tend to
use MOVE.B's for simple general purpose block moves because (1) the alignment
doesn't then count, and (2) the byte count can be anything from 1 to n. Of
course if you assume word alignment (which the MOVEM must anyway) and an
integral multiple of 2 or 4, then you should of course use MOVE.W's or MOVE.L's
as appropriate. I spent about 3 years hacking 68000's, including Amiga… I
never really needed to get the very fastest speed, so never really investigated
the fastest possible way. (On block moves of memory).