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,804 of 4,675   
   James Harris to Terje Mathisen   
   Re: Fast conversion to a boolean of 0 or   
   07 Mar 19 09:08:56   
   
   From: james.harris.1@nospicedham.gmail.com   
      
   On 07/03/2019 06:35, Terje Mathisen wrote:   
   > On Wednesday, March 6, 2019 at 2:47:41 PM UTC-5, James Harris wrote:   
   >> A small programming challenge if you are interested, just for fun.   
   >   
   > What happens if you do:   
   >   
   >     neg eax   
   >     mov eax,0   
   >     adc eax,eax   
   >   
   > This does not use any extra regs, and the NEG and the MOV should still   
   > run in the same cycle even if they both use EAX as the target. This is   
   > because the MOV form is known to not depend on the previous value in   
   > EAX, so it can be started even before the NEG.   
      
   Good one!   
      
      
   --   
   James Harris   
      
   --- 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