(Answer all of questions below) 1. Which of the following are advantage of progr
ID: 3801945 • Letter: #
Question
(Answer all of questions below)
1. Which of the following are advantage of programming in assembly language? (Select all that apply.)
easy to learn compared to high-level languages
compact programs
highly portable
fastest code
direct hardware access
2. Which instruction would you use to load register R4 with 20000008 hexadecimal?
LDR R4, #20000008
MOV R4, #0x20000008
LDR R4, =0x20000008
None of the above.
3. Assume that R0 contains the hexadecimal value 20000000. If you want to store the 32 bit value in R5 at the address 20000008, without changing the value in R0, which instruction would you use?
STR R5, [R0]
STR [R0], R5
STR R0, [R5, #8]
MOV [R0], R5, #4
None of the above.
4.If you were translating an if..else statement from pseudocode to ARM assembly language, and the logical operator used in the if was ==, which branch would you use following the CMP instruction?
BEQ
BLO
BGE
BNE
None of the above.
5. If you were translating an if..else statement from pseudocode to ARM assembly language, and the logical operator used in the if is >, which branch would you use following the CMP instruction?
BNE
BEQ
BLO
BLS
BHS
Explanation / Answer
1.Which of the following are advantage of programming in assembly language? (Select all that apply.)
Ans: direct hardware access
2.Which instruction would you use to load register R4 with 20000008 hexadecimal?
Ans: None of the above.
3.Assume that R0 contains the hexadecimal value 20000000. If you want to store the 32 bit value in R5 at the address 20000008, without changing the value in R0, which instruction would you use?
Ans: STR R0, [R5, #8]
4.If you were translating an if..else statement from pseudocode to ARM assembly language, and the logical operator used in the if was ==, which branch would you use following the CMP instruction?
Ans: BNE
5.If you were translating an if..else statement from pseudocode to ARM assembly language, and the logical operator used in the if is >, which branch would you use following the CMP instruction?
Ans: BEQ
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.