home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_26_1988_Transactor_Publishing.d64 / ciatest64.ml < prev    next >
Text File  |  2023-02-26  |  2KB  |  51 lines

  1. 9000  ;"ciatest64.ml"
  2. 9010  *       =$3200         ;12800
  3. 9020  n       lda #$54
  4. 9030          ldx #$62
  5. 9040          bit $fb        ;doing timer b?
  6. 9050          bmi tb1        ;yes
  7. 9060          tax            ;no, switch a,x
  8. 9070          lda #$62
  9. 9080  tb1     ldy #$03
  10. 9090          sta $dd04      ;timer a
  11. 9100          sty $dd05
  12. 9110          stx $dd06      ;timer b
  13. 9120          sty $dd07
  14. 9130          lda #$11       ;start both
  15. 9140          sta $dd0e
  16. 9150          sta $dd0f
  17. 9160          ldx #$02       ;timer b flag
  18. 9170          ldy #$07       ;  and hi byte
  19. 9180          bit $fb        ;doing timer b?
  20. 9190          bmi tb2        ;yes
  21. 9200          dex            ;timer a flag
  22. 9210          ldy #$05       ;  and hi byte
  23. 9220  tb2     stx $fc
  24. 9230          sty before+1   ;overwrite
  25. 9240          sty after+1
  26. 9250          txa            ;enable the
  27. 9260          eor #$83       ;  other timer
  28. 9270          ldx #<newnmi
  29. 9280          ldy #>newnmi
  30. 9290          stx $0318
  31. 9300          sty $0319
  32. 9310          ldx $dd0d      ;clear flags
  33. 9320          sta $dd0d      ;set enable
  34. 9330          rts
  35. 9340  newnmi  pha
  36. 9350          txa
  37. 9360          pha
  38. 9370          tya
  39. 9380  before  ldy $dd07      ;sample hi byte
  40. 9390          pha
  41. 9400          lda $dd0d      ;read register
  42. 9410          cld
  43. 9420  after   cpy $dd07      ;timeout?
  44. 9430          bcs exit       ;no
  45. 9440          ora $dd0d      ;read again
  46. 9450          and $fc        ;was flag set?
  47. 9460          bne exit       ;yes
  48. 9470          lda #$2a       ;no, print "*"
  49. 9480          jsr $ffd2
  50. 9490  exit    jmp $febc      ;do regs, rti
  51.