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,045 of 4,675   
   Frank Kotler to All   
   Re: DIV instruction in 64 bit mode with    
   06 Nov 17 11:53:15   
   
   From: fbkotler@nospicedham.myfairpoint.net   
      
   Richmond wrote:   
      
   Hi Richmond. Sorry for the delay in posting. Moderated group. You   
   weren't in the "whitelist" - now you are...   
      
   > I am trying to divide a number by 10. Not too difficult you would think,   
   > but this instruction:   
   >   
   > DIV EBX   
   >   
   > is rejected my NASM in 64 bit mode. So I have zero in EDX and my number   
   > to be divided in EAX so I am expecting EAX=EAX:EDX/EBX with the   
   > remainder in EDX. According to the Intel manual, in 64 bit mode the   
   > default operation size is 32 bits, so this should work. But nasm says   
   > the instruction is not available in 64 bit mode. How do I do it?   
      
   I am unable to duplicate this result. Can you show us exactly what you   
   did? In particular, did you try to "push" a 32-bit reg? That's an   
   instruction known to produce that error. "div ebx" works fine for me.   
      
   Best,   
   Frank   
      
   --- 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