2016-11-01 21:37:12 +00:00
|
|
|
|
NEW
|
2019-09-19 15:22:14 +00:00
|
|
|
|
AUTO 3,1
|
2016-11-01 21:37:12 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2017-02-24 16:34:02 +00:00
|
|
|
|
X.COPY.BUF.SIZE .EQ 4096
|
2017-02-21 17:01:30 +00:00
|
|
|
|
*--------------------------------------
|
2019-10-12 14:20:09 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
|
|
|
|
ZPPtr1 .BS 2
|
|
|
|
|
ZPPtr2 .BS 2
|
|
|
|
|
ZPFileName .BS 2
|
|
|
|
|
ZPFileStat .BS 2
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
|
|
|
|
bContinue .BS 1
|
|
|
|
|
bRecurse .BS 1
|
|
|
|
|
bQuiet .BS 1
|
|
|
|
|
.DO X.COPY.TO.DEST=1
|
|
|
|
|
bNoConfirm .BS 1
|
|
|
|
|
.FIN
|
2019-10-12 14:20:09 +00:00
|
|
|
|
ZS.END .ED
|
2016-11-01 21:37:12 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* File Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA 0
|
2017-10-03 15:33:30 +00:00
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
2018-08-11 10:57:57 +00:00
|
|
|
|
.DA #64 SS
|
2019-10-12 14:20:09 +00:00
|
|
|
|
.DA #ZS.END-ZS.START Zero Page Size
|
2016-11-01 21:37:12 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
2019-10-03 06:25:27 +00:00
|
|
|
|
*--------------------------------------
|
2016-11-01 21:37:12 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
2021-06-27 13:48:04 +00:00
|
|
|
|
.DA CS.DOEVENT
|
2016-11-01 21:37:12 +00:00
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.MSG.USAGE .DA MSG.USAGE
|
|
|
|
|
L.MSG.DIR .DA MSG.DIR
|
2020-02-29 14:06:28 +00:00
|
|
|
|
L.MSG.REG .DA MSG.REG
|
2017-02-24 16:34:02 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-06-27 20:37:45 +00:00
|
|
|
|
L.MSG.OVERWRITE .DA MSG.OVERWRITE
|
2017-02-24 16:34:02 +00:00
|
|
|
|
.FIN
|
2016-11-01 21:37:12 +00:00
|
|
|
|
L.MSG.OK .DA MSG.OK
|
|
|
|
|
L.MSG.ERR .DA MSG.ERR
|
2019-10-28 06:32:12 +00:00
|
|
|
|
L.MSG.CRLF .DA MSG.CRLF
|
2017-06-21 15:46:43 +00:00
|
|
|
|
L.MSG.DONE .DA MSG.DONE
|
2016-11-01 21:37:12 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2019-10-03 06:25:27 +00:00
|
|
|
|
CS.INIT
|
2017-10-03 15:33:30 +00:00
|
|
|
|
.1 >INC.G ArgCount
|
2018-10-16 15:48:03 +00:00
|
|
|
|
>SYSCALL ArgV
|
2017-10-03 15:33:30 +00:00
|
|
|
|
bcs .7
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2016-11-01 21:37:12 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
cmp #'-'
|
|
|
|
|
bne .4
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2018-08-11 10:57:57 +00:00
|
|
|
|
ldy #1
|
2016-11-01 21:37:12 +00:00
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
ldy #OptionVars-OptionList-1
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
.2 cmp OptionList,y
|
2016-11-01 21:37:12 +00:00
|
|
|
|
beq .3
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
|
|
|
|
dey
|
2019-10-28 06:32:12 +00:00
|
|
|
|
bpl .2
|
2016-11-13 21:03:31 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
.99 >PUSHW L.MSG.USAGE
|
|
|
|
|
>PUSHBI 0
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2018-10-21 20:54:07 +00:00
|
|
|
|
lda #E.SYN
|
2016-11-01 21:37:12 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
.3 ldx OptionVars,y
|
|
|
|
|
* sec
|
|
|
|
|
ror $0,x
|
2016-11-01 21:37:12 +00:00
|
|
|
|
bra .1
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2018-08-11 10:57:57 +00:00
|
|
|
|
.4 >LDA.G index
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2016-11-08 16:56:05 +00:00
|
|
|
|
bne .5 Already have a Src dir...
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.ELSE
|
|
|
|
|
bne .99
|
|
|
|
|
.FIN
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2016-11-08 16:56:05 +00:00
|
|
|
|
>LDYA ZPPtr1
|
2017-07-05 14:45:19 +00:00
|
|
|
|
jsr InitSrcDirYA
|
2016-11-08 16:56:05 +00:00
|
|
|
|
bcc .1 success, scan for any other args
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-23 14:55:47 +00:00
|
|
|
|
.9 rts
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.5 >LDA.G hDstBasePath
|
2016-11-08 16:56:05 +00:00
|
|
|
|
bne .99 we already have a second arg....error!
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2016-11-08 16:56:05 +00:00
|
|
|
|
>LDYA ZPPtr1
|
|
|
|
|
jsr InitDstDirYA
|
|
|
|
|
bcc .1 success, scan for any other args
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2016-11-08 16:56:05 +00:00
|
|
|
|
rts
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.FIN
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
.7 >LDA.G index processed all args
|
2016-11-08 16:56:05 +00:00
|
|
|
|
beq .99 , no src ? ERROR
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2019-10-03 06:25:27 +00:00
|
|
|
|
>LDA.G hDstBasePath
|
2016-11-08 16:56:05 +00:00
|
|
|
|
bne .8 we also have a Dst folder
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2019-10-12 14:20:09 +00:00
|
|
|
|
ldy #S.PS.hCWD no dst folder, use actual prefix
|
2020-02-28 07:21:46 +00:00
|
|
|
|
lda (pPS),y
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2016-11-08 16:56:05 +00:00
|
|
|
|
jsr InitDstDirYA
|
|
|
|
|
bcs .99
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.FIN
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-06-28 14:34:11 +00:00
|
|
|
|
.8 >LDYAI 256
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL GetMem
|
2017-06-27 16:00:32 +00:00
|
|
|
|
bcs .9
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
txa
|
2017-10-04 15:12:03 +00:00
|
|
|
|
>STA.G hSrcFullPath
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-06-28 14:34:11 +00:00
|
|
|
|
>LDYAI 256
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL GetMem
|
2017-06-27 16:00:32 +00:00
|
|
|
|
bcs .9
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
txa
|
2017-10-04 15:12:03 +00:00
|
|
|
|
>STA.G hDstFullPath
|
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
.FIN
|
2016-11-01 21:37:12 +00:00
|
|
|
|
clc
|
2019-02-21 16:26:21 +00:00
|
|
|
|
CS.INIT.RTS rts
|
2016-11-01 21:37:12 +00:00
|
|
|
|
*--------------------------------------
|
2019-02-21 16:26:21 +00:00
|
|
|
|
CS.RUN ldy #S.PS.hStdIn
|
|
|
|
|
lda (pPS),y
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL FEOF
|
2019-02-21 16:26:21 +00:00
|
|
|
|
bcs CS.INIT.RTS I/O error
|
|
|
|
|
tay
|
2019-05-02 09:52:32 +00:00
|
|
|
|
bne .15
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2019-02-21 16:26:21 +00:00
|
|
|
|
>SYSCALL GetChar
|
|
|
|
|
bcs CS.INIT.RTS I/O error
|
2017-02-20 17:16:23 +00:00
|
|
|
|
cmp #$03 Ctrl-C
|
2017-02-22 16:32:02 +00:00
|
|
|
|
bne .10
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-22 16:32:02 +00:00
|
|
|
|
sec
|
|
|
|
|
rts Abort....
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.10 cmp #$13 Ctrl-S
|
2018-11-17 17:17:13 +00:00
|
|
|
|
bne .15
|
2016-11-01 21:37:12 +00:00
|
|
|
|
|
2019-10-12 14:20:09 +00:00
|
|
|
|
>LDA.G bPause
|
2017-02-20 17:16:23 +00:00
|
|
|
|
eor #$ff
|
|
|
|
|
sta (pData),y
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
|
|
|
|
.15 >LDA.G bPause
|
2017-02-24 07:46:53 +00:00
|
|
|
|
bpl .1
|
2019-04-30 16:08:47 +00:00
|
|
|
|
|
2017-06-28 14:34:11 +00:00
|
|
|
|
.8 clc
|
2017-02-24 07:46:53 +00:00
|
|
|
|
rts
|
2017-06-28 15:34:36 +00:00
|
|
|
|
*--------------------------------------
|
2017-02-21 17:01:30 +00:00
|
|
|
|
.1 .DO X.COPY.TO.DEST=1
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2019-10-12 14:20:09 +00:00
|
|
|
|
>LDA.G bCopy
|
2017-06-28 15:34:36 +00:00
|
|
|
|
beq .2
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2017-06-28 14:34:11 +00:00
|
|
|
|
jsr CS.RUN.Copy
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
|
|
|
|
>LDA.G bCopy Copy completed ?
|
2017-06-28 15:34:36 +00:00
|
|
|
|
bne .8 no.....exit
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-06-28 15:34:36 +00:00
|
|
|
|
clc
|
2021-06-27 13:48:04 +00:00
|
|
|
|
>LDA.G CopyRC
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-06-28 15:34:36 +00:00
|
|
|
|
.DO X.DELETE.SOURCE=0
|
|
|
|
|
beq .20 no copy error
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-28 14:34:11 +00:00
|
|
|
|
sec
|
|
|
|
|
jsr CS.RUN.CheckErr we have an error....
|
|
|
|
|
bcs .9
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-28 15:34:36 +00:00
|
|
|
|
jmp CS.RUN.NEXT
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-06-28 15:34:36 +00:00
|
|
|
|
.20 jsr CS.RUN.CheckErr Success!!
|
|
|
|
|
jsr CS.RUN.IncCount
|
|
|
|
|
jmp CS.RUN.NEXT
|
|
|
|
|
.ELSE
|
|
|
|
|
beq .2
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-28 15:34:36 +00:00
|
|
|
|
sec
|
|
|
|
|
jsr CS.RUN.CheckErr we have an error....
|
|
|
|
|
bcc .21
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-28 15:34:36 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2018-08-11 10:57:57 +00:00
|
|
|
|
.21 >STZ.G hToDelete Cancel delete if any
|
2017-06-28 15:34:36 +00:00
|
|
|
|
jmp CS.RUN.NEXT
|
2017-06-28 14:34:11 +00:00
|
|
|
|
.FIN
|
2017-02-21 17:01:30 +00:00
|
|
|
|
.FIN
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-02-23 07:42:48 +00:00
|
|
|
|
.2 .DO X.DELETE.SOURCE=1
|
2019-10-12 14:20:09 +00:00
|
|
|
|
>LDA.G hToDelete
|
2017-02-22 16:32:02 +00:00
|
|
|
|
beq .3
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-02-24 07:46:53 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
2017-06-28 14:34:11 +00:00
|
|
|
|
|
2017-06-28 15:34:36 +00:00
|
|
|
|
ldy #hSrcFullPath
|
2017-06-30 15:11:29 +00:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL Remove
|
2017-06-28 15:34:36 +00:00
|
|
|
|
bcs .22
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2017-06-30 15:11:29 +00:00
|
|
|
|
jsr CS.RUN.CheckErr Success!!!
|
2017-06-28 15:34:36 +00:00
|
|
|
|
jsr CS.RUN.IncCount
|
|
|
|
|
jmp CS.RUN.NEXT
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-28 15:34:36 +00:00
|
|
|
|
.22 jsr CS.RUN.CheckErr
|
2017-02-26 18:34:00 +00:00
|
|
|
|
bcs .9
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
jmp CS.RUN.NEXT
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.FIN
|
2017-06-28 15:34:36 +00:00
|
|
|
|
*--------------------------------------
|
2017-02-26 18:34:00 +00:00
|
|
|
|
.3 jsr GetEntry
|
2017-02-24 16:34:02 +00:00
|
|
|
|
bcs CS.RUN.LEAVE
|
2019-04-30 16:08:47 +00:00
|
|
|
|
jsr FilterMatch
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
bcs CS.RUN.NEXT no match, skip....
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.4 ldy #S.STAT.MODE+1
|
2017-02-24 16:34:02 +00:00
|
|
|
|
lda (ZPFileStat),y
|
2020-03-03 16:44:52 +00:00
|
|
|
|
and #$70
|
2020-02-29 14:06:28 +00:00
|
|
|
|
bne .5 REG file ?
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
jsr CS.RUN.BuildFilePath
|
|
|
|
|
jmp CS.RUN.REG
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.5 cmp /S.STAT.MODE.DIR DIR ?
|
|
|
|
|
bne .7
|
2017-02-20 17:16:23 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
bit bRecurse
|
2017-02-26 18:34:00 +00:00
|
|
|
|
bpl CS.RUN.NEXT
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2018-11-05 16:28:40 +00:00
|
|
|
|
lda (ZPFileName)
|
2017-02-24 16:34:02 +00:00
|
|
|
|
cmp #'.'
|
2017-02-26 18:34:00 +00:00
|
|
|
|
beq CS.RUN.NEXT Skip "." & ".."
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
jsr CS.RUN.BuildFilePath
|
2017-02-24 07:46:53 +00:00
|
|
|
|
jmp CS.RUN.DIR
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-02-29 14:06:28 +00:00
|
|
|
|
.7 lda #MLI.E.UNSUPST
|
2017-02-24 07:46:53 +00:00
|
|
|
|
sec
|
2017-02-24 16:34:02 +00:00
|
|
|
|
.9 rts
|
2017-02-22 16:32:02 +00:00
|
|
|
|
*--------------------------------------
|
2017-07-01 13:45:53 +00:00
|
|
|
|
CS.RUN.CR.NEXT jsr CS.RUN.CR
|
2017-02-26 18:34:00 +00:00
|
|
|
|
CS.RUN.NEXT jsr GetNextEntry
|
|
|
|
|
bcs CS.RUN.LEAVE
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-02-24 16:34:02 +00:00
|
|
|
|
CS.RUN.LEAVE jsr LeaveSubDir exit this sub dir....
|
2017-02-24 07:46:53 +00:00
|
|
|
|
bcs .99 base, we are done, exit
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
jsr BasePath..
|
2016-11-13 21:03:31 +00:00
|
|
|
|
.DO X.DELETE.SOURCE=1
|
2019-05-02 09:52:32 +00:00
|
|
|
|
* .DO X.COPY.TO.DEST=0
|
2017-02-24 07:46:53 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
jsr GetEntry
|
2017-06-28 14:34:11 +00:00
|
|
|
|
jsr CS.RUN.BuildFilePath
|
2017-06-30 15:11:29 +00:00
|
|
|
|
jsr CS.RUN.DIR.MSG
|
2021-06-27 13:48:04 +00:00
|
|
|
|
bcs CS.RUN.LEAVE.RTS
|
2017-02-24 07:46:53 +00:00
|
|
|
|
|
2019-02-28 09:55:51 +00:00
|
|
|
|
ldy #hSrcFullPath
|
|
|
|
|
jsr CS.RUN.GetPathY
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL Remove
|
2017-02-22 16:32:02 +00:00
|
|
|
|
jsr CS.RUN.CheckErr
|
2016-11-13 21:03:31 +00:00
|
|
|
|
bcs .99
|
2019-05-02 09:52:32 +00:00
|
|
|
|
* .FIN
|
2017-02-24 07:46:53 +00:00
|
|
|
|
.FIN
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
jmp CS.RUN.NEXT
|
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
.99 bit bQuiet
|
2017-06-23 12:04:39 +00:00
|
|
|
|
bmi .91
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW L.MSG.DONE
|
2017-06-23 12:04:39 +00:00
|
|
|
|
ldy #Count+1
|
2017-06-21 15:46:43 +00:00
|
|
|
|
>PUSHB (pData),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (pData),y
|
2018-08-23 15:16:20 +00:00
|
|
|
|
>PUSHBI 2
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2017-06-23 12:04:39 +00:00
|
|
|
|
.91 ldy #RC
|
2017-02-26 18:34:00 +00:00
|
|
|
|
lda (pData),y get global RC in case of bContinue
|
2016-11-01 21:37:12 +00:00
|
|
|
|
sec
|
2017-06-27 16:00:32 +00:00
|
|
|
|
CS.RUN.LEAVE.RTS
|
|
|
|
|
rts
|
2016-11-01 21:37:12 +00:00
|
|
|
|
*--------------------------------------
|
2019-02-28 09:55:51 +00:00
|
|
|
|
CS.RUN.DIR .DO X.COPY.TO.DEST=1
|
|
|
|
|
jsr CS.RUN.DIR.MSG
|
2017-06-27 16:00:32 +00:00
|
|
|
|
bcs CS.RUN.LEAVE.RTS
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.StatDst
|
2017-02-26 18:34:00 +00:00
|
|
|
|
bcs .3 File Not exists...go create
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
bit bNoConfirm
|
2017-02-26 18:34:00 +00:00
|
|
|
|
bmi .21 no prompt, nothing to create, enter subdir
|
2020-02-29 14:06:28 +00:00
|
|
|
|
|
2017-06-30 15:11:29 +00:00
|
|
|
|
jsr CS.RUN.OVERWRITE.MSG
|
2017-02-27 14:18:03 +00:00
|
|
|
|
bcs CS.RUN.DIR.RTS
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.1 >SLEEP
|
2017-10-03 15:33:30 +00:00
|
|
|
|
>SYSCALL GetChar
|
2017-02-24 16:34:02 +00:00
|
|
|
|
bcs .1
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
cmp #3
|
|
|
|
|
beq .99 abort
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2019-10-11 13:06:33 +00:00
|
|
|
|
jsr CS.RUN.ToUpper
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
cmp #'N'
|
2017-02-26 18:34:00 +00:00
|
|
|
|
bne .2
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
jmp CS.RUN.CR.NEXT no overwrite, nothing to do, no recurse
|
|
|
|
|
.2 cmp #'Y'
|
|
|
|
|
beq .21 no create, but recurse
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
cmp #'A'
|
|
|
|
|
bne .1
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
|
|
|
|
* sec
|
|
|
|
|
ror bNoConfirm
|
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
.21 clc
|
|
|
|
|
lda #0
|
|
|
|
|
bra .4
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
.3 ldy #hDstFullPath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2020-02-29 14:06:28 +00:00
|
|
|
|
ldy #S.STAT.MODE+1
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
>PUSHA
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL MKDir
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
.4 jsr CS.RUN.CheckErr
|
2017-02-27 14:18:03 +00:00
|
|
|
|
bcs CS.RUN.DIR.RTS
|
2019-04-29 15:47:17 +00:00
|
|
|
|
jsr CS.RUN.IncCount
|
2017-02-21 17:01:30 +00:00
|
|
|
|
.FIN
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2019-04-29 15:47:17 +00:00
|
|
|
|
>LDYA ZPFileName
|
2016-11-01 21:37:12 +00:00
|
|
|
|
jmp EnterSubDirYA
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
.99 ldy #RC
|
2017-06-21 15:46:43 +00:00
|
|
|
|
lda (pData),y get global RC in case of bContinue
|
2017-02-24 16:34:02 +00:00
|
|
|
|
sec
|
2017-02-27 14:18:03 +00:00
|
|
|
|
CS.RUN.DIR.RTS rts
|
2016-11-01 21:37:12 +00:00
|
|
|
|
*--------------------------------------
|
2021-06-26 20:24:25 +00:00
|
|
|
|
CS.RUN.REG ldx #2
|
|
|
|
|
jsr CS.RUN.REG.MSG
|
2017-02-27 14:18:03 +00:00
|
|
|
|
bcs CS.RUN.DIR.RTS
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2017-06-30 15:11:29 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.StatDst
|
2017-02-24 16:34:02 +00:00
|
|
|
|
bcs .2 File Not exists...go create
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
bit bNoConfirm
|
|
|
|
|
bmi .2 no prompt, overwrite
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-06-30 15:11:29 +00:00
|
|
|
|
jsr CS.RUN.OVERWRITE.MSG
|
2017-02-24 16:34:02 +00:00
|
|
|
|
bcs .9
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.1 >SLEEP
|
2017-10-03 15:33:30 +00:00
|
|
|
|
>SYSCALL GetChar
|
2017-02-24 16:34:02 +00:00
|
|
|
|
bcs .1
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
cmp #3
|
|
|
|
|
beq .99 abort
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2019-10-11 13:06:33 +00:00
|
|
|
|
jsr CS.RUN.ToUpper
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
cmp #'N'
|
|
|
|
|
bne .11
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
jmp CS.RUN.CR.NEXT no overwrite exit
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-23 12:04:39 +00:00
|
|
|
|
.90 rts
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
.11 cmp #'Y'
|
|
|
|
|
beq .12 copy
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-24 16:34:02 +00:00
|
|
|
|
cmp #'A'
|
|
|
|
|
bne .1
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
|
|
|
|
* sec
|
|
|
|
|
ror bNoConfirm
|
|
|
|
|
|
2021-06-27 13:48:04 +00:00
|
|
|
|
.12 jsr GetEntry get back current entry corrupted by SLEEP
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-06-21 15:46:43 +00:00
|
|
|
|
.2 .DO X.DELETE.SOURCE=1 mv file, check if srcbase=dstbase
|
|
|
|
|
ldy #hSrcBasePath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2017-06-21 15:46:43 +00:00
|
|
|
|
ldy #hDstBasePath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2018-12-17 15:21:32 +00:00
|
|
|
|
>SYSCALL StrCaseCmp
|
2017-06-21 15:46:43 +00:00
|
|
|
|
bcs .3 not same dir, go copy/delete
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
2017-06-21 15:46:43 +00:00
|
|
|
|
jsr CS.RUN.Rename
|
2017-06-27 20:37:45 +00:00
|
|
|
|
jsr CS.RUN.CheckErr
|
|
|
|
|
bcs .9
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
2017-06-27 20:37:45 +00:00
|
|
|
|
jmp CS.RUN.NEXT
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
2017-06-21 15:46:43 +00:00
|
|
|
|
.FIN
|
|
|
|
|
.3 jsr CS.RUN.CopyStart
|
2017-02-24 16:34:02 +00:00
|
|
|
|
bcc .4
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
2017-02-24 07:46:53 +00:00
|
|
|
|
jsr CS.RUN.CheckErr
|
2018-11-28 11:39:33 +00:00
|
|
|
|
bcs .9
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
2017-08-02 21:05:36 +00:00
|
|
|
|
jmp CS.RUN.NEXT
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.FIN
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
|
|
|
|
.4 .DO X.DELETE.SOURCE=1
|
2017-06-26 15:28:18 +00:00
|
|
|
|
|
2017-06-27 20:37:45 +00:00
|
|
|
|
ldy #hSrcFullPath
|
2017-06-27 16:00:32 +00:00
|
|
|
|
lda (pData),y
|
2017-02-22 16:32:02 +00:00
|
|
|
|
ldy #hToDelete
|
|
|
|
|
sta (pData),y
|
|
|
|
|
.FIN
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-02-26 18:34:00 +00:00
|
|
|
|
clc
|
2017-02-27 14:18:03 +00:00
|
|
|
|
.9 rts
|
2017-02-24 16:34:02 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
.99 >LDA.G RC get global RC in case of bContinue
|
2017-02-24 16:34:02 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2017-06-23 12:04:39 +00:00
|
|
|
|
*--------------------------------------
|
2021-06-26 20:24:25 +00:00
|
|
|
|
CS.RUN.DIR.MSG ldx #0
|
2017-06-30 15:11:29 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
CS.RUN.REG.MSG bit bQuiet
|
2017-06-30 15:11:29 +00:00
|
|
|
|
bmi .8
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
>PUSHW L.MSG.DIR,x
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2017-06-27 20:37:45 +00:00
|
|
|
|
ldy #hSrcFullPath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2017-06-30 15:11:29 +00:00
|
|
|
|
|
2018-08-23 15:16:20 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2020-02-14 07:21:56 +00:00
|
|
|
|
ldy #hDstFullPath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2018-08-23 15:16:20 +00:00
|
|
|
|
>PUSHBI 4
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2018-08-23 15:16:20 +00:00
|
|
|
|
.ELSE
|
|
|
|
|
>PUSHBI 2
|
|
|
|
|
|
|
|
|
|
.FIN
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2017-06-30 15:11:29 +00:00
|
|
|
|
rts
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2017-06-30 15:11:29 +00:00
|
|
|
|
.8 clc
|
2017-06-27 20:37:45 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-06-30 15:11:29 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
|
|
|
|
CS.RUN.OVERWRITE.MSG
|
2021-06-26 20:24:25 +00:00
|
|
|
|
bit bQuiet
|
2017-07-01 13:45:53 +00:00
|
|
|
|
bmi .1
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2017-07-01 13:45:53 +00:00
|
|
|
|
jsr CS.RUN.CR
|
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
.1 >PUSHW L.MSG.OVERWRITE
|
|
|
|
|
ldy #hDstFullPath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2018-08-23 15:16:20 +00:00
|
|
|
|
>PUSHBI 2
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2017-06-23 12:04:39 +00:00
|
|
|
|
rts
|
2017-06-30 15:11:29 +00:00
|
|
|
|
.FIN
|
2017-07-01 13:45:53 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-14 07:21:56 +00:00
|
|
|
|
CS.RUN.CR >PUSHW L.MSG.CRLF
|
|
|
|
|
>PUSHBI 0
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2019-10-28 06:32:12 +00:00
|
|
|
|
rts
|
2017-06-21 15:46:43 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DO X.COPY.TO.DEST=1
|
|
|
|
|
.DO X.DELETE.SOURCE=1
|
2020-02-23 20:46:25 +00:00
|
|
|
|
CS.RUN.Rename ldy #hSrcFullPath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2020-02-23 20:46:25 +00:00
|
|
|
|
ldy #hDstFullPath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2017-06-21 15:46:43 +00:00
|
|
|
|
>SYSCALL Rename
|
2018-11-12 21:34:55 +00:00
|
|
|
|
bcs .9
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2018-11-12 21:34:55 +00:00
|
|
|
|
jsr CS.RUN.IncCount
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2018-11-12 21:34:55 +00:00
|
|
|
|
.9 rts
|
2017-06-21 15:46:43 +00:00
|
|
|
|
.FIN
|
2021-06-27 13:48:04 +00:00
|
|
|
|
.FIN
|
2017-02-20 17:16:23 +00:00
|
|
|
|
*--------------------------------------
|
2017-02-21 17:01:30 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
|
|
|
|
CS.RUN.CopyStart
|
2020-05-19 13:00:17 +00:00
|
|
|
|
>STZ.G hSrcFile
|
|
|
|
|
>STA.G hDstFile
|
2020-05-21 12:55:49 +00:00
|
|
|
|
>STA.G hCopyBuf
|
|
|
|
|
>STA.G CopyRC Reset RC
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-05-21 12:55:49 +00:00
|
|
|
|
>LDYAI X.COPY.BUF.SIZE
|
|
|
|
|
>SYSCALL GetMem
|
2021-07-10 19:09:43 +00:00
|
|
|
|
bcs .99
|
2020-05-21 12:55:49 +00:00
|
|
|
|
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
txa
|
|
|
|
|
>STA.G hCopyBuf
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
ldy #hSrcFullPath
|
2018-10-02 15:52:30 +00:00
|
|
|
|
lda #O.RDONLY
|
2017-06-28 14:34:11 +00:00
|
|
|
|
jsr CS.RUN.Open
|
2021-07-10 19:09:43 +00:00
|
|
|
|
bcs CS.RUN.CopyEnd
|
2017-04-03 15:35:03 +00:00
|
|
|
|
|
2018-08-11 10:57:57 +00:00
|
|
|
|
>STA.G hSrcFile
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
ldy #hDstFullPath
|
2018-10-02 15:52:30 +00:00
|
|
|
|
lda #O.WRONLY+O.CREATE
|
2017-06-28 14:34:11 +00:00
|
|
|
|
jsr CS.RUN.Open
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2021-07-10 19:09:43 +00:00
|
|
|
|
bcs CS.RUN.CopyEnd
|
2017-02-20 17:16:23 +00:00
|
|
|
|
|
2019-10-12 14:20:09 +00:00
|
|
|
|
>STA.G hDstFile
|
|
|
|
|
|
2017-02-21 17:01:30 +00:00
|
|
|
|
lda #$ff
|
2019-10-12 14:20:09 +00:00
|
|
|
|
>STA.G bCopy
|
2020-05-21 12:55:49 +00:00
|
|
|
|
* clc
|
2021-07-10 19:09:43 +00:00
|
|
|
|
.99 rts
|
2017-02-21 17:01:30 +00:00
|
|
|
|
*--------------------------------------
|
2021-05-14 20:58:20 +00:00
|
|
|
|
CS.RUN.Copy >PUSHB.G hSrcFile
|
2018-07-25 15:26:14 +00:00
|
|
|
|
>PUSHW ZPPtr1 Dst Ptr
|
2021-05-14 20:58:20 +00:00
|
|
|
|
>PUSHWI X.COPY.BUF.SIZE Bytes To Read
|
2017-02-21 17:01:30 +00:00
|
|
|
|
>SYSCALL FRead
|
|
|
|
|
bcc .1
|
2020-05-19 13:00:17 +00:00
|
|
|
|
|
2017-10-26 16:01:54 +00:00
|
|
|
|
cmp #MLI.E.EOF
|
2017-02-22 07:31:16 +00:00
|
|
|
|
bne .9
|
2020-05-19 13:00:17 +00:00
|
|
|
|
|
2017-02-22 07:31:16 +00:00
|
|
|
|
lda #0
|
2020-05-21 12:55:49 +00:00
|
|
|
|
clc
|
2021-07-10 19:09:43 +00:00
|
|
|
|
bra CS.RUN.CopyEnd
|
2020-05-19 13:00:17 +00:00
|
|
|
|
|
2021-05-14 20:58:20 +00:00
|
|
|
|
.1 phy
|
|
|
|
|
pha
|
|
|
|
|
>PUSHB.G hDstFile
|
2018-07-25 15:26:14 +00:00
|
|
|
|
>PUSHW ZPPtr1 Src Ptr
|
2021-05-14 20:58:20 +00:00
|
|
|
|
pla
|
|
|
|
|
ply
|
|
|
|
|
>PUSHYA Bytes To Write
|
2017-02-21 17:01:30 +00:00
|
|
|
|
>SYSCALL FWrite
|
2021-07-10 19:09:43 +00:00
|
|
|
|
bcs CS.RUN.CopyEnd
|
2020-05-19 13:00:17 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
bit bQuiet
|
2017-06-23 12:04:39 +00:00
|
|
|
|
bmi .8
|
|
|
|
|
|
2017-02-21 17:01:30 +00:00
|
|
|
|
lda #'.'
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2017-04-03 15:35:03 +00:00
|
|
|
|
|
2020-05-19 13:00:17 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
|
2021-07-10 19:09:43 +00:00
|
|
|
|
.9 sec
|
2017-02-21 17:01:30 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-10 19:09:43 +00:00
|
|
|
|
CS.RUN.CopyEnd >STA.G CopyRC
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2021-07-10 19:09:43 +00:00
|
|
|
|
php
|
|
|
|
|
pha
|
|
|
|
|
|
2020-05-21 12:55:49 +00:00
|
|
|
|
>LDA.G hDstFile
|
|
|
|
|
beq .1
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL FClose
|
2017-06-28 14:34:11 +00:00
|
|
|
|
|
2020-05-21 12:55:49 +00:00
|
|
|
|
.1 >LDA.G hSrcFile
|
|
|
|
|
beq .2
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL FClose
|
2017-02-22 16:32:02 +00:00
|
|
|
|
|
2020-05-21 12:55:49 +00:00
|
|
|
|
.2 >LDA.G hCopyBuf
|
|
|
|
|
beq .3
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-05-21 12:55:49 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-05-21 12:55:49 +00:00
|
|
|
|
.3 >STZ.G bCopy
|
2021-07-10 19:09:43 +00:00
|
|
|
|
|
2020-05-19 13:00:17 +00:00
|
|
|
|
pla
|
|
|
|
|
plp
|
2021-07-10 19:09:43 +00:00
|
|
|
|
|
2021-06-27 13:48:04 +00:00
|
|
|
|
rts
|
2017-02-22 16:32:02 +00:00
|
|
|
|
.FIN
|
2017-02-21 17:01:30 +00:00
|
|
|
|
*--------------------------------------
|
2020-05-21 12:55:49 +00:00
|
|
|
|
CS.RUN.Open pha Save open mode
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2020-05-21 12:55:49 +00:00
|
|
|
|
pla
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
ldy #S.STAT.P.TYPE
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
|
|
|
|
|
ldy #S.STAT.P.AUXTYPE+1
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
dey
|
2021-06-27 13:48:04 +00:00
|
|
|
|
>PUSHB (ZPFileStat),y
|
2020-05-21 12:55:49 +00:00
|
|
|
|
|
|
|
|
|
>SYSCALL FOpen
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-02-22 16:32:02 +00:00
|
|
|
|
CS.RUN.CheckErr bcs .1
|
2019-10-28 06:32:12 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
bit bQuiet
|
2017-06-23 12:04:39 +00:00
|
|
|
|
bmi .8
|
2019-10-28 06:32:12 +00:00
|
|
|
|
|
2017-06-23 12:04:39 +00:00
|
|
|
|
>LDYA L.MSG.OK
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PutS
|
2018-09-05 11:31:49 +00:00
|
|
|
|
.8 rts
|
2019-10-28 06:32:12 +00:00
|
|
|
|
|
2018-11-28 11:39:33 +00:00
|
|
|
|
.1 pha
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHW L.MSG.ERR
|
|
|
|
|
pla
|
|
|
|
|
pha
|
2017-02-22 16:32:02 +00:00
|
|
|
|
>PUSHA
|
2018-08-23 15:16:20 +00:00
|
|
|
|
>PUSHBI 1
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2019-10-28 06:32:12 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
lda bContinue
|
2018-11-28 11:39:33 +00:00
|
|
|
|
eor #$80
|
|
|
|
|
asl
|
2017-02-23 16:43:42 +00:00
|
|
|
|
pla
|
2017-06-23 12:04:39 +00:00
|
|
|
|
rts
|
2016-11-01 21:37:12 +00:00
|
|
|
|
*--------------------------------------
|
2017-06-27 16:00:32 +00:00
|
|
|
|
CS.RUN.BuildFilePath
|
|
|
|
|
ldy #hSrcFullPath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2021-05-04 17:31:21 +00:00
|
|
|
|
ldy #hSrcBasePath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2017-10-03 15:33:30 +00:00
|
|
|
|
>SYSCALL StrCpy
|
2017-06-27 16:00:32 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
ldy #hSrcFullPath
|
|
|
|
|
jsr CS.RUN.PushPathY
|
2017-06-26 15:28:18 +00:00
|
|
|
|
>PUSHW ZPFileName
|
2017-10-03 15:33:30 +00:00
|
|
|
|
>SYSCALL StrCat
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
|
|
|
|
ldy #hDstFullPath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2021-05-04 17:31:21 +00:00
|
|
|
|
ldy #hDstBasePath
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr CS.RUN.PushPathY
|
2017-10-03 15:33:30 +00:00
|
|
|
|
>SYSCALL StrCpy
|
2017-06-27 16:00:32 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
ldy #hDstFullPath
|
|
|
|
|
jsr CS.RUN.PushPathY
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
>LDA.G hDstFileName
|
2017-06-27 16:00:32 +00:00
|
|
|
|
beq .1
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
2021-06-27 13:48:04 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2017-06-26 15:28:18 +00:00
|
|
|
|
>PUSHYA
|
2017-06-27 16:00:32 +00:00
|
|
|
|
bra .2
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
.1 >PUSHW ZPFileName
|
|
|
|
|
|
2021-05-04 17:31:21 +00:00
|
|
|
|
.2 >SYSCALL StrCat
|
2017-06-27 16:00:32 +00:00
|
|
|
|
.FIN
|
2016-11-13 21:03:31 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-06-26 20:24:25 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
CS.RUN.StatDst ldy #hDstFullPath
|
|
|
|
|
jsr CS.RUN.PushPathY
|
2021-06-27 13:48:04 +00:00
|
|
|
|
>PUSHEA.G STATBUF
|
2021-06-26 20:24:25 +00:00
|
|
|
|
>SYSCALL Stat
|
2017-06-30 15:11:29 +00:00
|
|
|
|
rts
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
|
|
|
|
.FIN
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.GetPathY sec
|
|
|
|
|
.HS 90 BCC
|
|
|
|
|
CS.RUN.PushPathY
|
|
|
|
|
clc
|
|
|
|
|
php
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
lda (pData),y
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
|
|
|
|
|
plp
|
|
|
|
|
bcs .8
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
>PUSHYA
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
.8 rts
|
2017-06-30 15:11:29 +00:00
|
|
|
|
*--------------------------------------
|
2018-11-12 21:34:55 +00:00
|
|
|
|
CS.RUN.IncCount >INCW.G Count
|
|
|
|
|
rts
|
2017-06-28 14:34:11 +00:00
|
|
|
|
*--------------------------------------
|
2019-10-11 13:06:33 +00:00
|
|
|
|
CS.RUN.ToUpper cmp #'a'
|
|
|
|
|
bcc .8
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2019-10-11 13:06:33 +00:00
|
|
|
|
cmp #'z'+1
|
|
|
|
|
bcs .8
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2019-10-11 13:06:33 +00:00
|
|
|
|
eor #$20
|
2021-06-26 20:24:25 +00:00
|
|
|
|
|
2019-10-11 13:06:33 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
2017-02-20 17:16:23 +00:00
|
|
|
|
CS.DOEVENT sec
|
2016-11-01 21:37:12 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.QUIT jsr LeaveSubDir
|
|
|
|
|
bcc CS.QUIT
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-06-27 20:37:45 +00:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2018-08-11 10:57:57 +00:00
|
|
|
|
>LDA.G bCopy
|
2017-06-27 16:00:32 +00:00
|
|
|
|
bpl .1
|
2019-10-28 06:32:12 +00:00
|
|
|
|
|
2020-05-19 13:00:17 +00:00
|
|
|
|
jsr CS.RUN.CopyEnd
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-06-27 20:37:45 +00:00
|
|
|
|
.1 ldy #hDstFullPath
|
2019-06-02 08:58:46 +00:00
|
|
|
|
jsr .7
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2020-03-03 16:44:52 +00:00
|
|
|
|
ldy #hDstFileName
|
2019-06-02 08:58:46 +00:00
|
|
|
|
jsr .7
|
2017-06-27 20:37:45 +00:00
|
|
|
|
.FIN
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2017-06-27 16:00:32 +00:00
|
|
|
|
ldy #hSrcFullPath
|
2019-06-02 08:58:46 +00:00
|
|
|
|
jsr .7
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2018-08-11 10:57:57 +00:00
|
|
|
|
ldy #hFilter
|
2021-06-26 20:24:25 +00:00
|
|
|
|
jsr .7
|
2021-06-27 13:48:04 +00:00
|
|
|
|
|
2021-06-26 20:24:25 +00:00
|
|
|
|
ldy #hExclude
|
2019-06-02 08:58:46 +00:00
|
|
|
|
|
|
|
|
|
.7 lda (pData),y
|
2017-06-27 16:00:32 +00:00
|
|
|
|
beq .9
|
2019-10-12 14:20:09 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2019-06-04 15:49:58 +00:00
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
2017-06-27 16:00:32 +00:00
|
|
|
|
*--------------------------------------
|
2016-11-01 21:37:12 +00:00
|
|
|
|
MAN
|
2020-10-06 06:27:35 +00:00
|
|
|
|
SAVE usr/src/shared/x.cpmvrm.s
|
2020-05-21 12:55:49 +00:00
|
|
|
|
LOAD usr/src/bin/cp.s
|
2018-08-11 10:57:57 +00:00
|
|
|
|
ASM
|