How fast does your favorite shifting program shift a 32-bit unsigned integer four bit positions? My first attempt yielded a 22 instruction slug, while my second attempt is a 19 instruction screamer. Anybody have any idea on how to make it scream louder? cblock 0x20 hh mh ml ll endc ;---------------------------------------------------------------- ;shr4 ; ; The purpose of this routine is to shift the 32-bit unsigned ;integer in hh:mh:ml:ll right 4 bit positions. The least significant ;nibble is thrown away. ; ;Input: ; hh,mh,ml,ll contain the 32 bit integer. hh is the most significant ; byte. ;Output: ; hh,mh,ml,ll shifted right 4 bit positions. shr4 MOVLW 0xf0 ANDWF ll,F SWAPF ll,F SWAPF ml,F ;Exchange upper and lower nibbles ANDWF ml,W ;Get upper nibble (was the lower one) XORWF ml,F ;Clear it in ml IORWF ll,F ;Add it to ll MOVLW 0xf0 SWAPF mh,F ANDWF mh,W XORWF mh,F IORWF ml,F MOVLW 0xf0 SWAPF hh,F ANDWF hh,W XORWF hh,F IORWF mh,F RETURN Scott