/**
;; File: relat.C  By: s_dubrovich@yahoo.com
;; Last: 19-Dec-10 04:58:11 PM
;; Prev: 02/08/2010
;; Primary Register := BX, Secondary Register := DX
**/

/* Following are the conditional operators */
/* They compare the secondary register against the primary */
/* and put a value of 1 in the primary if the condition is */
/* true, otherwise they clear the primary register */


cceq()
{
#asm
               ; /* Test for equal */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JZ   $+5
  MOV  BX, 0   ;   /** is false **/
#endasm
}

ccne()
{
#asm
               ; /* Test for not equal */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JNZ  $+5
  MOV  BX, 0   ;   /** is false **/
#endasm
}

cclt()
{
#asm           ; /* Test for less than (signed) */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JL   $+5 
  MOV  BX, 0   ;   /** is false **/
#endasm
}

ccle()
{
#asm           ; /* Test for less than or equal to (signed) */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;  /** assume true **/
  JLE  $+5
  MOV  BX, 0   ;  /** is false **/
#endasm
}

ccgt()
{
#asm           ; /* Test for greater than (signed) */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JG   $+5
  MOV  BX, 0   ;   /** is false **/
#endasm
}

ccge()
{
#asm           ; /* Test for greater than or equal to (signed) */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JGE  $+5
  MOV  BX, 0   ;   /** is false **/
#endasm
}

ccult()
{
#asm           ; /* Test for less than (unsigned) */
  CMP  DX, BX  ;  /** sets flags **/  
  MOV  BX, 1   ;   /** assume true **/
  JB   $+5
  MOV  BX, 0   ;   /** is false **/
#endasm
}

ccule()
{
#asm           ; /* Test for less than or equal to (unsigned) */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JBE  $+5
  MOV  BX, 0   ;   /** is false **/
#endasm
}

ccugt()
{
#asm           ; /* Test for greater than (unsigned) */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JA   $+5
  MOV  BX, 0   ;   /** is false **/
#endasm
}

ccuge()
{
#asm           ; /* Test for greater than or equal to (unsigned) */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JAE  $+5
  MOV  BX, 0   ;   /** is false **/
#endasm
}

/** -= eof relat.c =- **/