diff --git a/libsrc/cbm/read.s b/libsrc/cbm/read.s index 71ba5d713..fb0bb3171 100644 --- a/libsrc/cbm/read.s +++ b/libsrc/cbm/read.s @@ -135,7 +135,7 @@ eof: lda #0 devnotpresent: lda #ENODEV - .byte $2C ; Skip next opcode + jmp __directerrno ; Sets _errno, clears _oserror, returns -1 ; Error entry: The given file descriptor is not valid or not open diff --git a/libsrc/cbm/write.s b/libsrc/cbm/write.s index 04010f2e4..ebc44a0ac 100644 --- a/libsrc/cbm/write.s +++ b/libsrc/cbm/write.s @@ -106,7 +106,7 @@ devnotpresent2: pla devnotpresent: lda #ENODEV - .byte $2C ; Skip next opcode + jmp __directerrno ; Sets _errno, clears _oserror, returns -1 ; Error entry: The given file descriptor is not valid or not open