3. After execution of the following instructions, what value will be in register r1? Show your work to receive full grade. (10 points) loop LDR r0, =str MOV r1, #0 LDRB r2, [r0], #1 ADD r1, r1, #1 CMP r2, #0 BNE loop SUB r1, r1, #1 str DCB "X0y2IsDFa",0
Added by Zachary G.
Close
Step 1
LDR r0, =str Show more…
Show all steps
Your feedback will help us improve your experience
Adi S and 96 other Physics 102 Electricity and Magnetism educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
1. Convert the following ARM assembly code into machine language. Write the instructions in hexadecimal -- 20 points. MOV R10, #63488 LSL R9, R7, #7 STR R4, [R11, R8] ASR R6, R7, R3 2. Consider the data-processing instructions with an immediate Src2. a. Which instructions from Problem 1 are in this format? b. Write out the 12-bit immediate field (imm12) of the instructions from part (a), then write them as 32-bit immediates.
Adi S.
Procedure: The objective of this lab is to understand and demonstrate the data-processing assembly instructions that are described in Section 6.3. Write an assembly language program that executes all of the following: Arithmetic Instructions: Source registers R1: 0100 0110 1010 0001 1111 0001 1011 0111 R2: 1111 1111 1111 1111 0000 0000 0000 0000 Assembly code: ADD R3, R1, R2 Result: SUB R4, R1, R2 Result: Logical Instructions: Source registers R1: 0100 0110 1010 0001 1111 0001 1011 0111 R2: 1111 1111 1111 1111 0000 0000 0000 0000 Assembly code: AND R3, R1, R2 R3 ORR R4, R1, R2 R4 EOR R5, R1, R2 R5 BIC R6, R1, R2 R6 MVN R7, R2 R7 Result: Shift Instructions: Source register: R5 1111 1111 0001 1100 0001 0000 1110 0111 Assembly Code: LSL RO, R5, #7 RO LSR R1, R5, #17 R1 ASR R2, R5, #3 R2 ROR R3, R5, #21 R3 Result:
Supreeta N.
Recommended Textbooks
University Physics with Modern Physics
Physics: Principles with Applications
Fundamentals of Physics
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD