Write an assembly program which stores 0 times 30 in all mem
Solution
In ARM memory address space every sequential address will be increased by 4 in hexadecimal form. So we will store 0x32 number at locations showing in the below mentined program.
Mnemonic Operands Comment
MOV r0, #0x32 ; r0 = 0x32
MOV r1, #0x00002000 ; r1 = the target address
STR r0, [r1] ; *r1 = r0 means it store 0x32 at location given to adress given in r1 register
MOV r1, #0x00002004 ; r1 = next sequential target address
STR r0, [r1]
MOV r1, #0x00002008 ; r1 = next sequential target address
STR r0, [r1]
MOV r1, #0x00002012 ; r1 = next sequential target address
STR r0, [r1]
MOV r1, #0x00002016 ; r1 = next sequential target address
STR r0, [r1]
MOV r1, #0x00002020 ; r1 = next sequential target address
STR r0, [r1]
