Array: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) m (→Assembly) |
Puppydrum64 (talk | contribs) m (→Assembly) |
||
Line 54: | Line 54: | ||
MOVE.W #4*5*1,D1 ;five elements per row, so to get the 4th row we multiply the row number by the elements per row, |
MOVE.W #4*5*1,D1 ;five elements per row, so to get the 4th row we multiply the row number by the elements per row, |
||
;times the number of bytes per element |
;times the number of bytes per element |
||
LEA (A0,D1),A0 |
LEA (A0,D1),A0 ;offset A0 by the row number |
||
LEA (2*1,A0),A0 ;column number times the number of bytes per element (the times 1s aren't needed but it's here for clarity) |
LEA (2*1,A0),A0 ;column number times the number of bytes per element (the times 1s aren't needed but it's here for clarity) |
||
MOVE.B (A0),D0 ;load decimal 52 into D0 |
MOVE.B (A0),D0 ;load decimal 52 into D0 |