Arithmetic and Logic Instructions & Load and Store Instructions (20pts + 40pts)
ID: 3757497 • Letter: A
Question
Arithmetic and Logic Instructions & Load and Store Instructions (20pts + 40pts) 3. For the following data allocation, show how the variables will be mapped in the memory. Assume that the starting address of DATA area is 0x20000000. All the values should be presented in Hexadecimal numbers. Directly fill the memory block below. If you can't understand how the memory block should be filled, refer to pages 3 to 6 of Lecture slide 5. Register File Memory Contents R00x1FFFFFCD RI= 0x00000100 R2- 0x000000B1 R3-0x0000000C R40xFFFFFEF8 R5-0x00000000 R60x20000010 0x200000180xBCDEF012 0x200000140x9A785630 0x200000100xEF05C738 0x2000000C 0x95DE50F0 0x20000008 0x23456789 0x200000040xCDEF0123 0x200000000x89AB1234 Work Result R5 R5- R5 R5- Instruction LDRBR5, [R0, #0x38] LDRH R5, [R6], #8 MOV R5, R4, LSL #8 ADD R5 , R4, R4 , ASR #3 | R5- BFC RO, #24, #8 EOR R5, R4, RO MLA R5, R3, R3, R3 R5 -Explanation / Answer
In the first place R5 loads-the value of R6+ the value of - R3=0*EF05C750..
2ND R5 loads-R0+0*38=0*1FFFFFC51...
3RD R5 LOADS-R6+8=0*EF05C746 ...
IN 4TH we move the value of R4 to R5 with a logical shift of 8=0*FFFFFFF....
In no R5 we have to add R5 ,2 times R4 and 3....
And so on
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.