Re: A82: Re: Re: Re: need help with this rutini


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

Re: A82: Re: Re: Re: need help with this rutini




Just so Roger understands...

----- Original Message ----- 
From: "Dines Justesen" <dines@aub.dk>
To: <assembly-82@lists.ticalc.org>
Sent: Sunday, May 21, 2000 09:30
Subject: Re: A82: Re: Re: Re: need help with this rutini
<snip>

bit order: 76543210
MSB = most significant bit = bit 7
LSB = least significant bit = bit 0

 LD A,L      ; load A with the lower 8 bits of HL
 SRL H \ RRA ; shift H one bit right, LSB -> carry flag  \  rotate A right, carry flag -> MSB
 SRL H \ RRA ; 0 -> | 7 ----> 0 | -> C  \  C -> | 7 ----> 0 | -> C
 SRL H \ RRA ; Three times for three bits
; LD L,A     ; Uncomment this line if you want the result of HL shifted 3 bits right saved in HL

<snip>




References: