Re : Re: A92: learning assembly - real simple question


[Prev][Next][Index][Thread]

Re : Re: A92: learning assembly - real simple question




Dans un courrier daté du 30/07/98 02:18:19  , vous avez écrit :

> 
>  The simplest way to clear the upper word of d1 is:
>  AND.L #$0000FFFF,d1
>  (as far as I can tell)
>  

This would effectivelly clear the upper word as this would apply the "and"
logical operation on each bit of the operand and of the d1 register.
as 1 and 1 = 1
and as 0 and 1 = 0
and as 1 and 0 = 0
            0 and 0 = 0

This will clear all the bits in the second operand ( d1) where the first
operand ahs bits equal to 0 and will keep the d1 reg as it is where the first
operand is 1

as $0000FFFF = %0000000000000000111111111111111

The result of this:
>  AND.L #$0000FFFF,d1
 will be to clear the upper word.

Hope this makes the thing more clear...

Mathieu, <hmlacage@aol.com>