EE 3755  MIPS Homework1  Due: TBA

 

Estimated time to finish:

Knowing How to use  SPIM or XSPIM : Assume you already know (from 1Min to….Inf..).

Prob.1 : 45Mins.

 

Total : 45 Mins..

When you submit the Hw., Please write down how much time did you spend for the problem.

(No penalty for spending too little or too much time. Just want to know how long you spent.)

How to submit: Hard copy during the class.

 

 

Problem 1 Write MIPS program to count the number of word in a sentence.

         and print the number and print *  the number of times/10.

 

.data

textdata:  .asciiz  “In a distant galaxy eons before the creation of the mythical planet known as Earth, vast civilizations have evolved, and ruling the galaxy is an interstellar Empire created from the ruins of an Old Republic that held sway for generations\n”

 

 

#Hint) Words are separated by the space.

 #         For the above sentence, word count is 40.

#        so print

#       “ the number of word = 40”

#      “the occurrence= ****”

#     ASCII value for the space is 32(decimal) and ASCII value for the null(\n) is 0(this is for

#        end of the  sentence).

#     code length will be around 50 lines.

         

 

#  Sol)

.text

                .globl __start    

__start: