Re: LZ: Rotating


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

Re: LZ: Rotating



that's pretty neat, but i'm new to asm, so , could somebody give me an example of when
this would be used?--thanks
<pre>
-- 
.end                                                          (`--,
                                        __                     >  |
         ___            __|               |               ___ (  <
  _____/'   `\---,----  __    ----\,--\---,--,----,---- /'   `\>  )
 |    |__\--  |       \/  `,/         ||  |       \    \__\--  | /
 |_____/  -,  \  |-\   \  |/   /~--}  ||  |  |-\   \-\  \  -,  \ |
       \_______\ | `/__/  /\__\   /  {(____) | `/__/ ,  /_______\|
              |  /     `-'        `^\ |   |  /      <  /   www. \|
              | /  like aninimal!!  < |   | /        |/ cris.com/'
              |/                     \|   |/         '  ~aninimal
              '                       '   '


----------
| From: KEITH T BURZINSKI <FFNP69C@prodigy.com>
| To: list-zshell@defiant.rbk.sollentuna.se
| Subject: Re: LZ: Rotating
| Date: Saturday, July 27, 1996 8:00 PM
| 
| Alright, I know I'm gonna get carried away here, but...  ;)
| This is kinda from Eric Linenberg's page.
| ======
| Say we take a byte and number the bits A-H, where A is the most 
| significant bit and H is the least significant bit.
| We now have:
| 
| A B C D E F G H
| 
| Rotations that can be done:
| ------
| Shift Left (SLA) = B C D E F G H 0
| 
| Logical Shift Right (SRL) = 0 A B C D E F G
| 
| Arithmetic Shift Right (SRA) = A A B C D E F G
| 
| Circular Rotate Left (RLC) = B C D E F G H A
| Carry Flag = A
| 
| Circular Rotate Right (RRC) = H A B C D E F G
| Carry Flag = H
| 
| Rotate Left (RL) = B C D E F G H c
| Where "c" = Carry Flag before the operation
| Carry Flag = A (after the operation)
| 
| Rotate Right (RR) = c A B C D E F G
| Where "c" = Carry Flag before the operation
| Carry Flag = H (after the operation)
| ======
| That's all folks...  :)
| 
| ____
| ~Keith
| FFNP69C@PRODIGY.COM
| 
| 
</pre>


Follow-Ups: References: