title: 8086 Assembly: Multiply two 16 bit numbers to yield a 32 bit result without using the mul instruction
body: <p>In understanding the benefits of using x86 assembly language, I am trying to write as an excercise, a <strong>16x16 bit</strong> multiplication routine which takes in <strong>two unsigned</strong> 16 bit values and <em>multiplies</em> them using <em>shifting</em> and *addin*g, and stores the final 32 bit result in <strong>DX:AX</strong>. </p>
  
  <p>There is no problem running the code (in other words, it compiles just fine and runs with my linked program), however the code is not giving the expected multiplication outcome.</p>
  
  <p>This is what I have come up with so far:</p>
  
  <pre><code>
  </code></pre>
  
  <p>In theory this should be giving me the unsigned 32 bit result in DX:AX. </p>
  
  <p>When I use this code in my program, the <strong>lower 16 bits</strong> of the <strong>32 bit</strong> result (or in other words, the AX portion) are correct and show up just fine. The <strong>higher 16 bits</strong> of the 32 bit result (the DX portion) are <strong>not correct</strong>. </p>
  
  <p><strong>Could anyone help me figure out what it is that I'm doing wrong?</strong></p>
  
  <p>Thanks in advance</p>