Author: Robert Hyatt
Date: 13:08:20 06/18/00
Go up one level in this thread
On June 18, 2000 at 15:25:23, James Robertson wrote: >I cannot remember how to do a shift in assembler and save any bits shifted off. >Specifically, I want to shift a 64-bit integer. What is the assembler equivalent >of: > >unsigned __int64 x; >x <<= shift; > >Thanks, >James I don't follow. x <<= shift simply shifts x "shift" bits to the left and gives you the result. Not the bits shifted off. To get the bits you are going to shift off, create a mask with "shift" bits in the left-most end, AND this with the value, and then save them. Those are the bits that would have been lost.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.