I am really struggling with the wording of a project I am working on. For mips they are requesting that I take in two arguments before launch. I store both of them into .word memory addresses. However, it then asks me to treat them as though they are .asciiz files and dissect it character by character in a way that spits back only an integer (and if it's value is negative).
The $a0 register will contain the number of arguments passed to your program. The $a1 register contains the starting address of an array of strings. Each element in the array is an item that you specified on the command line. The labels arg1 and arg2 each store the starting address of a null-terminated sequence of ASCII characters.
My question is how do I properly extract and use the address to get to this sequence of characters they are discussing. Furthermore, where should I store it?
.data
align 2
arg1: .word 0
arg2: .word 0
.macro load_args
lw $t0,0($a1)
sw $t0, arg1
lw $t1,4($a1)
sw $t1, arg2
.end_macro
.text
.globl main
main:
load_args()