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
hellomsg: asciiz "Hello CSCI # Store the string but don't print yet
coursenum: word # Store the course number
namemsg: asciiz
My name is # Message continuation
firstname: 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 $v # Load the print string syscall code into $v
la $a hellomsg # Load the address of the hellomsg into $a
syscall # Make the syscall to print the string
# Print the course number
li $v # Load the print integer syscall code into $v
lw $a coursenum # Load the integer from memory into $a
syscall # Make the syscall to print the integer
# Print
My name is
li $v # Load the print string syscall code into $v
la $a namemsg # Load the address of the namemsg into $a
syscall # Make the syscall to print the string
# Print First Name
li $v # Load the print string syscall code into $v
la $a firstname # Load the address of the firstname into $a
syscall # Make the syscall to print the string
# Exit the program
li $v # Load the exit syscall code into $v
syscall # Make the syscall to exit
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
