title: Assembly language in MIPS Multiply and Divide using MARS
body: <p>I'm trying to figure out why it breaks on the line right after div. maybe I'm setting up div wrong? or storing it wrong? also, did I call it to print the total distance?</p>
  
  <pre><code>li $t0, 284  #distance in miles from OR to WA
  li $t1, 387  #6 hours and 27 minutes, 6 hours = 360 minutes +27 minutes, 387 minutes
  li $t2, 5280 #5280 feet in a mile
  li $t3, 60   #60 seconds in a minutes
  
  main:
      mult $t0, $t2        #gets the total feet in the 284 miles and places it into $t4
      mfhi $t4
  
      mult $t1, $t3       #gets the total seconds in the 6 hours an 27 minutes
      mfhi $t5
  
      div $t4, $t5    #divides the total feet by the total seconds
      mflo    $t6
          li $v0, 1
      move $a0, $t6
      syscall
  
      addi $v0, $zero, 10 ##system call to leave the program
      syscall         ##exits the program 
  </code></pre>