Spoz you have the following instructions below. (1) Explain what the instruction
ID: 3852310 • Letter: S
Question
Spoz you have the following instructions below. (1) Explain what the instruction is performing and (2) determine if the instruction is from an ARM assembly program, or from an Intel assembly program. Explain why and what the comparable command would be for the other processor (if the instruction given is for Intel, provide the comparable ARM instruction). Note that each instruction is separate from any other instructions in this problem. a. ADD R2, R2, R1: Adds ___________ and places the result in ___________ The instruction is from (ARM Intel times 86 circle one) The equivalent instruction in (ARM/Intel times 86 circle one) is_____________ J some_subroutine:: _______________ The instruction is from (ARM/Intel times 86 circle one) The equivalent instruction in (ARM/Intel times 86 circle one) is _____________Explanation / Answer
a. ADD R2,R2,R1
This instruction adds the contents of R1 and R2 and the result is stored in R2.
This is an ARM instruction because it has three operands. Intel x86 has two operands only.
Equivalent x86 instruction is ADD AX,BX which adds contents of BX and AX and result is kept in AX. Here AX and BX are two registers of x86 same as R1 and R2 in ARM.
J some_subroutine:
This instruction will jump Unconditionally to the label some_subroutine when executed.
This is also arm instruction only because there is no instruction J in x86 assembly.
The equivalent x86 instruction is JMP some_subroutine.
This is also same as J in ARM.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.