rotate operators
saba at ihlpl.UUCP
saba at ihlpl.UUCP
Thu Jul 17 00:25:29 AEST 1986
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
More information about the Comp.lang.c
mailing list