www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/27/13:53:22

Newsgroups: comp.os.msdos.djgpp
From: Peter Berdeklis <peter AT atmosp DOT physics DOT utoronto DOT ca>
Subject: Re: 32 bit registers
Message-ID: <Pine.SGI.3.91.961227091018.11029A-100000@chinook.physics.utoronto.ca>
Nntp-Posting-Host: chinook.physics.utoronto.ca
Sender: news AT info DOT physics DOT utoronto DOT ca (System Administrator)
Mime-Version: 1.0
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> <Pine DOT SGI DOT 3 DOT 91 DOT 961226120517 DOT 2924F-100000 AT chinook DOT physics DOT utoronto DOT ca> <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 <peter AT atmosp DOT physics DOT utoronto DOT ca> 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

- Raw text -


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