Re: A89: lsr & lsl


[Prev][Next][Index][Thread]

Re: A89: lsr & lsl




lsd (hehe) = Logical Shift in direction d

So, lsl.l d2,d0 will shift d0 to the left d2 times (modulo 64). Logical
shift always moves in a 0 bit.

 move.l #$FFFFFFFF,d0
;d0 = #%1111111111111111111111111111111
 move.l #10,d2
 lsl.l d2,d0
;d0 = #%1111111111111111111111000000000

Eric Greening wrote:
> 
> Could some body please explain to me what exactly lsl and lsr do?
> 
> Like, say I have:
>   lsl.l d2,d0
> What exactly will that do to d0/d2?
> 
> Or I have:
>   lsr.l d2,d0
> What would that do to d0/d2?
> 
> Thanks for the help.  I greatly appreciate it.
> 
> Eric Greening

-- 
Scott "_Wrath_" Dial
wrath@calc.org
ICQ#3608935
TimeCity AI Guy II - www.timecity.org
Member of TCPA - tcpa.calc.org
__________________________________________
NetZero - Defenders of the Free World
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html


References: