I need it in a simple format.

1 answer below »
I need it in a simple format.
Answered Same DayFeb 20, 2020

Answer To: I need it in a simple format.

Saurabh answered on Feb 28 2020
142 Votes
LABEL
    MNEMONIC
    COMMENT
    swap:
    sl1
    $t1.$a1.2
    # reg $t1 = k+4
    
    add
    $t1.$a0.$t1
    # re
g $t1 = v+(k*4)
    
    
    
    # reg t1 has address of v[k]
    
    lw
    $t0.0($t1)
    # reg $t0 (temp) = v[k]
    
    lw
    $t2.4($t1)
    # reg $t2 = v[k+1]
    
    
    
    #refers to next element...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here