Question
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.
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 satisfiedStep 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