title: Write a modulo function using only addition / subtraction
body: <p>I am writing a library for <code>MIPS</code> which I can't use floating point calculations I.E. modulos, division, multiplication.</p>
  
  <p>I've written division and multiplication functions in C and then I translated that code to <code>MIPS</code>.</p>
  
  <p>However I am lost on how to go about writing a function to calculate modulo via <code>C</code> using only addition or subtraction.</p>
  
  <p><strong>How can I write a function to calculate modulo using ONLY addition and subtraction?</strong></p>