I a writing a simple MIPS code to add two hexadecimal values and store the results in a register. I am new to MIPS so I am having trouble finding the fix to an error message I have. Any help would be appreciated.
.text
.globl main
main: add $t2,$t0,$t1 # add contents of $t0 and $t1, and store result in $t2
li $v0,10 # terminate execution
syscall
the error message:
Error in C:\Users\smpan\OneDrive\Desktop\Computer\Computer Lab 2\Exercise4_3.asm line 4: Runtime exception at 0x00400000: arithmetic overflow
My goal for the program is to try and verify my hexadecimal addition is correct. I am adding 0x7FAA3278
and 0x6024CD12
. The program should store the result 0xDFCEFF8A
is the registered $t2
.
Line 14 is the line that contains main: