tne.s 308 B

12345678910111213141516171819202122232425
  1. .define Tne
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! This subroutine tests if the value in registerpair AX is
  8. ! not equal to zero.
  9. ! The value returned is in AX.
  10. Tne:
  11. tay
  12. beq 1f ! A = 0
  13. 2: lda #0 ! AX <> 0
  14. ldx #1
  15. rts
  16. 1: txa
  17. bne 2b ! X <> 0
  18. lda #0 ! AX = 0
  19. tax
  20. rts