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,358 of 4,675   
   Hac4u to All   
   Use of SHR and SHL instructions   
   24 Apr 18 17:27:12   
   
   From: samakshkaushik@nospicedham.gmail.com   
      
   What is the purpose of using SHR and SHL Instructions.   
      
   For example I have the following instructions.   
      
   0x0804854c <+12>:	mov    eax,0x0   
      0x08048551 <+17>:	add    eax,0xf   
      0x08048554 <+20>:	add    eax,0xf   
      0x08048557 <+23>:	shr    eax,0x4   
      0x0804855a <+26>:	shl    eax,0x4   
   => 0x0804855d <+29>:	sub    esp,eax   
      
   Why was shr and shl used?   
      
   I am debugging using GDB and I am not using any switch for optimization.   
      
   --- 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