title: watcom inline assembly got error "Illegal use of register"
body: <p>I use the Open Watcom IDE V1.9, and Target Environment is DOS-16bit,image type is exe.
  target cpu is 80386.</p>
  
  <p>Here is my source code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void getITV(int n);
  unsigned int ITV[16];
  
  void main()
  {
      int i=0;
      for(i=0;i&lt;16;i++){
          getITV(i);
          printf("%x   ",ITV[i]);
      }
      printf("\n");
  }
  
  void getITV(int n)
  {
      int*  address ;
      n = n * 2;
      address     = (int*) ( (int)ITV + n );
      __asm{
          push es
          push ax
          push bx
          mov ax,0
          mov es,ax
          mov ax,n
          mov bx,es:[ax]            --&lt;this line is the one create error&gt;--
          mov word ptr [address],bx
          pop bx
          pop ax
          pop es
      }
  }
  </code></pre>
  
  <p>when i make it, I got this:</p>
  
  <pre><code>cd D:\watcom-project\dumpIVT
  wmake -f D:\watcom-project\dumpIVT\dumpIVT.mk -h -e -a D:\watcom-project\dumpIVT\getCS.obj
  wcc getCS.c -i="C:\WATCOM/h" -w4 -e25 -zq -od -d2 -3 -bt=dos -fo=.obj -mm
  getCS.c(28): Error! E1156: Assembler error: 'Illegal use of register'
  Error(E42): Last command making (D:\watcom-project\dumpIVT\getCS.obj) returned a bad status
  Error(E02): Make execution terminated
  Execution complete
  </code></pre>
  
  <p>Well, but I cannt see how Line28 is wrong, I checked the open watcom user guide,
  but in section "In-line Assembly Language", there are no information about Why 
  I got this error.
  Any suggestion?</p>