MIPS jump loop - high order error -
i cannot seem right reason, googled bunch too, not find solution this. getting error:"target of jump differs in high-order 4 bits instruction pc 0x400054". tried jump in increment of 2 jumps reach goal, still not work. doing wrong? trying jump loop:
section.. there way can this?
.text .globl main main: loop: la $a0, celsius #string celsius li $v0, 4 syscall li $v0, 5 #read int celsius syscall j 1 backone: j loop one: blt $v0, -50, end #tests if in bounds, else out bgt $v0, 50, end jal celsius nop j backone #i getting "target of jump differs in high-order 4 bits instruction pc 0x40004c" end: li $v0, 10 #so inserted 2 jumps. .data celsius: .asciiz "/nenter in celsius: " .text .globl compute compute: move $a0, $v0 mul $a0, $a0, 9 div $a0, $a0, 5 addu $a0, $a0, 32 move $t0, $a0 la $a0, degrees #print degrees: li $v0, 4 syscall move $a0, $t0 #print int li $v0, 1 syscall jr $ra #returns nop .data degrees: .asciiz "\ndegrees fahrenheit: "
Comments
Post a Comment