Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assignment 2: Write an assembly program which stores 0x30 in all memory location

ID: 2290813 • Letter: A

Question

Assignment 2: Write an assembly program which stores 0x30 in all memory locations between memory addresses A0 and Al, including A0 and Al. A1 is greater than A0. Assume Al is 0x0000.2020 and A0 is 0x0000.2000. Simulate the program in ARMSim to verify its correctness and do the following: 1. List the complete program in this answer sheet. Make sure you comment each instruction properly 2. Attach the screensho pressing View Memory in ARMSim. You can then type in the address of A0 and view the content of memory locations start from A0. t of your final simulation result. You can open a Memory View window by

Explanation / Answer

In ARM memory address space each sequential address resolve br augmented by 4 in hexa decimal form.

we will store 0x32 number at spot showing in the below mention program.

Mnemonic Operands Comment

MOV r0,#0x32;r0 = 0x32

MOV r1,#0x00002000;r1 = the target address

STR r0,[r1] ;*r1 = r0 means it stores 0x32 at location given in r1 register

MOV r1,#0x00002004 ;r1 = after that sequential target address

STR r0,[r1]

MOV r1,#0x00002008 ;r1 = after that sequential target address

STR r0,[r1]

MOV r1,#0x00002008 ; r1 = after that sequential target address

STR r0,[r1]

MOV r1,#0x00002012 ; r1 = after that sequential target address

STR r0,[r1]

MOV r1,#0x00002016 ; r1 = after that sequential target address

STR r0,[r1]

MOV r1,#0x00002020 ; r1 = after that sequential target address

STR r0,[r1]