Re:Why MacPaint's Original Canvas was 416 Pixels Wide
by teamonkey on Monday December 30, 2013 @10:37AM
(#6984988)
A fair point, although I think the M68K was fast enough to copy the remaining pixels with a few MOVE.L calls if need be.
[Edit] by which I mean, yes, you're right that the MOVEM can't cross line boundaries in this case, but the CPU should be fast enough to deal with longer lines by using a MOVEM and adding a few extra MOVEs to copy individual longwords. Shorter lines would simply require using fewer registers in the MOVEM.
The screen buffer is 512x384 (24.5 KB, not 10.4 KB), so you have to copy one row at a time. The source and destination pointers have to increment by different amounts after each row (13 and 16 words, respectively). See the following lines in the article's assembly:
screenRow must be defined to 64.