Something
public text v1 · immutable.text
.globl swap
swap:
sll $t1, $a1, 2
add $t1, $a0, $t1
lw $t0, 0($t1)
lw $t2, 4($t1)
sw $t2, 0($t1)
sw $t0, 4($t1)
jr $ra # Return
.globl main
main:
li $a0, 2
li $a1, 3
jal swap
# Print the integer result in a0
li $v0, 1 # Load the system call number
syscall
# Print endl
la $a0, endl # Load the adress of the string
li $v0, 4 # Load the system call number
syscall
# Return.
li $v0, 0 # Load return value in v0
#jr $ra # Return.
.data
endl: .asciiz "\n"
# End of program