Hello I am brand new to using MIPS and I was just confused on this wording, it is probably very simple but I cannot find anything in my notes or online specifically for this question.
Here is my code:
.data
val1: .word 1
val2: .word 2
val3: .word 3
.asciiz "Daniel"
.asciiz "Enter a number "
.asciiz "\n"
.globl main
.text
main:
addi $s0, $0, 23 # initializes the register $s0 to 23
lui $a0, 0x1001
ori $a0, $a0, 19
ori $v0, $0, 4
syscall
addi $v0, $0, 5
syscall
addi $s1, $v0, 0
My Question is: how do I a. Store the value in $s1 into the data segment labeled “val1” ?? I know how to store it into another register but not a value please and thank you!
sw. There are also tons of examples. Commenting your code would help understanding it ;) If you are not forbidden, you might also want to usela.