My question is; How do I store more than one user entered input into a variable without creating an array? When I run the code as I have posted here I get the error "store address not aligned on word boundary." Variable one is store1, variable two is store2. I want to store both separately entered integers into store1, and store2 respectively.
.data
store1: .byte 4 #Stores data entered by user
store2: .byte 4 # " "
msg: .asciiz "Enter your first decimal number: "
msg2: .asciiz "Enter your second decimal number: "
.text
main:
la $a0, msg #Displays msg
li $v0, 4
syscall
li $v0, 5 #Prompts user to enter an integer
syscall
la $t0, store1 #Loads user input into store1
sw $v0, store1 #Stores user input into store1
la $a0, msg2 #Displays msg2
li $v0, 4
syscall
li $v0, 5 #Prompts user to enter another integer
syscall
la $t1, store2 #My error occurs here
sw $v0, store2 #If I delete these 3 lines the code compiles with no errors
syscall
li $v0, 10 #Cleanly exits the program
syscall
sbnotsw. Conversely, if you want words, use.intor whatever is equivalent in mars.sbcorrected the issue. Along with also changing.byte 4to.int 0Thank you for your help.