;;========================================================60
;; File: EPILOG  .NSM  By: s_dubrovich@yahoo.com
;; Last: 02-Feb-10 10:33:18 PM
;; Prev: 01-Feb-10 11:03:33 PM
;; Init: 10-Jan-10 10:11:21 PM, 16-Jan-10 03:05:46 PM
;; Vers: 0.0.3
;; Note: Epilog to small-c
;;========================================================60
;;========================================================60
;; -= Naming Fixups & RTSystem Calls =-
;;========================================================60
;; *** NOTE! *** for C86NC5C.C, CCN8.C, CCN8A.C
;; 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 */

  [SECTION .cseg]

cceq:          ; /* Test for equal */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JZ   $+5
  MOV  BX, 0   ;   /** is false **/
  RET

ccne:          ; /* Test for not equal */
  CMP  DX, BX  ;  /** sets flags **/
  MOV  BX, 1   ;   /** assume true **/
  JNZ  $+5
  MOV  BX, 0   ;   /** is false **/
  RET

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

ccle:          ; /* 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 **/

  RET

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

ccge:          ; /* 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 **/
  RET

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

ccule:         ; /* 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 **/
  RET

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

ccuge:         ; /* 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 **/
  RET

;;========================================================60
;; -= L A S T   C O D E =-
;;========================================================60
  [SECTION .cseg]
;; -= mark end of last .cseg with.. =-
 align 16, db 0
 EOcseg EQU ($-$$)

;;========================================================60
;; -= L A S T   D A T A =-
;;========================================================60
;; -= mark the end of the last .dseg with.. =-
  [SECTION .dseg]
 align 16, db 0
  ;; was FFFEh(nak) -> FF00h(ok) -> FFF0h(ok), use FFEEh.
Stk_Base: TIMES ((0FFEEh - ($-$$))-(EOcseg+100h)) db 0CCh
Stk_Top:
Sz_Mod:  dw STUB_COM_Size
 EOdseg EQU ($-$$)
;;--------------------------------------------------------60
 STUB_COM_Size EQU (0100h + EOcseg + EOdseg)
;;========================================================60
;; - =   E O   E P I L O G   = -
;;========================================================60

8:52 PM 4/6/2011