ON 20100301@8:01:53 AM at page:
On a web page you were interested in at:
http://www.piclist.com/techref/microchip/math/bit/shift4.htm#40238.3346412037
Alex Davies[AD-AEE-GA8] Says
You can save 1 word per byte on the above by using XOR swaps with W as a carry register. ie, to shift to the left by a nibble:
SWAPF TEMP0, W
MOVWF TEMP0
ANDLW 0x0F
XORWF TEMP0, F
SWAPF TEMP1, F
XORWF TEMP1, F
XORWF TEMP1, W
ANDWF 0x0F
XORWF TEMP1, F
SWAPF TEMP2, F
XORWF TEMP2, F
XORWF TEMP2, W
ANDLW 0x0F
XORWF TEMP2, F
...
(untested)
ON 20100301@8:04:03 AM at page:
On a web page you were interested in at:
http://www.piclist.com/techref/microchip/math/bit/shift4.htm#40238.3361458333
Alex Davies[AD-AEE-GA8] Says
Sorry minor typo:
XORWF TEMP1, W
ANDLW 0x0F
XORWF TEMP1, F
ON 20100301@4:21:19 PM at page:
On a web page you were interested in at:
http://www.piclist.com/techref/microchip/math/bit/shift4.htm#
James Newton[JMN-EFP-786] edited the page. Difference:
http://www.piclist.com/techref/diff.asp?url=H:\techref\microchip\math\bit\shift4.htm&version=3
ON 20100301@4:52:10 PM at page:
On a web page you were interested in at:
http://www.piclist.com/techref/microchip/math/bit/shift4.htm#
James Newton[JMN-EFP-786] edited the page. Difference:
http://www.piclist.com/techref/diff.asp?url=H:\techref\microchip\math\bit\shift4.htm&version=4