I am new to mips,and I wrote this code and while compiling it gives the error " address out of range 0x00000000" ,the error line is the syscall

-1

can someone help?

.data
    
.text
    main: 
        addi $t1 , $zero , 4 #a
        addi $t2 , $zero, 20 #b
        addi $t4 ,$zero ,2 #c
        
        bne  $t1 , $t2, add
        
        mul  $t1,$t1 ,$t4 # a = a * 2
        
        
        li $v0, 10
        syscall 
        
        add:
            add $t3, $t1, $t2 #d = a + b
            li $v0,4
            syscall 
            
assembly
mips
asked on Stack Overflow Oct 26, 2020 by NewCoder • edited Oct 26, 2020 by Michael

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0