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

 You are your current self, working on this exam for a

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!