Solution:
addi $t0, $0, 1 # case a="1<"/FONT>
addi $t1, $0, 2 # case a="2<"/FONT>
addi $t2, $0, -1 # case a="-1<"/FONT>
bne $s0, $t0, L2 # handle case 1
add $s1, $s2, $s3
j EXIT
L2: bne $s0, $t1, L3 # handle case 2
sub $s1, $s2, $s3
j EXIT
L3: bne $s0, $t2, D # handle case -1
sub $s1, $s1, $s3
j EXIT
D: add $s1, $s3, $s3
EXIT: