############################### # TEMPLATE FOR PROBLEM 4. ## ############################### # $t0 = location of the string # $t1 = hold scanned character # $s2 = holds the ascii value for a space(32) # $t3 = used for address computation # $s5 = used for starting address of TABLE2 for a word statistics # $s4 = used for starting address of TABLE4 for sentence statistics # $s0 = holds the word length cnt # $s1 = holds the address for TABLE .data string: .asciiz "IN A DISTANT GALAXY EONS BEFORE THE CREATION OF THE MYTHICAL PLANET KNOWN \n" return: .asciiz "\n" newline: .asciiz "\n" word_msg: .asciiz " number of words starting with \n" eq_msg: .ascii " = " .align 4 TABLE2: .space 104 # for temporary use .align 4 TABLE4: .space 104 # for occurences cnt .text .globl main main: