To: djgpp AT delorie DOT com Subject: Re: 32 bit registers Message-ID: <19961226.230751.4975.5.chambersb@juno.com> References: <59cs4f$58k AT nr1 DOT ottawa DOT istar DOT net> <19961224 DOT 142048 DOT 4751 DOT 1 DOT chambersb AT juno DOT com> From: chambersb AT juno DOT com (Benjamin D Chambers) Date: Thu, 26 Dec 1996 02:03:31 EST On Wed, 25 Dec 1996 18:27:46 -0700 Jens Vaasjo writes: >Benjamin D Chambers wrote: >> >> Thanx to everyone who suggested methods of swapping words in a >dword... >> The catch is, I didn't really need to know :) >> My original question was if there were a way to load a word into the >high >> word of a register. >> >> Thanx anyways, though, just proves charity lives on :) >> >> ..Chambers > >I think u just load it into the low word and shll (shift left it). >let say u wanted to put 5 in the high byte of ecx. > >asm("movl $5,%cx\n > shll $16,%ecx\n > " > : > : > :"ecx","cc" > ); > > >Jens. > Perhaps I didn't make myself clear: I already know every trick mentioned :) I am asking about loading a word DIRECTLY into the high word. As in, no shifts, no and's, no or's, nothing. Just a simple move. I already knew everything everyone said - what I wanted to know was whether the high word could be targeted directly. Sorry for the redundency, some people seem to think I still need to know a nifty trick involving two or three op's. Thanx anyways, though. ...Chambers