actually try 255 times before giving up when waiting for talker turnaround.
This commit is contained in:
1 parent
84841ab283
commit
d0932029bb
1 file changed
+3
-7
@@ -3,29 +3,25 @@
|
|||||||
|
|
||||||
iec_turnaround_to_listen:
|
iec_turnaround_to_listen:
|
||||||
|
|
||||||
jsr printf
|
|
||||||
.byte "DOING TURNAROUND",$0d,0
|
|
||||||
|
|
||||||
;; Assert data and release clock
|
;; Assert data and release clock
|
||||||
lda $dd00
|
lda $dd00
|
||||||
sta $0420
|
sta $0420
|
||||||
and #$ef ; release clock (bit 4)
|
and #$ef ; release clock (bit 4)
|
||||||
ora #$20 ; assert data (bit 5)
|
ora #$20 ; assert data (bit 5)
|
||||||
sta $dd00
|
sta $dd00
|
||||||
|
|
||||||
;; Wait for clock line to be asserted by the drive
|
;; Wait for clock line to be asserted by the drive
|
||||||
* lda $dd00
|
* lda $dd00
|
||||||
sta $0421
|
sta $0421
|
||||||
and #$40
|
and #$40
|
||||||
bne -
|
bne -
|
||||||
|
|
||||||
;; Wait for clk to be released by the drive to mark ready to talk
|
|
||||||
ldx #$ff
|
ldx #$ff
|
||||||
* lda $dd00
|
* lda $dd00
|
||||||
and #$40
|
and #$40
|
||||||
bne +
|
bne +
|
||||||
dex
|
dex
|
||||||
beq -
|
bne -
|
||||||
|
|
||||||
jsr printf
|
jsr printf
|
||||||
.byte "TURNAROUND FAILED - FILE NOT FOUND?",$0d,$00
|
.byte "TURNAROUND FAILED - FILE NOT FOUND?",$0d,$00
|
||||||
|
|||||||
Reference in new issue
Block a user