title: Count number of words from a string input
body: <p>In the following code, 32 is for ASCII space character. I am facing a problem in moving inside the string:</p>
  
  <pre><code>.data
  para: .asciiz " "
  buffer: .space 250
  ctr: .word 0
  .text
  .globl main
  .ent main
  main:addi $t3,$0,32
  li $t8,1 
  la $a0,para
  li $v0,8
  syscall
  li $t0,0
  loop:bge $t0,$a0,exit
  add $t1,$a0,$t0
  lb $t2,0($t1)
  beq $t2,$t3,counter
  addi $t0,$t0,1
  j loop
  counter:addi $t8,$t8,1
  addi $t0,$t0,1
  j loop 
  
  exit:sw $t8,ctr
  li $v0,10
  syscall
  .end main
  </code></pre>