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,788 of 4,675   
   wolfgang kern to All   
   Re: inc ax, MASM 5.1   
   16 Feb 19 09:07:14   
   
   From: nowhere@nospicedham.never.at   
      
   On 15.02.2019 23:33, src153 wrote:   
   > On Fri, 15 Feb 2019 22:57:04 +0100, wolfgang kern   
   >  wrote:   
   >   
   >> On 15.02.2019 18:25, src153 wrote:   
   >>> I have a disassembly where   
   >>>   
   >>>       FF C0 --> inc ax   
   >>>   
   >>> but when I reassemble the source I get   
   >>>   
   >>>       inc ax --> 40   
   >>>   
   >>> Is there a reason to prefer the two byte translation? Can MASM 5.1 do   
   >>> that, without forcing DB in the middle of code?   
   >>   
   >> the '40' become a REX-prefix within 64-bit long-mode, so the two byte   
   >> variant is the only choice, while 16 and 32-bit modes can use single   
   >> byte inc/dec.   
   >   
   > The object code is from a 1993 DOS program. No 64 bit. I just wondered   
   > if there is a way to make MASM 5.1 produce that code, or if they forced   
   > it in with DB.   
   >   
   > And why? For anti reverse engineering? Or was it maybe a compiler other   
   > than MASM 5.1 used for an out-of-tree object build?   
   >   
   > Not a big problem, I worked around it. Just wondering.   
      
   1993... IIRC there were rumors spread around that next x86 generations   
   will only support the two byte form. Me too stumbled into this trap and   
   a few parts of my code from this time may still contain double byte INC.   
   __   
   wolfgang   
      
   --- 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