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,043 of 4,675   
   Richmond to All   
   DIV instruction in 64 bit mode with NASM   
   06 Nov 17 13:00:29   
   
   From: p1299721@nospicedham.protonmail.com   
      
   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?   
      
   --   
   ~   
      
   --- 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