Newsgroups: comp.os.msdos.djgpp From: Peter Berdeklis Subject: Re: 32 bit registers Message-ID: Nntp-Posting-Host: chinook.physics.utoronto.ca Sender: news AT info DOT physics DOT utoronto DOT ca (System Administrator) Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Organization: University of Toronto - Dept. of Physics In-Reply-To: <59t1qo$tv0$1@troll.powertech.no> Date: Thu, 26 Dec 1996 17:07:35 GMT References: <59cs4f$58k AT nr1 DOT ottawa DOT istar DOT net> <19961224 DOT 142048 DOT 4751 DOT 1 DOT chambersb AT juno DOT com> <59t1qo$tv0$1 AT troll DOT powertech DOT no> Lines: 18 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Thu, 26 Dec 1996, Ove Kaaven wrote: > To load the 16-bit value in bx into the high-order word of eax and > preserving everything else, you could try: > > roll $16,%eax > movw %bx,%ax > roll $16,%eax ^^^ should be $17 roll moves the last bit into the carry flag, so you have to roll one more bit (the last time only) to get the bit out of the carry flag and into the MSB of the register. --------------- Peter Berdeklis Dept. of Physics, Univ. of Toronto