2. In class, we saw the set of MIPS instructions for string copy is below start:
ID: 3748670 • Letter: 2
Question
2. In class, we saw the set of MIPS instructions for string copy is below start: addi $sp, $sp,-4 # adjust stack for l item sw $s0, 0($sp) # save $s0 add $s0, $zero, $zero # i-0 Ll : add $t l, $s0. Sal # addr of y[i] in $t1 Ibu $12, 0(Stl ) # $t2-y[i] add $13, $50, $a0 # addr of x[i] in $t3 sb $t2, 0(St3) # x[i] y beq $12, $zero, L2 # exit loop if y[i]-0 addi $s0. Ss0. 1 # i it ! j LI 2: lw $s0, 0($sp) # restore saved $s0 addi $sp, $sp, 4 # pop l item from stack jr Sra # next iteration of loop # and return What would be the ARM version?Explanation / Answer
Answer is as follows :
As we know that ARM based MIPS is working on RISC(Reduced Instruction Set Computer Architecture). So ARM of RISC is used for the such purpose.
First version for this is ARM RISC Machine : ARM2 is used but after it is updated with some features and named Advanced RISC Machines Ltd. — ARM6.
So now for MIPS execution with ARM , ARM6 version is used.
if there is any query please ask in comments....
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.