diff --git a/src/basic/wedge/wedge_dos.s b/src/basic/wedge/wedge_dos.s index 77449da0..c225dee2 100644 --- a/src/basic/wedge/wedge_dos.s +++ b/src/basic/wedge/wedge_dos.s @@ -152,10 +152,11 @@ wedge_dos_command_confirmed: jsr JOPEN +bcs wedge_dos_basic_error - ; Retrieve status, print it if not OK + ; Retrieve status through the channel just opened, print it if not OK. Closing it + ; first would reset the status to OK: CLALL closes every file, and a drive's DOS + ; says OK once its command channel closes - jsr JCLALL - jsr wedge_dos_status_get + jsr wedge_dos_status_get_opened lda BUF+0 cmp #$30 ; '0' @@ -217,6 +218,10 @@ wedge_dos_status_get: jsr JOPEN +bcs wedge_dos_basic_error + ; FALLTROUGH + +wedge_dos_status_get_opened: + ; Set channel for input ldx #$0F