Remove the "\n" from " Pounds\n".
The exception handler can also read in a string from the keyboard.
li $v0,8 # code 8 == read string la $a0,buffer # $a0 == address of buffer li $a1,16 # $a1 == buffer length syscall # Invoke the operating system. . . . . .data buffer: .space 16 # reserve 16 bytes
$a1 contains the length (in bytes) of the input buffer.
($a1)-1 characters are read from the keyboard and placed in
buffer as a null terminated string.
The user ends the string by hitting "enter".
The "enter" character appears in the buffer
as the newline character '\n',
This byte is followed by the null byte
If the user enters a string that is exactly
($a1)-1 characters long the newline
character is omitted from the buffer.
No matter what, there is a null at the end of data in the buffer.
Is the string that is read in immediately suitable for output using the print string service?