MOV R1, #6 {Directly move 6 to the register R1}
MOV R2, #5 {Take another register in which directly move 5 into it}
ADD R3, R1, R1 {Value stored in R1 added to R1 again and then stored in R3} Thus, R3 has a value of 12.
SUB R1, R3, R2 {Value of R2 is subtracted from R3and move into the R1}Thus R1 has a value of = R3– R2= 12 – 5 = 7
MUL R3, R1, R1{Multiply R1with R1and store into R3}
Thus, the final execution of this statement will give 49 and R1 contains 7 as value stored in it.
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion