User Tools

Site Tools


playground:reversing_bits_in_a_byte

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
playground:reversing_bits_in_a_byte [2020-02-14 22:46] verzplayground:reversing_bits_in_a_byte [2020-02-22 18:40] verz
Line 21: Line 21:
  
 -- --
-this would be faster (enter with the value in .A, result in .A, .X will be 0)+this would be equally fast, at 100cycl +rts (enter with the value in .A, result in .A, .X will be 0)
 <code> <code>
         ldx #8         ldx #8
Line 30: Line 30:
         lda $2         lda $2
  
 +        rts
 +</code>
 +
 +or unrolled (56 cycl +rts):
 +<code>
 +        asl 
 +        ror $2
 +        asl 
 +        ror $2
 +        asl 
 +        ror $2
 +        asl 
 +        ror $2
 +        asl 
 +        ror $2
 +        asl 
 +        ror $2
 +        asl 
 +        ror $2
 +        asl 
 +        lda $2
 +        ror
         rts         rts
 </code> </code>
  
playground/reversing_bits_in_a_byte.txt · Last modified: 2020-03-12 13:05 by tlr