Handle ON_LINE errors

This commit is contained in:
Joshua Bell 2021-04-14 22:27:39 -07:00
parent db4b9547b5
commit e20c65853d
2 changed files with 11 additions and 3 deletions

View File

@ -59,6 +59,8 @@ execute:
;; /ABS,REL remains /ABS,REL (still relative!).
jsr get_prefix
bcs rts1
lda VPATH1
ldx VPATH1+1
jsr fix_path
@ -214,6 +216,7 @@ finish: jsr close
.endproc
;;; Leave PREFIX at INBUF; infers it the same way as BI if empty.
;;; Returns with Carry set on failure.
.proc get_prefix
;; Try fetching prefix
MLI_CALL GET_PREFIX, get_prefix_params
@ -234,8 +237,11 @@ finish: jsr close
;; Get volume name and convert to path
MLI_CALL ON_LINE, on_line_params
;; TODO: Handle failure
lda INBUF+1
bcc :+
jsr BADCALL ; sets Carry
rts
: lda INBUF+1
and #$0F ; mask off name_len
tax
inx ; leading and trailing '/'
@ -245,7 +251,8 @@ finish: jsr close
sta INBUF+1 ; leading '/'
sta INBUF,x ; trailing '/'
done: rts
done: clc
rts
get_prefix_params:
.byte 1

View File

@ -78,6 +78,7 @@ VPATH2 := $BE6E ; Pathname 2 buffer (RENAME)
GOSYSTEM := $BE70 ; Use instead of MLI
BADCALL := $BE8B ; convert MLI errors into BI equivalents
XRETURN := $BE9E ; Handy RTS