[A89] Re: Setting bit fields


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

[A89] Re: Setting bit fields




It depends on the situation...
if you are only dealing with one bit, then using bset, and bclr is a good
idea.... other wise, AND and OR will probably be the better choice

-Greg
GForce Programming - http://hosted.calc.org/~gforce/

----- Original Message -----
From: "Gijs Leegwater" <g_leegwater@hotmail.com>
To: <assembly-89@lists.ticalc.org>
Sent: Thursday, February 28, 2002 1:29 PM
Subject: [A89] Setting bit fields


>
> Hi,
>
> I want to change some things in the I/O ports. $600015. But i dont want to
> change all bits. What is the most used way to do this? Set all individual
> bits? AND all bits to be reset with 0 and OR the bits to be set with 1? Or
> should I just move a byte over there? I'don't know if that's safe, because
> the meaning of bit 6 is not well defined:
> 6: -(HW2:?)
>
> Bye
> Cheiz
>
>






References: