RosettaCodeData/Task/Arrays/68000-Assembly/arrays-4.68000
2023-07-01 13:44:08 -04:00

7 lines
341 B
Text

myArray equ $240000
LEA myArray,A0 ;load the base address of the array into A0
MOVE.W #3,D0 ;load the desired offset into D0
LSL.W #2,D0 ;this array is intended for 32-bit values.
MOVE.L #23,D1 ;load decimal 23 into D1
MOVE.L D1,(A0,D0) ;store #23 into the 3rd slot of the array (arrays are zero-indexed in assembly)