title: mul and memory allocation in registers edx::eax with masm
body: <p>I am trying to understand the logic of using the "mul" operand in the assembler(i am using Visual Studio Community and MASM).
  Why, after "mul ebx" the result is changing also edx, and not only the eax?
  "The result(of MUL) is stored in register AX, register pair DX:AX, or register pair EDX:EAX (depending on the operand size), with the high-order bits of the product contained in register AH, DX, or EDX". 
  So is the location depending on the size of the operand?In which case?</p>
  
  <pre><code>.586
  .model flat,c
  .stack 100h
  .data
  
  .code
  
   doit proc
  
          ;EAX = 0062EEF0 EBX = 7EFDE000 ECX = 0029FD00 EDX = 00000000     
       mov eax,8;
          ;EAX = 00000008
       mov ebx,4
          ;EBX = 00000004 
       mov edx,23498
          ;EDX = 00005BCA 
       mul ebx
          ;EAX = 00000020 EDX = 00000000 ????  4*8 =20(hexa).So, there is no 
                                         ;overflow;why is edx changing too?
  
  
   doit endp
  
  end 
  </code></pre>