diff --git a/src/kernal/iec/close_iec.s b/src/kernal/iec/close_iec.s index 16a661c1..3e5c02dc 100644 --- a/src/kernal/iec/close_iec.s +++ b/src/kernal/iec/close_iec.s @@ -23,11 +23,17 @@ close_iec: jsr iec_close_load jmp close_remove_from_table @1: - ora $E0 ; CLOSE command + ; LISTEN, CLOSE, UNLISTEN - see https://www.pagetable.com/?p=1031 + lda FAT, y + jsr LISTEN + bcs close_iec_end + lda SAT, y + ora #$E0 ; CLOSE command sta TBTCNT jsr iec_tx_command bcs close_iec_end jsr iec_tx_command_finalize + jsr UNLSN ; FALLTROUGH