i am trying to learn assemly lang. This is the first program i am trying to run. the problem i am having is that arr is being loaded and instisd it loads the 1,2 right but then it loads the 12 as a c. then when i add it it addes the letter + the numbers and gives the wrong answer. thank you for any help.
org $10000
clr.l d0 ; i = 0, we use the .l since i takes part in .l calculation
clr.l d3 ; sum = 0 (temporarily sum lives in d3)
move.w n, d1 ; d1 = n
loop cmp.w d1, d0
bge endloop ; if (i >= n) goto endloop
movea.l #arr, a0 ; a0 = &arr[0]
adda.l d0, a0
adda.l d0, a0 ; a0 = &arr[0] + 2 x i
add.w (a0), d3 ; d3 = d3 + arr[i]
addq.w #1, d0 ; i = i + 1
bra loop ; repeat loop
endloop
move.w d3, sum ; write the sum into memory
org $11000
arr dc.w 1, 2, 12, 4, 21
n dc.w 5
sum dc.w 0
P.S i do under stand that the decimal 12 is Hexadecimal C i really need to know how to use the decimal number not the hex