# Expression: 100 + 2 - 1 * (10 * 12 / 2) = 42 .text .globl main main: li $t0,100 sub $sp,$sp,0x4 # Push into stack sw $t0,($sp) # li $t0,2 lw $t1,($sp) # Pop from stack add $sp,$sp,0x4 # add $t0,$t0,$t1 sub $sp,$sp,0x4 # Push into stack sw $t0,($sp) # li $t0,1 sub $sp,$sp,0x4 # Push into stack sw $t0,($sp) # li $t0,10 sub $sp,$sp,0x4 # Push into stack sw $t0,($sp) # li $t0,12 lw $t1,($sp) # Pop from stack add $sp,$sp,0x4 # mult $t0,$t1 mflo $t0 sub $sp,$sp,0x4 # Push into stack sw $t0,($sp) # li $t0,2 lw $t1,($sp) # Pop from stack add $sp,$sp,0x4 # div $t1,$t0 mflo $t0 mfhi $t1 lw $t1,($sp) # Pop from stack add $sp,$sp,0x4 # mult $t0,$t1 mflo $t0 lw $t1,($sp) # Pop from stack add $sp,$sp,0x4 # sub $t0,$t1,$t0