Re: A92: learning assembly - real simple question


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

Re: A92: learning assembly - real simple question




to clear the upper word only, you can:
rol.l    #8,d1
clr.w    d1
ror.l    #8,d1

ADAMMAN106@aol.com wrote:

> see below
>
> In a message dated 98-07-29 16:31:33 EDT, you write:
>
> > In a message dated 7/29/98 2:09:50 PM Eastern Daylight Time,
> >  ADAMMAN106@aol.com writes:
> >
> >  > byte: 8 bits
> >  >  word: 2 bytes: 16 bits
> >  >  longword: 2 words: 4 bytes: 32 bits
> >  >
> >  >  byte: 256 range
> >  >  word: 65,536 range
> >  >  longword:4,294,967,296 range
> >
> >  okay then, what is a lower word and an upper word?  if l did:
> >  clr.w    D1
> >  which clears the lower word of D1 then what would D1 look like?  how would
> l
> >  clear the upper word?
>
> sorry, but I don't know any 68K.  but say D1 (which I'll assume for the
> purposes of this is a longword (32 bit) register) was 0xFEDCBA98, then the
> result of clr.w D1 would be FEDC0000
> I couldn't tell you how to clear the upper word, sorry
>
> ~Adamman



--
Anton Ivanov
ivanova@ucs.orst.edu
http://www.geocities.com/CapeCanaveral/Hangar/9136



References: