so i have this following code which does this simple thing in mips
mult $t0, $t1
$t0 = -763
$t1 = 29
when I move the values from hi and lo registers to $t2 and $t3 i get following values for each
$t2 = -1 and $t3 = -22127
is this correct??? can someone explain me why?
here is the code
.text
.globl main
main:
addi $t0,$zero,-763
move $a0,$t0
li $v0, 1
syscall
la $a0, plus
li $v0, 4 #print_string
syscall
addi $t1,$zero,29
move $a0,$t1
li $v0, 1
syscall
mult $t0,$t1
mfhi $t2
mflo $t3
la $a0, t0equals
li $v0, 4 #print_string
syscall
move $a0,$t0
li $v0, 1
syscall
la $a0, t1equals
li $v0, 4 #print_string
syscall
move $a0,$t1
li $v0, 1
syscall
la $a0, t2equals
li $v0, 4 #print_string
syscall
move $a0,$t2
li $v0, 1
syscall
la $a0, t3equals
li $v0, 4 #print_string
syscall
move $a0,$t3
li $v0, 1
syscall
li $v0, 10 # syscall code 10 is for exit.
syscall
.data
prompt: .asciiz "Please enter a (floating point) number: "
plus: .asciiz " + "
t0equals: .asciiz "\n t0 = "
t1equals: .asciiz "\n t1 = "
t3equals: .asciiz "\n t3 = "
t2equals: .asciiz "\n t2 = "
# end of add2.asm.