🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.mod2
Article #374

Bit-Twiddling

#374
From: RMULLER
Date: Thu, 17 Apr 1986 04:02
17 lines
1109 bytes
There must be a simple way ... but I can't think of it.

How does one implement shift left and shift right operations
on BITSETS?  Is there a way which doesn't involve dividing
or multiplying by 2**N?  What I want is the equivalent of
C's R >> 4; since M2 is presented as a systems programming
language, there has to be a fast elegant way to do this, right?


If it helps anyone, what I'm trying to do is use the menu-handling
routines on the Amiga, from M2 rather than C.

Thanks --

Rich Muller
Rmuller@umass.bitnet
Technical Details
Message-ID: <8604171712.5831@ur-cayuga.rochester.arpa>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!UMass.BITNET!RMULLER

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!UMass.BITNET!RMULLER
From: RMULLER@UMass.BITNET
Newsgroups: net.lang.mod2
Subject: Bit-Twiddling
Message-ID: <8604171712.5831@ur-cayuga.rochester.arpa>
Date: Wed, 16-Apr-86 23:02:00 EST
Article-I.D.: ur-cayug.8604171712.5831
Posted: Wed Apr 16 23:02:00 1986
Date-Received: Sat, 19-Apr-86 14:24:29 EST
Sender: usenet@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 17