Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: The objective of this lab is to have the students use the ARM Auto - Indexing to access array elements and to do nested

Objective: The objective of this lab is to have the students use the ARM Auto-Indexing to access array elements and to do nested subroutine calls. Reference text book sections 3.7,3.8 and 3.10. Students will also demonstrate they know how to use the GNU debugger by providing addresses for specific parts of the code.
Write an ARM assembly program that performs the following:
Declare three arrays that will contain integers. Array one will be initialized in the code. The values of array one will be determined by the student.
Array two will be populated with user inputs via the scanf C library function. The reading of these user input values must be performed using a for loop construct and auto-indexing.
Array three will be calculated to be equal to the Array one[i]* Array two[i] and must be performed using a for loop construct and auto-indexing.
The program is to print a welcome message with instructions to the user. The user is to be instructed to enter positive integers.
The array print must be performed by a subroutine and accessed by using the ARM Assembly instruction BL. The starting address of the array to be printed will be provided to the subroutine. The address may be passed via a register or the stack via the PUSH and POP commands. Since this print subroutine is not a leaf routine code must be in place to properly save and restore the link register (r14).
The array size has to be 10 elements.
Integer values should be selected to ensure positive, negative and zero results.
Assume all inputs are valid and no overflow conditions will occur.

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_2

Step: 3

blur-text-image_3

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 Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago