From Dmitry Kiryashov [zews at AHA.RU]
a) abcd.efgh -> bcda.fghe
rlf X,W
rlf X,F ;bcdefgha
swapf X,W ;...a...e
xorwf X,W
andlw 0x11 ;...<a^e>...<e^a>
xorwf X,F ;bcdafghe
b) abcd.efgh -> dabc.hefg
rrf X,W
rrf X,F ;habcdefg
swapf X,W ;d...h...
xorwf X,W
andlw 0x88 ;<d^h>...<h^d>...
xorwf X,F ;dabchefg
Archive:
| file: /techref/microchip/math/bit/rotnib.htm, 1KB, , updated: 2003/10/6 07:51, local time: 2009/11/21 19:55,
38.107.191.102:LOG IN
|
| ©2009 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? Please DO link to this page! Digg it! <A HREF="http://piclist.com/techref/microchip/math/bit/rotnib.htm"> PIC Microcontoller Bit Math Method </A> |
| Did you find what you needed? |
|
|
.