Re : A92: learning assembly - real simple question


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

Re : A92: learning assembly - real simple question




Dans un courrier daté du 03/08/98 21:00:45  , vous avez écrit :

> 
>  l found this in the newbies.txt and does it have an error?  it demonstrates
>  the AND function:
>  
>      76543210 ---------> bit number
>      01010101
>  AND 01111000
>  -------------
>      01111000
>  
>  shouldn't the result be 01010000 ?

Euh... 
Yes ! Sorry. 
Thius will be corrected in the next release.. ( don' t know when: when enough
errors are found. ) 

BTW: 

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

It depends on the typê of data you are handling..
If you are sure that the lower word is smaller than %0111111111111111, then
you could use 
ext.l      d1
Which IS probably faster as it works just on some bits of the register...
However, i am not sure.. Perhaps is the number of clock cycles needed the
same.



Mathieu, <hmlacage@aol.com>