Which of the following instructions load five words from the stack into register
ID: 3349377 • Letter: W
Question
Which of the following instructions load five words from the stack into registers r1-r5? What are the values of the registers r1-r5? (Assuming SP = 0x20008000, and these instriuctions are executed separately)
f the following instructions load five words from the st r5? What are the value of registers ri-r5? (Assumin ords from the stack into registers r1 e instructions are executed separately.) thes (1) LDMDA sp, fr1-r5) (2) LDMDB sp, fr1-r5h (3) LDMIA sp, fr1-r5h (4) LDMIB sp, fr1-r5) (5) LDMDA spl, fr1-r5h (6) LDMDB sp!, fr1-r5) (7) LDMIA sp!, fr1-r5) (8) LDMIB sp!, fr1-r5) Value 0x00000006 0x00000005 0x00000004 0x00000003 0x00000002 0x00000001 0x00000000 0xFFFFFFFF 0xFFFFFFFE OxFFFFFFFD 0xFFFFFFFC 0xFFFFFFFB 0xFFFFFFFA Memory Address| 0x20008008 0x20008004 0x20008000 0x2000800C 0x20008008 0x20008004 0x20008000 0x20007FFC 0x20007FF8 0x20007FF4 0x20007FF0 0x20007FE8 0x20007FE4Explanation / Answer
ANS. 5
As shown in the given table, stack starts from a higher value of address and progresses to lower values further, therefore it's a decreasing stack.
The first value is stored in SP = 0x20008000 itself so DA(Decrement After) suffix will be used as we need the first value of SP also. The correct syntax is when '!' is added.
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.