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 revision Previous revision
playground:reversing_bits_in_a_byte [2020-02-14 22:46]
verz
playground:reversing_bits_in_a_byte [2020-02-20 21:15] (current)
verz asl
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
 +        rol
         rts         rts
 </​code>​ </​code>​
  
playground/reversing_bits_in_a_byte.1581716765.txt.gz ยท Last modified: 2020-02-14 22:46 by verz