home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_26_1988_Transactor_Publishing.d64
/
ciatest64.ml
< prev
next >
Wrap
Text File
|
2023-02-26
|
2KB
|
51 lines
9000 ;"ciatest64.ml"
9010 * =$3200 ;12800
9020 n lda #$54
9030 ldx #$62
9040 bit $fb ;doing timer b?
9050 bmi tb1 ;yes
9060 tax ;no, switch a,x
9070 lda #$62
9080 tb1 ldy #$03
9090 sta $dd04 ;timer a
9100 sty $dd05
9110 stx $dd06 ;timer b
9120 sty $dd07
9130 lda #$11 ;start both
9140 sta $dd0e
9150 sta $dd0f
9160 ldx #$02 ;timer b flag
9170 ldy #$07 ; and hi byte
9180 bit $fb ;doing timer b?
9190 bmi tb2 ;yes
9200 dex ;timer a flag
9210 ldy #$05 ; and hi byte
9220 tb2 stx $fc
9230 sty before+1 ;overwrite
9240 sty after+1
9250 txa ;enable the
9260 eor #$83 ; other timer
9270 ldx #<newnmi
9280 ldy #>newnmi
9290 stx $0318
9300 sty $0319
9310 ldx $dd0d ;clear flags
9320 sta $dd0d ;set enable
9330 rts
9340 newnmi pha
9350 txa
9360 pha
9370 tya
9380 before ldy $dd07 ;sample hi byte
9390 pha
9400 lda $dd0d ;read register
9410 cld
9420 after cpy $dd07 ;timeout?
9430 bcs exit ;no
9440 ora $dd0d ;read again
9450 and $fc ;was flag set?
9460 bne exit ;yes
9470 lda #$2a ;no, print "*"
9480 jsr $ffd2
9490 exit jmp $febc ;do regs, rti