Answered step by step
Verified Expert Solution
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 AutoIndexing to access array elements and to do nested subroutine calls. Reference text book sections and 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 autoindexing.
Array three will be calculated to be equal to the Array onei Array twoi and must be performed using a for loop construct and autoindexing.
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 r
The array size has to be 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started