Question: Here is the assembly code. Im getting an error everytime I run it on Qtspim. Please help Idk what im doing wrong. . data #

Here is the assembly code. Im getting an error everytime I run it on Qtspim. Please help Idk what im doing wrong.
.data # Data declaration section
hello_msg: .asciiz "Hello CSCI " # Store the string but don't print yet
course_num: .word 21 # Store the course number
name_msg: .asciiz "
My name is " # Message continuation
first_name: .asciiz "[First Name].
" # Replace [First Name] with your actual first name
.text # Code section starts here
.globl main # Declare the main entry point
main: # Main program label
# Print "Hello CSCI "
li $v0,4 # Load the print string syscall code into $v0
la $a0, hello_msg # Load the address of the hello_msg into $a0
syscall # Make the syscall to print the string
# Print the course number (21)
li $v0,1 # Load the print integer syscall code into $v0
lw $a0, course_num # Load the integer (21) from memory into $a0
syscall # Make the syscall to print the integer
# Print "
My name is "
li $v0,4 # Load the print string syscall code into $v0
la $a0, name_msg # Load the address of the name_msg into $a0
syscall # Make the syscall to print the string
# Print "[First Name]."
li $v0,4 # Load the print string syscall code into $v0
la $a0, first_name # Load the address of the first_name into $a0
syscall # Make the syscall to print the string
# Exit the program
li $v0,10 # Load the exit syscall code into $v0
syscall # Make the syscall to exit
Here is the assembly code. Im getting an error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!