Quote:
Originally Posted by 8bitbubsy
Code:
move.l #VolTable_EndA,d0
and.l #~(512-1),d0
move.l d0,a0
lea VolTable_End,a1
move.w #(VOLTAB_LEN/(4*8))-1,d7
.loop move.l -(a1),-(a0)
move.l -(a1),-(a0)
move.l -(a1),-(a0)
move.l -(a1),-(a0)
move.l -(a1),-(a0)
move.l -(a1),-(a0)
move.l -(a1),-(a0)
move.l -(a1),-(a0)
dbra d7,.loop
move.l a0,VolTableAligned
; [...]
CNOP 0,4
VolTable
INCBIN voltableS8.bin
VolTable_End
ds.b 512
VolTable_EndA
Like this? Anyhow, won't this by shifted by 4 bytes because you decrease a0 first before writing to it?
|
It is right
Actually you could also use just
and.w #~(512-1),d0
EDIT:
Or use post-increment that is probably faster (but I've also used A2..)
Code:
move.l #VolTable,d0
movea.l d0,a1
and.w #~(512-1),d0
movea.l d0,a0
movea.l d0,a2
move.w #(VolTable_End-VolTable)/4-1,d0
.cl move.l (a1)+,(a2)+
dbf d0,.cl
...
VolTable_BSS
ds.b 512
VolTable
INCBIN voltableS8.bin
VolTable_End
at end of the copy you have VolTableAligned to CNOP 0,512 in A0