title: Get address of pixel in bitmap display MIPS
body: <p>I'm using the bitmap display of the <a href="http://courses.missouristate.edu/KenVollmar/mars/index.htm" rel="nofollow noreferrer">MARS-simulator</a> with unit width 16px, and startaddress $gp.
  How would I get the address of a specific pixel using coordinates?</p>
  
  <p>Example (x,y)
  I guess I just have to count the amount of pixels until I get to (x,y) and use that as offset on $gp?</p>
  
  <p>Pseudo:</p>
  
  <pre><code>&gt;ColAmount = 32 #RowLength
  &gt;RowAmount = 16 #ColumnHeight
  &gt;x = 4
  &gt;y = 5
  Coordinate = (x, y)
  AmountOfPixelsUntilCoordinate = (RowAmount * y) + ColAmount
  offset = AmountOfPixelsUntilCoordinate
  addressOfPixel = offset($gp)
  </code></pre>
  
  <p>Is this correct? How'd I implement this in MIPS ASM?</p>