mirror of
https://github.com/a2stuff/prodos-path.git
synced 2024-12-29 11:30:47 +00:00
Handle ON_LINE errors
This commit is contained in:
parent
db4b9547b5
commit
e20c65853d
13
copy.cmd.s
13
copy.cmd.s
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user