Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!gatech!cuae2!ihnp4!ihlpl!saba From: saba@ihlpl.UUCP Newsgroups: net.lang.c Subject: rotate operators Message-ID: <1115@ihlpl.UUCP> Date: Wed, 16-Jul-86 10:25:29 EDT Article-I.D.: ihlpl.1115 Posted: Wed Jul 16 10:25:29 1986 Date-Received: Thu, 17-Jul-86 05:58:25 EDT Distribution: net Organization: AT&T Bell Laboratories Lines: 14 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