diff --git a/src/kernal/iec/chkin_iec.s b/src/kernal/iec/chkin_iec.s index 6112239f..7ae9b82f 100644 --- a/src/kernal/iec/chkin_iec.s +++ b/src/kernal/iec/chkin_iec.s @@ -14,7 +14,7 @@ chkin_iec: ; Fail if the file is open for writing (secondary address 1) - lda LAT, Y + lda SAT, Y cmp #$01 +beq chkin_file_not_input @@ -24,7 +24,7 @@ chkin_iec: jsr TALK +bcs chkinout_device_not_present - lda LAT, Y + lda SAT, Y ora #$60 jsr TKSA +bcs chkinout_device_not_present diff --git a/src/kernal/iec/ckout_iec.s b/src/kernal/iec/ckout_iec.s index 02719b5f..5141c79b 100644 --- a/src/kernal/iec/ckout_iec.s +++ b/src/kernal/iec/ckout_iec.s @@ -14,7 +14,7 @@ ckout_iec: ; Fail if the file is open for reading (secondary address 0) - lda LAT, Y + lda SAT, Y +beq ckout_file_not_output ; Send LISTEN + SECOND first @@ -23,7 +23,7 @@ ckout_iec: jsr LISTEN +bcs chkinout_device_not_present - lda LAT, Y + lda SAT, Y ora #$60 jsr SECOND +bcs chkinout_device_not_present