Answered step by step
Verified Expert Solution
Question
1 Approved Answer
only using add, sub, addi, sw , lw: help me write this code: a [ k ] = ( * p ) - ( a
only using add, sub, addi, sw lw: help me write this code:
akpak;
# Assume $s a
# Assume $s k
# Assume $s p
add $t$s$s #tk
add $t$t$t #tk
add $t$t$t #tk
add $t$t$t #tk
add $t$t$s #taddress of ak
lw $t$t # t ak
add $t$s$t # t address of ak
sw $t$t #t ak
addi $t$t # t ak
sub $t$s$t # tp ak
sw $t$t #akpak
please let me know if its correct
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started