Question: PART I Write an RV 3 2 - I assembly program using RARS simulator to: Declare an array of fifteen integers. The array elements must
PART I
Write an RVI assembly program using RARS simulator to: Declare an array of fifteen integers. The array elements must be in the following order: two numbers in decimal, xADDxxFFFFbit systembit system
Implement two subroutines to store only positive even numbers in memory location x and onward:
One with Packed Mixed Bit Widths or Compressed Storage: Pack data using a mix of bit widths based on the actual bit values.
Another one Sparse storage: Assume you dont have to store the values in consecutive memory addresses even if they all have fixed bit representation or otherwise.
Return to the main program, count the positive, negative, and zero numbers in the array, and display the count in memory locations xx and x
PART II
Suggest ways to improve all your programs using optimization techniques.
Improve your program with the suggested optimization techniques and
To verify the assembly program output, write a corresponding C program to implement all of the above Assuming each Assembly code line uses one CPU clock cycle, and each memory address occupies bits; compare the time and memory complexity of various storage methods without any optimization. Compare the time and memory complexity of various storage algorithms with optimization. Confirm your guess with C programs by using time function timeh header as well as memory usage using functions like mallinfo in malloch to retrieve memory allocation information.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
