I need to write an assembly program which multiplies two signed numbers (in two’s complement system). The multiplier and multiplicand could be any number within the 8 bit data range and with any sign. Make sure your assembly program is generic.
Here's what I have but I get the error "program is finished running (dropped off bottom)" and I'm not sure why.
.data
str1: .asciiz "Enter a"
str2: .asciiz "Enter b"
str3: .asciiz "a*b = "
main:
li $v0, 4
la $a0, str1
syscall
li $v0, 5
syscall
add $s0, $v0, $zero
li $v0, 4
la $a0, str2
syscall
li $v0, 5
syscall
move $s1, $v0
mult $s0, $s1
mflo $t2
li $v0, 1
move $a0, $t2
syscall
li $v0, 4
la $a0, str3
syscall
li $v0, 10
syscall