title: NASM, where is my DIV remainder?
body: <p>I've tried googling to find where the remainder goes in NASM's div. For 8-bit division it looks like the quotient is in al and the remainder in al. But I've also seen people say it will be in dl. At this point, I'm pretty confused. In my code below I'm trying to print out the quotient and the remainder to check my work before I move on. I can't seem to get the remainder correctly. (Base is the divisor)</p>
  
  <pre><code>asciiout: db "%c %c", 10, 0
  
  ....
  xor eax, eax
  xor ebx, ebx
  xor edx, edx
  mov al, [Num]
  mov bl, [Base]
  div bl
  
  add al, '0'
  mov [Quotient], al
  add ah, '0'
  mov [Remainder], ah
  
  push edx
  push eax
  push asciiout
  call printf
  add esp, 12
  </code></pre>
  
  <p>In case you skipped the above paragraph, where is my remainder going? Do I have to do separate mod division?</p>