Quiz9_2020-21

pdf

School

Western University *

*We aren’t endorsed by this school

Course

2208A

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

3

Uploaded by JusticeStar19063

Report
12/22/2020 OWL : COMPSCI 2208A 001 FW20 : Online Tests, Quizzes & Assignments https://owl.uwo.ca/portal/site/7a0fdb29-6a38-4330-adc3-7e8895544a8b/tool/1c394bc0-5806-499f-bc16-119cd7ad58dd/jsf/select/selectIndex 1/3 1.0/ 1.0 Points 1.0/ 1.0 Points 1.0/ 1.0 Points 1.0/ 1.0 Points 4.0/ 4.0 Points Quiz 09 Return to Assessment List Part 1 of 5 - 2.0/ 2.0 Points Question 1 of 7 Write the equivalent translation of STMFD operation using IA, IB, DA, and DB suffixes STMDB Answer Key: STMDB Question 2 of 7 Write the equivalent translation of LDMFA operation using IA, IB, DA, and DB suffixes LDMDA Answer Key: LDMDA Part 2 of 5 - 2.0/ 2.0 Points Question 3 of 7 Write the equivalent translation of LDMDA operation using FD, FA, ED, and EA suffixes LDMFA Answer Key: LDMFA Question 4 of 7 Write the equivalent translation of STMDA operation using FD, FA, ED, and EA suffixes STMED Answer Key: STMED Part 3 of 5 - 4.0/ 4.0 Points Question 5 of 7 What is the reverse assembly of 0xE8071020 machine language instruction? The Op-Code of the instruction is: STMDA The operands of the instruction are: r7, {r5, r12} . COMPSCI 2208A 001 FW20 Online Tests, Quizzes & Assignments Online Tests, Quizzes & Assignments
12/22/2020 OWL : COMPSCI 2208A 001 FW20 : Online Tests, Quizzes & Assignments https://owl.uwo.ca/portal/site/7a0fdb29-6a38-4330-adc3-7e8895544a8b/tool/1c394bc0-5806-499f-bc16-119cd7ad58dd/jsf/select/selectIndex 2/3 8.0/ 8.0 Points 4.0/ 4.0 Points Answer Key: STMDA|STMED, r7, { r5,r12 } | r7, { r12,r5 } Part 4 of 5 - 8.0/ 8.0 Points Question 6 of 7 A ssume that an Empty-Descending (ED) stack is in use, appropriate stack space is already allocated to the stack, and the stack pointer is appropriately initialized . Write ONLY TWO block moves ARM instructions (i.e., LDMxx and STMxx) to copy the content of the registers as shown below using ONLY IA, IB, DA, or DB notation (do not forget to include all operands) . R4 ç R3 R2 ç R1 R6 ç R5 I.e., If R1 = 111, R3 = 333, and R5 = 555, then after executing the two instructions, the values of R1, R3, and R5 will stay as they are while the value of R4 will be 333, the value of R2 will be 111, and the value of R6 will be 555. The Op-Code of the 1st instruction is: STMDA The operands of the 1st instruction are: SP!, {r1, r3, r5} . The Op-Code of the 2nd instruction is: LDMIB The operands of the 2nd instruction are: SP!, {r2, r4, r6} . Answer Key: STMDA , SP!,{R1,R3,R5} | R13!,{R1,R3,R5} | SP!,{R1,R5,R3} | R13!,{R1,R5,R3} | SP!, {R3,R1,R5} | R13!,{R3,R1,R5} | SP!,{R3,R5,R1} | R13!,{R3,R5,R1} | SP!,{R5,R1,R3} | R13!,{R5,R1,R3} | SP!, {R5,R3,R1} | R13!,{R5,R3,R1} , LDMIB , SP!,{R2,R4,R6} | R13!,{R2,R4,R6} | SP!,{R2,R6,R4} | R13!, {R2,R6,R4} | SP!,{R4,R2,R6} | R13!,{R4,R2,R6} | SP!,{R4,R6,R2} | R13!,{R4,R6,R2} | SP!,{R6,R2,R4} | R13!, {R6,R2,R4} | SP!,{R6,R4,R2} | R13!,{R6,R4,R2} Part 5 of 5 - 4.0/ 4.0 Points Question 7 of 7 A ssume that an Empty-Ascending (EA) stack is in use, appropriate stack space is already allocated to the stack, and the stack pointer is appropriately initialized . Write ONLY ONE ARM assembly instruction (at location return ) to return from the function fun1 to the main program using a LDMxx instruction with IA, IB, DA, or DB notation and to correctly update the stack pointer (do not forget to include all operands) . main . . . . . . . . call BL fun1 . . . . . . . .
12/22/2020 OWL : COMPSCI 2208A 001 FW20 : Online Tests, Quizzes & Assignments https://owl.uwo.ca/portal/site/7a0fdb29-6a38-4330-adc3-7e8895544a8b/tool/1c394bc0-5806-499f-bc16-119cd7ad58dd/jsf/select/selectIndex 3/3 fun1 STR R1,[ SP],#4 STR LR,[ SP],#4 . . . . . . . . MUL R14 ,R1,R1 ADD R1 ,R1,R14 . . . . . . . . return The Op-Code of the instruction is: LDMDB The operands of the instruction are: SP!, {r1, PC} Answer Key: LDMDB , SP!, { R1,PC } | R13!, { R1,PC } | SP!, { R1,R15 } | R13!, { R1,R15 } | SP!, { PC,R1 } | R13!, { PC,R1 } | SP!, { R15,R1 } | R13!, { R15,R1 } Gateway Help & Support Western University OWL is the learning management system of Western University. It is a customized version of Sakai. Copyright 2003-2020 The Apereo Foundation. All rights reserved. OWL - OWL - Sakai 11.3-owl6 - Server azuki30
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help