Question: ARM question Using the code from list_demo.s to calculates the minimum and maximum values in the list, and displays them to R6 and R7 respectively.

ARM question

Using the code from list_demo.s to calculates the minimum and maximum values in the list, and displays them to R6 and R7 respectively. Use conditional execution to determine the minimum and maximum values.

list_demo.s:

.org 0x1000 // Start at memory location 1000 .text // Code section .global _start _start: LDR R2, =Data // Store address of start of list LDR R3, =_Data // Store address of end of list Loop: LDR R0, [R2], #4 // Read address with post-increment (R0 = *R2, R2 += 4) CMP R3, R2 // Compare current address with end of list BNE Loop // If not at end, continue _stop: B _stop .data .align Data: .word 4,5,-9,0,3,0,8,-7,12 // The list of data _Data: // End of list address .end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!