Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in ARM assembly language to perform the following task. You have to find certain values in a given 16-bit integer array and

Write a program in ARM assembly language to perform the following task. You have to find certain values in a given 16-bit integer array and once you find them you have to perform a certain operation on those values only and ignore the rest of the values. Fully read the question before starting ... You are given a pointer to an array of 16-bit integer numbers, array_ptr. You are not told the size of the array. But you are told that the array ends when you read a 16-bit integer number with all bits set to 1s (0xFFFF) from the array. array_ptr EQU 0x20003FC0 ; 16-bit integer array location Register assignments: R0 should hold the pointer, array_ptr R1 should hold the value read from the array. R3 can hold the 0xFFFF for comparing with end-of-array marker (You should not need any other registers for this program) When your program reads a value from the array these are the possible actions: 1. If the value you read from array is 0xFFFF, your program is done. 2. If the value you read from array is less than or equal to 0x24, you will add 0xA to the number and store it back to same place in the array. Assume array is in SRAM read/writeable memory. 3. If neither of above is true, ignore the number and read the next number from the array. 4. Continue this till condition in 1. is satisfied.image text in transcribed

Write a program in ARM assembly language to perform the following task. You have to find certain values in a given 16-bit integer array and once you find them you have to perform a certain operation on those values only and ignore the rest of the values. Fully read the question before starting ... You are given a pointer to an array of 16-bit integer numbers, array_ptr. You are not told the size of the array. But you are told that the array ends when you read a 16-bit integer number with all bits set to 1 (s (0xFFFF) from the array. array_ptr EQU 0x20003FC0 ; 16-bit integer array location Register assignments: R0 should hold the pointer, array_ptr R1 should hold the value read from the array. R3 can hold the 0xFFFF for comparing with end-of-array marker (You should not need any other registers for this program) When your program reads a value from the array these are the possible actions: 1. If the value you read from array is 0xFFFF, your program is done. 2. If the value you read from array is less than or equal to 0x24, you will add 0xA to the number and store it back to same place in the array. Assume array is in SRAM read/writeable memory. 3. If neither of above is true, ignore the number and read the next number from the array. 4. Continue this till condition in 1 . is satisfied

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

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

u = 5 j , v = 6 i Find the angle between the vectors.

Answered: 1 week ago

Question

2. Discuss the steps in preparing a manager to go overseas.

Answered: 1 week ago