Question: for the following question I cant figured a solution need some help. (ARM simulator must be used) Question: Take the array program given above, and
Step Over Step Out Shit F2 Step Into F2 Continue 3 Stop F4 Restart Ctrl-R Reload Ctrl-Shift- File Help Ctrl-F2 untitled. [changed since save) (changed Editor (Ctrl-E) Compile and Load (F5) Language: Nios II 1 global _start 2 start: 3 // array initialization 4 .text 5 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 QOS06.0.0.0 Call stack it Trace Watchpoints it Symbols 6 LDR R1,=array // get address of array 7 LDR R2,=1 // initialize R1 to 1 8 LDR R3,20 // initialize R3 to 20 9 loop: 10 11 STRB R2,[R1,#0] / STR?B store "byte! 12 ADD R2, R2,1 W Add to R2 13 ADD R1, R1,1 // Add to Ri 14 CMP R2,R3 // compare R2 and R3 15 BNE loop // loop while not equal (R2 and R3) 16 nop // no instruction 17 //initialise array memory 18 .data 19 20 value: .byte 1 21 array: .skip 20 // Reserve 2e consecutive bytes of memory 22 // (declare empty block of memory) 23 Olay Options decimal per row: 4 Editor (Ctrl-E) >Disassembly (Ctrl-D) Q Memory (Ctrl-M) Step Over Step Out Shit F2 Step Into F2 Continue 3 Stop F4 Restart Ctrl-R Reload Ctrl-Shift- File Help Ctrl-F2 untitled. [changed since save) (changed Editor (Ctrl-E) Compile and Load (F5) Language: Nios II 1 global _start 2 start: 3 // array initialization 4 .text 5 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 QOS06.0.0.0 Call stack it Trace Watchpoints it Symbols 6 LDR R1,=array // get address of array 7 LDR R2,=1 // initialize R1 to 1 8 LDR R3,20 // initialize R3 to 20 9 loop: 10 11 STRB R2,[R1,#0] / STR?B store "byte! 12 ADD R2, R2,1 W Add to R2 13 ADD R1, R1,1 // Add to Ri 14 CMP R2,R3 // compare R2 and R3 15 BNE loop // loop while not equal (R2 and R3) 16 nop // no instruction 17 //initialise array memory 18 .data 19 20 value: .byte 1 21 array: .skip 20 // Reserve 2e consecutive bytes of memory 22 // (declare empty block of memory) 23 Olay Options decimal per row: 4 Editor (Ctrl-E) >Disassembly (Ctrl-D) Q Memory (Ctrl-M)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
