title: Is it possible to multiply by an immediate with mul in x86 Assembly?
body: <p>I am learning assembly for x86 using DosBox emulator. I am trying to perform multiplication. I do not get how it works. When I write the following code:</p>
  
  <pre><code>mov al, 3
  mul 2
  </code></pre>
  
  <p>I get an error. Although, in the reference I am using, it says in multiplication, it assumes AX is always the place holder, therefore, if I write:</p>
  
  <pre><code>mul, 2
  </code></pre>
  
  <p>It multiplies <code>al</code> value by 2. But it does not work with me.</p>
  
  <p>When I try the following:</p>
  
  <pre><code>mov al, 3
  mul al,2
  int 3
  </code></pre>
  
  <p>I get result 9 in ax. See this picture for clarification:
  <img src="https://i.stack.imgur.com/4oIZQ.png" alt="enter image description here"></p>
  
  <p>Another question: Can I multiply using memory location directly? Example:</p>
  
  <pre><code>mov si,100
  mul [si],5
  </code></pre>