diff --git a/c64/basic/cmd_unimplemented.s b/c64/basic/cmd_unimplemented.s index 7331289c..00b93317 100644 --- a/c64/basic/cmd_unimplemented.s +++ b/c64/basic/cmd_unimplemented.s @@ -86,6 +86,16 @@ cmd_unimplemented: ;; Try to open an IEC file jsr $ffc0 + bcc + + + ;; A = KERNAL error code, which also almost match + ;; basic ERROR codes, so we can just copy the + ;; error code to X, decrement, and handle normally + tax + dex + jmp do_basic_error + +* sta $0427 lda #$00 ror diff --git a/c64/basic/do_basic_error.s b/c64/basic/do_basic_error.s index cadbe691..f466f79d 100644 --- a/c64/basic/do_basic_error.s +++ b/c64/basic/do_basic_error.s @@ -125,7 +125,7 @@ do_TO_MANY_FILES_error: ;; Error # in X -;; do_basic_error: +do_basic_error: ;; "?" txa pha