delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/21/22:00:30

From: "Joel_S" <jbs30000 DOT news DOT invalid AT web2news DOT net>
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> <GN9X9.29467$jM5 DOT 76104 AT newsfeeds DOT bigpond DOT com>
MIME-Version: 1.0
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019