title: Trying to divide two numbers and get the result of division and the remainder (8086)
body: <p>Trying in assembly 8086 to divide two numbers and get the result of division and the remainder<br>
  for some reason it doesn't do what I want</p>
  
  <pre><code> .MODEL SMALL
   .STACK 64
   .DATA
            ResultOfDivision db ?
            Divisor db ?
            Dividend db ?
            Remainder db ?
       .CODE
  </code></pre>
  
  <p>start: 
            mov    ax, @DATA
            mov    ds, ax</p>
  
  <pre><code>      mov    ah, 01
        int    21H
        sub    al, 48
        mov    Divisor, al
  
        mov    ah, 01
        int    21H
        sub    al, 48
        mov    Dividend, al
        mov    bl, 00
        mov    al, 00
        mov    bl, Divisor
        mov    al, Dividend
        div    bl
  
  
  
        mov    ResultOfDivision, al
        mov    Remainder, ah
  
        mov    dl, ResultOfDivision
        add    dl, 48
        mov    ah, 02
        int    21H
  
        mov    dl, Remainder
        add    dl, 48
        mov    ah, 02
        int    21H
        mov    ah, 4ch
        int    21H
  
         .EXIT
  </code></pre>
  
  <p>END start</p>