title: passing a parameter in mips
body: <p>I want to translate this java code into MIPS. I get a syntax error. can you tell me what I am doing wrong.
  Java  </p>
  
  <pre><code>public static void setCount(int count)
  {
   IntegerMath.count = count;
  } 
  </code></pre>
  
  <p>Mips  </p>
  
  <pre><code>.globl setCount
  #---------------
  .text
  setCount: #-----------------
  lw count($0), $t0
  jr $ra
  #----------------------------- `
  </code></pre>
  
  <p>Java  </p>
  
  <pre><code>System.out.println(IntegerMath.getCount());
  int a = new Scanner(System.in).nextInt();
  IntegerMath.setCount(a);
  System.out.println(IntegerMath.getCount());`
  </code></pre>
  
  <p>Mips </p>
  
  <pre><code>#--------------------------------------------------
   jal getCount   #System.out.println(IntegerMath.getCount())  
   add $a0, $0, $v0  
   addi $v0, $0, 1   
   syscall  
   #-----------------------------------------------------  
   addi $v0, $0, 5 # readInt make new variable   
   syscall  
   add $t0, $0, $v0 #set t0 to value  
   #------------------------------------------  
   jal setCount   
  add $a0, $0, $v0  
  #-------------------------------   
  addi $v0, $0, 1  
  syscall  
  #-------------------------    
   addi $sp, $sp, 4  
   lw $ra, 0($sp)  
   jr $ra  
  </code></pre>