Mail Archives: djgpp/1996/12/26/02:30:52
On Wed, 25 Dec 1996 18:27:46 -0700 Jens Vaasjo
<jvaasjo AT gpu DOT srv DOT ualberta DOT ca> 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
- Raw text -