Question: ((ANSWER USING QtSpim)) FIX THIS ERROR FOR THE CODE BELOW spim: (parser) syntax error on line 35 for first_name sub $t0, $t0, first_name # Initialize
((ANSWER USING QtSpim))

FIX THIS ERROR FOR THE CODE BELOW
spim: (parser) syntax error on line 35 for first_name sub $t0, $t0, first_name
# Initialize data segment .data first_name: .space 50 last_name: .space 50
# Initialize text segment .text .globl main
main: # Print prompt message for user input li $v0, 4 la $a0, prompt_message syscall
# Read user input into first_name and last_name li $v0, 8 la $a0, first_name li $a1, 50 syscall la $a0, last_name li $a1, 50 syscall
# Find the end of the first name la $t0, first_name li $t1, ' ' loop: lb $t2, ($t0) beq $t2, $t1, end_first_name addi $t0, $t0, 1 j loop end_first_name: sub $t0, $t0, first_name
# Print characters in first name la $a0, first_name move $a1, $t0 li $v0, 4 syscall
# Print characters in last name reversed add $t0, $t0, 1 la $t1, last_name addi $t1, $t1, 49 loop2: subi $t0, $t0, 1 blt $t0, $zero, end_program lb $a0, ($t1) li $v0, 11 syscall addi $t1, $t1, -1 j loop2
# End of program end_program: li $v0, 10 syscall
# Prompt message prompt_message: .asciiz "Please input your full name (First Name Last Name): "
MIPS Assembly Language Programming Let the user input his/her full name (First_Name Last_Name), use a space to separate the names when input, then print out the characters in the first name and the characters in the last name reversed. Sample output: Please input your full name (First_Name Last_Name): ABC WXYZ Output: CBA ZYXWStep by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
