18Fermer20
ZerosquareLe 10/03/2019 à 18:10
VasiliyFamiliya (./18) :
0331D8: 7200 moveq #$0, D1 ; D1=0 0331DA: 1230 0000 move.b (A0,D0.w), D1 ; D1=($331f4)+D0 (why to zeroize D1 before it?)
move.b only modifies the lowest byte. To use D1 as a word or double-word value, you need to clear the upper bytes manually; that's what the moveq before does.

VasiliyFamiliya (./18) :
add.w D1, D1 add.w D1, D1 ; else (($331f4)+D0)*4 (why so strange way to do it has been selected?)
Because it executes faster than a multiplication or a bit shift.

VasiliyFamiliya (./18) :
(($331f4)+D0)*4
You should not use parentheses both for grouping and for addressing, this is confusing.