[net.lang.c] rotate operators

saba@ihlpl.UUCP (07/16/86)

Since I'm seeing lots of things about compiler specfic operators and
rotate as an example, I'll post some history. C compilers for the
Z80 and MAC-8 (an AT&T 8 bit CPU) used <<< and >>> for rotate.

i = x >>> 3;	/* rotate x right by three bits */
i = y <<< n;	/* rotate y left by n bits */
i >>>= 2;	/* rotate i right by two bits */

You get the idea. This was great when you had to write firmware
that fiddled with hardware registers and such.


Bruce Sabalaskey
ihnp4!ihlpl!saba