Date : Mon, 11 Oct 2004 21:58:18 +0100
From : tom@...
Subject: Re: Bit clear
There's no direct way on the BBC B, but you can do this, which is
easy enough:
EOR #&FF \A=NOT A
ORA &70 \set the bit(s)
EOR #&FF \restore A but now with those bit(s) clear.
If you've got a Master 128, its CPU has a newer instruction -- TRB --
which will do this for you.
--Tom
On 11 Oct 2004 at 20:31, Andrew W wrote:
> I'm using the following to set a particular bit of a byte using a
> byte stored at &70.
> ORA &70
> which I think should set the bit in reg.A that is set in &70 shouldn't
> it? In BASIC the line is:
> t4%=(t4% OR (2^__%))
> Hopefully I've got the (2^_%) in &70 AND t4% in 'A'.
> However is there a way of doing bit clear:
> t4%=(t4% AND NOT (2^__%))
> ?
>
> Hope this makes sense.
> regards,
>
>
> A.Weston
> --
>
>