
             BAPC v3.0 - Conditional expressions           - by A'rpi
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 Rules:
 ~~~~~~
 - The conditional command can be followed by an S or a N character.
   The S sets SIGNED mode, which is necessary for making difference
   between WORD and INTEGER types.
   The N character is a NOT function for the whole condition:
     IF NOT(condition)  =  IFN condition

 - In the condition multiple brackets can be used

 - Logical operators (NOT, AND and OR) can be used

 - Simple conditions:
   equality:
     a=b, a==b   -> equal
     a<>b, a!=b  -> not equal
   algebrical:
     a>b, a<b, a<=b, a=<b, a>=b, a=>b, ab, ab
   logical:
     a&b = bit test. In 'a' the 'b' mask is examined (TEST a,b command)
     a   = boolean.  The same as 'a<>0'

 - Special conditions:
    - KEYPRESSED and KEYPRESSEDP: the same as Pascal, the P at the end
      makes the registers to be saved to the stack.
      The value is TRUE, if there is something in the keyboard-buffer
      REPEAT UNTIL KEYPRESSED
      (remark: in older versions it was buggy in .PMW mode (dpmi))
    - FLAG-s: the flags of the CPU can be exmained like this:
         "FLAG x" or "FLAGx" or "Jx"
      IF FLAG C OR AX<CX THEN ^WRITE_ERROR
      Instead of 'FLAG ' the letter 'J' is enough: IF JC OR AX<CX THEN...
    - sign examination:      IF AX:S THEN ax_negative
                             IF AX:NS THEN ax_not_negative
    - JCXZ - true if CX=0
          IF CXZ THEN cx_null
       the same (but longer) :
          IF CX=0 THEN cx_null
 - IN[] function: IF a IN[b,c,d,e..f,g..,..h] THEN...
      detailed:
      a IN[b,c]     ->   (a=b) OR (A=c)
      a IN[b..c]    ->   (a>=b) AND (a<=c)
      a IN[b..]     ->    a>=b
      a IN[..c]     ->    a<=c
 - NIN[...] = NOT IN[...]

 - if the comparison has more than one part, the condition
   don't have to be written after the first part:
     IF LONGLONGLONGNAME>5 AND <17 THEN...
   If one of the parameters is missing at the comparison, then the last
   used is written there.
   WARNING! It doesn't work with macros!! ( IF MACRONAME>5 AND <17 THEN...)

 - 3 part comparison:
     IF 3<AX<17 THEN...

Remark: - of course at the comparison the 2 parts can't be memory variable
          at the same time, because CMP mem1,mem2 is not allowed!!
          This should be made like this (copying one of them to a register)
          IF AX(MEM1)<MEM2 THEN....
        - if necessary the compiler can change the order of the 2 parameters:
          IF 5<AX THEN   ->  it would be CMP 5,AX but this command doesn't
          exists so it is converted to IF AX>5 , which can be compilated.

