02 | # String constants for messages |
03 | pr1: .asciiz "Please enter a string: " |
04 | pr2: .asciiz "You entered: " |
05 | msg: .asciiz "Congratulations, SPIMmer!\n" |
07 | # Space for the input string |
10 | ##################### Program Code ###################### |
16 | # Issue a prompt and read a string. |
17 | li $v0, 4 # Print a string. |
18 | la $a0, pr1 # Prompt 1 |
20 | li $v0, 8 # Read a string. |
22 | li $a1, 200 # Length of buffer |
25 | # Print the entered string and a message. |
26 | li $v0, 4 # Print a string. |
27 | la $a0, pr2 # Prompt 2 |
29 | li $v0, 4 # Print a string. |
32 | li $v0, 4 # Print a string. |
|