From: "Joel_S" Newsgroups: comp.os.msdos.djgpp Subject: Re: C/C++ versions of asm opcodes. Date: Wed, 22 Jan 2003 03:56:19 +0100 Organization: Web2news.com Message-ID: <12339N379@web2news.com> References: <12212N341 AT web2news DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 NNTP-Posting-Host: 198.81.26.238 X-Complaints-To: abuse AT web2news DOT net Lines: 8 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Actually, thinking about your code, you need to add samt&= 31 unsigned long rol (unsigned long src, unsigned long samt){ samt&= 31; return (src << samt) | (src >> (32 - samt)); } -- Posted via http://web2news.com the faster web2news on the web