Use 3 lines of code to implement the required operation of p

Use 3 lines of code to implement the required operation of popping two items.. data s: .word 0, 0, 0, 0, 0, 0. text # --- push $t2\'s value onto stack, and then $t3\'s --- sw $t2, ($sl) sw $t3, 4 ($sl) addi $sl, $sl, 8 #------ use 3 lines here to pop from stack into $t6, then $t7 -------

Solution

In MIPS poping out is simply opposite of push, so the three line code to pop out from stack are below

lw $t2, ($s1)

lw $t3, 4($s1)

subi $s1 , $s1, 8

To Pop from stack to $6, $7

POP $6

POP $7

 Use 3 lines of code to implement the required operation of popping two items.. data s: .word 0, 0, 0, 0, 0, 0. text # --- push $t2\'s value onto stack, and the

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site