Re: A86: "not" for a byte or bit


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

Re: A86: "not" for a byte or bit



Trent Lillehaugen wrote:
> 
> David Piper wrote:
> 
> > I am making a routine and I need to "not" the byte I am using (or bit
> > will work),  I know that this command is not valid for the Z80...
> >
> > So what do I use to do it.... I need the following results
> >
> > I need to change a (bit or byte) from 0 to 1 and 1 to 0...What is the
> > best way to do this???
> 
> to acheive the same affect do this:
> 
> xor %11111111
> that's the same as
> 'not a'
> 
> ex:
> a   10111011
> xor 11111111
> ---------------
>      01000100

you can also ld the value into a and CPL


References: