reversing a mask

Ken Yap ken at rochester.UUCP
Sun Nov 25 16:59:27 AEST 1984

>What's the fastest way to reverse a 16-bit mask in C?  In 68000 asl?

Actually the 65536 combination answer wasn't too far from a plausible
method - split the word up into 2 8 bit bytes and then do two lookups.
Then swap bytes.  This way you only need one 256 byte table.

You could do lookups on nybbles, etc, ad nauseum.
	Ken Yap

	UUCP:	(..!{allegra, decvax, seismo}!rochester!ken)
	ARPA:	ken at
	USnail:	Ken Yap, Dept. of Comp. Sci., U. of Rochester, NY 14627.

More information about the Comp.lang.c mailing list