Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Arm assembly language 1- Create a new version of l05_t01.s named l05_t02.s that counts the values in the list and displays the count in r4,

Arm assembly language

1- Create a new version of l05_t01.s named l05_t02.s that counts the values in the list and displays the count in r4, and displays the number of bytes in the list in r5.

Can you determine the number of bytes in the list without using the loop?

l05_t01.s:

/* ------------------------------------------------------- list_demo.s A simple list demo program. Traverses all elements of an integer list. R0: temp storage of value in list R2: address of start of list R3: address of end of list ------------------------------------------------------- */ .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 MOV R1, #0 // Initialize sum to zero

Loop: LDR R0, [R2], #4 // Read address with post-increment (R0 = *R2, R2 += 4) ADD R1, R1, R0 // Add value to sum CMP R3, R2 // Compare current address with end of list BNE Loop // If not at end, continue

// Display sum // Add your own code here to display the sum in R1

_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

2- Create a new version of l05_t02.s named l05_t03.s 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.

Note: initialize the minimum and maximum values to the first value in the list. You may assume the list has at least two values.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions

Question

4. How is culture a contested site?

Answered: 1 week ago

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago