Write a MIPS program that adds two numbers one located at th
Write a MIPS program that adds two numbers, one located at the address specified in register $s3 and the other at absolute address 0x3000. The sum should be stored at the memory address obtained by adding 0x1000 to the contents of register $t4.
Solution
#Since MIPS program work with 32-bit numbers.
# let us take 2 32-bit numbers in Hexadecimal representation.1) 2345H 2) 5678H
ld $t3,2345h # loads double word into temporay register t3
ld 0x3000,5678h # loads double word into location 0x3000.
move $t4, 0x300 # data transfers from 0x3000 address the register t4.
addu 0x1000($t4), $t3,$t2 # t4=t3+t2
end # end of program.
