Using only BLX instructions to call the next three subroutines based on the prev
ID: 3690741 • Letter: U
Question
Using only BLX instructions to call the next three subroutines based on the previous compare instructions (which we will assume has been done and not needed to be written). Then write the three branch and link from registers instruction to do: If result of comparison is Negative then branch and link to what R1 points? if result of comparison is Positive then branch and link to what R 2 points to? If result of comparison is Zero then branch and link to what R3 points to? Also in advance R1, R2, abd R3 must be loaded with Sub1, Sub2 and Sub3 labels? Your program should not exceed 6 instruction in total?This is not a subroutine but rather a main programExplanation / Answer
CMP r0, #0
BLXEQ Sub3
CMP r0, #0
BLXGE Sub2
BLXLE Sub1
Sub1:R1
Sub2: R2
Sub3: R3
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.