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: <59vm0n$7gu$1@troll.powertech.no> Date: Fri, 27 Dec 1996 14:11:56 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> <59vm0n$7gu$1 AT troll DOT powertech DOT no> Lines: 27 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Thu, 26 Dec 1996, Ove Kaaven wrote: > Peter Berdeklis wrote: > > >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. > > Really? I thought that was the behaviour of rcl, not rol, hmm... Forgive me, I misread my reference. rol _copies_ the last bit rotated into the carry flag, it doesn't shift through it as does rcl. It's all getting so blurry! :) --------------- Peter Berdeklis Dept. of Physics, Univ. of Toronto