I am usng MIPS and when I change the data that a label is po

I am usng MIPS and when I change the data that a label is pointing to and display it the only output I get is the labels address.

Here is the problem.

MIPS assembly language program to prompt for two integers A and B, store them in memory locations labelled A and B respectively, then calculate the difference between them (i.e. A - B) and store the difference into a memory location labelled D.

Solution

main:

first number
li $v0, 4
la $a0, prompB   
syscall

li $v0, 5
syscall
move $A, $v0   

li $v0, 4
la $a0, prompD
syscall

li $v0,5
syscall
move $B,$v0


li $v0, 4
la $a0, result
syscall

sub $a0, $B, $A
li $v0, 1
syscall

li $v0, 10
syscall

I am usng MIPS and when I change the data that a label is pointing to and display it the only output I get is the labels address. Here is the problem. MIPS asse

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site