Results 1 to 2 of 2
  1. #1
    David Rabiner
    Guest

    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


  2. #2
    Enrico Schiratti
    Guest

    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

  1. USBKeys .ini syntax
    By Barrykensett in forum OpenCockpits General Discussion
    Replies: 1
    Last Post: 02-11-2010, 05:41 AM
  2. FSBUS syntax error in CDK
    By mnovak22 in forum I/O Interfacing Hardware and Software
    Replies: 1
    Last Post: 03-28-2009, 02:22 PM
  3. PMSystems SIOC code for 737NG
    By B738 in forum PMSystems
    Replies: 0
    Last Post: 03-14-2008, 11:08 PM
  4. Syntax question
    By RalphW in forum PMSystems
    Replies: 4
    Last Post: 01-27-2008, 06:43 AM