home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,342 of 4,675   
   Kerr-Mudd,John to @nospicedham.comcast.net   
   Re: what is wrong with this div line?   
   08 Apr 18 09:17:19   
   
   From: notsaying@nospicedham.invalid.org   
      
   On Sun, 08 Apr 2018 08:50:52 GMT, bilsch  wrote:   
      
   > I tried this:   
   >   
   > bits 16   
   > mov ax,120   
   > mov dx,4   
   > div ax,dl   
   >   
   > nasm says:   
   > invalid combination of opcode and operands   
   >   
   > I tried several variations - always the same error.   
   >   
   > What could be wrong?   
   >   
      
   div always uses (r/e/)ax, so it's not specified.   
      
   "div dl" is what you want; but "div dx" is wrong (dx::ax is divided by   
   dx).   
      
      
   --   
   Bah, and indeed, Humbug.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca