title: Assembler 8086 divide 32 bit number in 16 bit number
body: <p>I try to divide 32 bit number in 16 bit number. 
  For example 10000000h divide by 2000h.According the desgin I try to do I divide 
  4 right digits with the divisor and then the 4 left digit by the divisor. </p>
  
  <p>This is my code : </p>
  
  <pre><code>.DATA 
  num dd 10000000h
  divisor dw 2000h 
  
  result dd ? 
  remainder dw ? 
  
  .CODE
  main:
  
  mov ax,@DATA    
  mov ds,ax 
  
  xor dx,dx
  mov cx ,word ptr divisor
  mov bx,offset num
  mov ax,[bx]
  div cx
  
  mov bx,offset result 
  mov [bx],ax 
  mov bx,offset num
  mov ax,[bx+2]
  
  
  mov ax,[bx+2]
  div cx 
  mov bx,offset result 
  mov [bx+2],ax 
  </code></pre>
  
  <p>I got zero in variable result. Not sure if the  problem with the design of the divide or just a little mistake.</p>