Missing command?

AndyGadget

Senior Member
On the X1 and X2 chips we have the commands for manipulating a single bit in a byte or word variable - SETBIT, CLEARRBIT and TOGGLEBIT, but no TESTBIT. This is easy enough to do with an AND and a temporary variable, but TESTBIT would be much cleaner.

Or am I missing something?

Andy.
 

BeanieBots

Moderator
Glad you found it. (and let us know)
That's why I always suggest that people read the entire manual.
It's quite natural to think "testbit" would be the required command but a full knowledge of all the commands even if not required right now can be very useful later on when wondering how/if something can be done.
 

westaust55

Moderator
And . . . with that particular command structure,
in PE V5.2.10, rev Ed has corrected the problem with the ELSEIF part

So a good reason to ensure that you are always using the latest version of the Programming Editor
 
Top