This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Conditional with AND and OR logic confusion

I'd like to branch to a certain Label if X=32 -- but only if (N=6 and O=6) or if (N=0 and O=0).

How must I construct that conditional?

Len

ps: Are there any limits to this? Actually, (N=6 and O=6) and (N=0 and O=0) are only two of some 173 conditions that I must state.

Parents
  • "I'd like to branch to a certain Label"

    I take it that means you're writing in Assembler, then?

    If you can't think how to do it directly in Assembler, then try drawing a flowchart, or writing it in pseudo-code; eg,

    if N=6
    {
       // Here, N must be 6
       if O=6
       {
          // Here, both N and O must be six
       }
       else
       {
          // Here, N is 6 but O is not
       }
    }
    

    "some 173 conditions that I must state."

    Sounds like a job for a Table...

    Or, consider the good, old-fashioned techniques for logic minimisation...

Reply
  • "I'd like to branch to a certain Label"

    I take it that means you're writing in Assembler, then?

    If you can't think how to do it directly in Assembler, then try drawing a flowchart, or writing it in pseudo-code; eg,

    if N=6
    {
       // Here, N must be 6
       if O=6
       {
          // Here, both N and O must be six
       }
       else
       {
          // Here, N is 6 but O is not
       }
    }
    

    "some 173 conditions that I must state."

    Sounds like a job for a Table...

    Or, consider the good, old-fashioned techniques for logic minimisation...

Children