Answered step by step
Verified Expert Solution
Question
1 Approved Answer
11. You are your current self, working on this exam for a microprocessors class and are being asked to write a procedure for a halfword
11. You are your current self, working on this exam for a microprocessors class and are being asked to write a procedure for a halfword calculator. There is a label in the .data section called PTRPTR. This address holds another address which does not have a label, but that doesn't matter. Read the data from this second address and do two things. First, extract the upper and lower halfwords and compare them. If the upper half word (bits 31 to 16) is larger, then the procedure should return 1. If the lower halfword is larger, then the procedure should return O. If they are equal, the procedure should sum together all the bytes in both halfwords and return the sum. You must use R4 as a destination register at some point in your procedure. This memory system has little endian organization. Write an algorithm and the ARM code to perform this task. 11. You are your current self, working on this exam for a microprocessors class and are being asked to write a procedure for a halfword calculator. There is a label in the .data section called PTRPTR. This address holds another address which does not have a label, but that doesn't matter. Read the data from this second address and do two things. First, extract the upper and lower halfwords and compare them. If the upper half word (bits 31 to 16) is larger, then the procedure should return 1. If the lower halfword is larger, then the procedure should return O. If they are equal, the procedure should sum together all the bytes in both halfwords and return the sum. You must use R4 as a destination register at some point in your procedure. This memory system has little endian organization. Write an algorithm and the ARM code to perform this task
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