Re: A89: dumb question
[Prev][Next][Index][Thread]
Re: A89: dumb question
S43R80@aol.com wrote:
>
> In a message dated 99-06-18 20:50:41 EDT, you write:
>
> > Assuming, that 'whatever' happens to be on an even address, otherwise
> > a surprise package with big red 'address error exception' stamped
> > all over it will arrive in an instant ...
> >
> > Zoltan
> >
> i don't think "clr.x" has anything to do with even/odd addresses at all...if
> i'm not mistaken i believe you are mistaken...
> i think but am not sure that the only time you have to worry about odd
> address is if you may be writing to one...then you will get that big red
> error you were refering to =)
no, he is right! first, clr do write to memory (how else would it clear it?) and
second, it applies to reads too..
all instuctions that work with w or l requiers even addresses..
but, if you just write one dc.b in your code, the assembler will automagically
align it.
BUT if you though write like this:
foo dc.b xx
whatev dc.b yy
bar dc.b zz
and tried to clr.w whatev, then you would get an address error...
//Olle
References: