tge.s 292 B

1234567891011121314151617181920212223
  1. .define Tge
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! This subroutine test if the value in registerpair AX is
  8. ! greater than or equal to zero.
  9. ! The result is returned in AX.
  10. Tge:
  11. tay
  12. bpl 1f ! A >= 0
  13. lda #0 ! AX < 0
  14. tax
  15. rts
  16. 1: lda #0 ! AX >= 0
  17. ldx #1
  18. rts