Results 1 to 2 of 2
-
01-06-2005, 08:09 PM #1David RabinerGuest
Bit testing/setting syntax when we code pmSystems
Hello, all.
How do we code to test or set a bit. Say x04FE .7 (which I see is
read-only, but I'm pretending).
To set it, it would be something like: x04FE = x04FE + x80 ???
To check it, it would be something like: if x04FE and x80 then .... ???
What is the exact syntax for both of these?
Warm regards,
David
-
01-07-2005, 08:38 AM #2Enrico SchirattiGuest
Re: Bit testing/setting syntax when we code pmSystems
Hi,
I hope I understood you right... things are much simpler than that...
04FE .7 ThisIsMyBit
To set it... use
ThisIsMyBit = 1
To reset it use
ThisIsMyBit = 0
Nothing simpler... if ThisIsMyBit is defined as a bit, you handle it as a
bit. If it is defined as a byte or word, then you would have to manipulate
it as you describe below... but it is not necessary.
Ciao
Enrico
"David Rabiner" wrote in message
news:281848.56024@wb.onvix.com...
> Hello, all.
>
> How do we code to test or set a bit. Say x04FE .7 (which I see is
> read-only, but I'm pretending).
>
> To set it, it would be something like: x04FE = x04FE + x80 ???
>
> To check it, it would be something like: if x04FE and x80 then .... ???
>
> What is the exact syntax for both of these?
>
> Warm regards,
> David
>
Similar Threads
-
USBKeys .ini syntax
By Barrykensett in forum OpenCockpits General DiscussionReplies: 1Last Post: 02-11-2010, 05:41 AM -
FSBUS syntax error in CDK
By mnovak22 in forum I/O Interfacing Hardware and SoftwareReplies: 1Last Post: 03-28-2009, 02:22 PM -
PMSystems SIOC code for 737NG
By B738 in forum PMSystemsReplies: 0Last Post: 03-14-2008, 11:08 PM -
Syntax question
By RalphW in forum PMSystemsReplies: 4Last Post: 01-27-2008, 06:43 AM
It was great listening to this, remembering what a wonderful person and great influence Ian was to...
MyCockpit Podcast "Tips And...