On Sun, 26 Apr 1998, Michael White wrote:
> >how to quickly expand a data word into long so that every byte is
> >doubled? I need it for wider picture on higher NOVA resolution.
> >
> >I.e. I need to expand e.g. $1133 into $11113333.
[...]
> In assembly, try this (assuming D0 contains the value and D1 is free):
>
> MOVE D0,D1
> LSL 8,D0
> BFINS D1,D0{0:8}
> LSR 8,D1
> BFINS D1,D0{24:8}
>
> Someone please double check this :).
Looks fine to be, but if he's only doing it once per pixel, then four
move's would probably be faster.
move.w d0,(a0)
move.w d0,2(a0)
move.b (a0),1(a0)
move.b 3(a0),2(a0)
/*
** Jo Even Skarstein
http://www.stud.ntnu.no/~josk/
**
** beer - maria mckee - atari falcon - babylon 5
*/
Received on ma. april 27 1998 - 18:32:00 CEST