2016-11-01 22:37:12 +01:00
|
|
|
|
NEW
|
2018-11-17 18:17:13 +01:00
|
|
|
|
PREFIX
|
2017-12-22 22:24:30 +01:00
|
|
|
|
AUTO 4,1
|
2016-11-01 22:37:12 +01:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2017-02-24 17:34:02 +01:00
|
|
|
|
X.COPY.BUF.SIZE .EQ 4096
|
2017-02-21 18:01:30 +01:00
|
|
|
|
*--------------------------------------
|
2016-11-01 22:37:12 +01:00
|
|
|
|
ZPPtr1 .EQ ZPBIN
|
|
|
|
|
ZPPtr2 .EQ ZPBIN+2
|
2017-02-24 17:34:02 +01:00
|
|
|
|
ZPFileName .EQ ZPBIN+4
|
|
|
|
|
ZPFileStat .EQ ZPBIN+6
|
2016-11-01 22:37:12 +01: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 17:33:30 +02:00
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
2018-08-11 12:57:57 +02:00
|
|
|
|
.DA #64 SS
|
2017-10-03 17:33:30 +02:00
|
|
|
|
.DA #8 ZP
|
2016-11-01 22:37:12 +01:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.MSG.USAGE .DA MSG.USAGE
|
|
|
|
|
L.MSG.DIR .DA MSG.DIR
|
|
|
|
|
L.MSG.FILE .DA MSG.FILE
|
2017-02-24 17:34:02 +01:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-06-27 22:37:45 +02:00
|
|
|
|
L.MSG.OVERWRITE .DA MSG.OVERWRITE
|
2017-02-24 17:34:02 +01:00
|
|
|
|
.FIN
|
2016-11-01 22:37:12 +01:00
|
|
|
|
L.MSG.OK .DA MSG.OK
|
|
|
|
|
L.MSG.ERR .DA MSG.ERR
|
2017-06-21 17:46:43 +02:00
|
|
|
|
L.MSG.DONE .DA MSG.DONE
|
2016-11-01 22:37:12 +01:00
|
|
|
|
L.STAT .DA STAT
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2017-10-03 17:33:30 +02:00
|
|
|
|
CS.INIT
|
|
|
|
|
.1 >INC.G ArgCount
|
2018-10-16 17:48:03 +02:00
|
|
|
|
>SYSCALL ArgV
|
2017-10-03 17:33:30 +02:00
|
|
|
|
bcs .7
|
2016-11-01 22:37:12 +01:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
cmp #'-'
|
|
|
|
|
bne .4
|
|
|
|
|
|
2018-08-11 12:57:57 +02:00
|
|
|
|
ldy #1
|
2016-11-01 22:37:12 +01:00
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
ldx OptionList
|
|
|
|
|
|
|
|
|
|
.2 cmp OptionList,x
|
|
|
|
|
beq .3
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
2016-11-13 22:03:31 +01:00
|
|
|
|
|
2018-08-23 17:16:20 +02:00
|
|
|
|
.99 >PUSHBI 0
|
|
|
|
|
>LDYA L.MSG.USAGE
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2018-10-21 22:54:07 +02:00
|
|
|
|
lda #E.SYN
|
2016-11-01 22:37:12 +01:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.3 ldy OptionVars-1,x
|
|
|
|
|
lda #$80
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra .1
|
|
|
|
|
|
2018-08-11 12:57:57 +02:00
|
|
|
|
.4 >LDA.G index
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2016-11-08 17:56:05 +01:00
|
|
|
|
bne .5 Already have a Src dir...
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.ELSE
|
|
|
|
|
bne .99
|
|
|
|
|
.FIN
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2016-11-08 17:56:05 +01:00
|
|
|
|
>LDYA ZPPtr1
|
2017-07-05 16:45:19 +02:00
|
|
|
|
jsr InitSrcDirYA
|
2016-11-08 17:56:05 +01:00
|
|
|
|
bcc .1 success, scan for any other args
|
2017-06-23 16:55:47 +02:00
|
|
|
|
.9 rts
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
|
|
|
|
.5 >LDA.G hDstBasePath
|
2016-11-08 17:56:05 +01:00
|
|
|
|
bne .99 we already have a second arg....error!
|
|
|
|
|
|
|
|
|
|
>LDYA ZPPtr1
|
|
|
|
|
jsr InitDstDirYA
|
|
|
|
|
bcc .1 success, scan for any other args
|
|
|
|
|
rts
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.FIN
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-10-04 17:12:03 +02:00
|
|
|
|
.7 >LDA.G index processed all args
|
2016-11-08 17:56:05 +01:00
|
|
|
|
beq .99 , no src ? ERROR
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-10-04 17:12:03 +02:00
|
|
|
|
>LDA.G hDstBasePath
|
2016-11-08 17:56:05 +01:00
|
|
|
|
bne .8 we also have a Dst folder
|
|
|
|
|
|
|
|
|
|
ldy #S.PS.hPREFIX no dst folder, use actual prefix
|
|
|
|
|
lda (pPs),y
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL GetMemPtr
|
2016-11-08 17:56:05 +01:00
|
|
|
|
jsr InitDstDirYA
|
|
|
|
|
bcs .99
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.FIN
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-06-28 16:34:11 +02:00
|
|
|
|
.8 >LDYAI 256
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL getmem
|
2017-06-27 18:00:32 +02:00
|
|
|
|
bcs .9
|
|
|
|
|
txa
|
2017-10-04 17:12:03 +02:00
|
|
|
|
>STA.G hSrcFullPath
|
2017-06-21 17:46:43 +02:00
|
|
|
|
sta (pData),y
|
2017-06-27 18:00:32 +02:00
|
|
|
|
|
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-06-28 16:34:11 +02:00
|
|
|
|
>LDYAI 256
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL getmem
|
2017-06-27 18:00:32 +02:00
|
|
|
|
bcs .9
|
|
|
|
|
txa
|
2017-10-04 17:12:03 +02:00
|
|
|
|
>STA.G hDstFullPath
|
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
.FIN
|
2017-06-21 17:46:43 +02:00
|
|
|
|
|
2016-11-01 22:37:12 +01:00
|
|
|
|
clc
|
2019-02-21 16:26:21 +00:00
|
|
|
|
CS.INIT.RTS rts
|
2016-11-01 22:37:12 +01:00
|
|
|
|
*--------------------------------------
|
2019-02-21 16:26:21 +00:00
|
|
|
|
CS.RUN ldy #S.PS.hStdIn
|
|
|
|
|
lda (pPS),y
|
|
|
|
|
>SYSCALL feof
|
|
|
|
|
bcs CS.INIT.RTS I/O error
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
beq .15
|
|
|
|
|
|
|
|
|
|
>SYSCALL GetChar
|
|
|
|
|
bcs CS.INIT.RTS I/O error
|
2016-11-01 22:37:12 +01:00
|
|
|
|
|
2017-02-20 18:16:23 +01:00
|
|
|
|
cmp #$03 Ctrl-C
|
2017-02-22 17:32:02 +01:00
|
|
|
|
bne .10
|
|
|
|
|
sec
|
|
|
|
|
rts Abort....
|
2017-02-20 18:16:23 +01:00
|
|
|
|
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.10 cmp #$13 Ctrl-S
|
2018-11-17 18:17:13 +01:00
|
|
|
|
bne .15
|
2016-11-01 22:37:12 +01:00
|
|
|
|
|
2017-02-20 18:16:23 +01:00
|
|
|
|
ldy #bPause
|
|
|
|
|
lda (pData),y
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2018-11-17 18:17:13 +01:00
|
|
|
|
.15 ldy #bPause
|
2017-02-22 17:32:02 +01:00
|
|
|
|
lda (pData),y
|
2017-02-24 08:46:53 +01:00
|
|
|
|
bpl .1
|
2017-06-28 16:34:11 +02:00
|
|
|
|
.8 clc
|
2017-02-24 08:46:53 +01:00
|
|
|
|
rts
|
2017-06-28 17:34:36 +02:00
|
|
|
|
*--------------------------------------
|
2017-02-21 18:01:30 +01:00
|
|
|
|
.1 .DO X.COPY.TO.DEST=1
|
|
|
|
|
ldy #bCopy
|
|
|
|
|
lda (pData),y
|
2017-06-28 17:34:36 +02:00
|
|
|
|
beq .2
|
2017-06-28 16:34:11 +02:00
|
|
|
|
|
|
|
|
|
jsr CS.RUN.Copy
|
|
|
|
|
|
|
|
|
|
ldy #bCopy Copy completed ?
|
|
|
|
|
lda (pData),y
|
2017-06-28 17:34:36 +02:00
|
|
|
|
bne .8 no.....exit
|
2017-06-28 16:34:11 +02:00
|
|
|
|
|
2017-06-28 17:34:36 +02:00
|
|
|
|
clc
|
|
|
|
|
ldy #CopyRC
|
2017-06-28 16:34:11 +02:00
|
|
|
|
lda (pData),y
|
2017-06-28 17:34:36 +02:00
|
|
|
|
.DO X.DELETE.SOURCE=0
|
|
|
|
|
beq .20 no copy error
|
2017-06-28 16:34:11 +02:00
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
jsr CS.RUN.CheckErr we have an error....
|
|
|
|
|
bcs .9
|
2017-06-28 17:34:36 +02:00
|
|
|
|
jmp CS.RUN.NEXT
|
2017-06-28 16:34:11 +02:00
|
|
|
|
|
2017-06-28 17:34:36 +02:00
|
|
|
|
.20 jsr CS.RUN.CheckErr Success!!
|
|
|
|
|
jsr CS.RUN.IncCount
|
|
|
|
|
jmp CS.RUN.NEXT
|
|
|
|
|
.ELSE
|
|
|
|
|
beq .2
|
|
|
|
|
sec
|
|
|
|
|
jsr CS.RUN.CheckErr we have an error....
|
|
|
|
|
bcc .21
|
|
|
|
|
rts
|
|
|
|
|
|
2018-08-11 12:57:57 +02:00
|
|
|
|
.21 >STZ.G hToDelete Cancel delete if any
|
2017-06-28 17:34:36 +02:00
|
|
|
|
jmp CS.RUN.NEXT
|
2017-06-28 16:34:11 +02:00
|
|
|
|
.FIN
|
2017-02-21 18:01:30 +01:00
|
|
|
|
.FIN
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-23 08:42:48 +01:00
|
|
|
|
.2 .DO X.DELETE.SOURCE=1
|
2017-02-22 17:32:02 +01:00
|
|
|
|
ldy #hToDelete
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .3
|
2017-02-24 08:46:53 +01:00
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
2017-06-28 16:34:11 +02:00
|
|
|
|
|
2017-06-28 17:34:36 +02:00
|
|
|
|
ldy #hSrcFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2017-06-28 17:34:36 +02:00
|
|
|
|
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL remove
|
2017-06-28 17:34:36 +02:00
|
|
|
|
bcs .22
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.CheckErr Success!!!
|
2017-06-28 17:34:36 +02:00
|
|
|
|
jsr CS.RUN.IncCount
|
|
|
|
|
jmp CS.RUN.NEXT
|
2017-06-28 16:34:11 +02:00
|
|
|
|
|
2017-06-28 17:34:36 +02:00
|
|
|
|
.22 jsr CS.RUN.CheckErr
|
2017-02-26 19:34:00 +01:00
|
|
|
|
bcs .9
|
|
|
|
|
jmp CS.RUN.NEXT
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.FIN
|
2017-06-28 17:34:36 +02:00
|
|
|
|
*--------------------------------------
|
2017-02-26 19:34:00 +01:00
|
|
|
|
.3 jsr GetEntry
|
2017-02-24 17:34:02 +01:00
|
|
|
|
bcs CS.RUN.LEAVE
|
2016-11-01 22:37:12 +01:00
|
|
|
|
|
2018-08-11 12:57:57 +02:00
|
|
|
|
>LDA.G hFilter
|
2016-11-01 22:37:12 +01:00
|
|
|
|
beq .4 No filter....
|
|
|
|
|
|
2018-11-17 18:17:13 +01:00
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
ldy #S.STAT.FSID
|
|
|
|
|
lda (ZPFileStat),y
|
|
|
|
|
bne .11 not prodos...
|
|
|
|
|
|
|
|
|
|
pla
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL GetMemPtr
|
2018-11-17 18:17:13 +01:00
|
|
|
|
>SYSCALL strupr
|
|
|
|
|
bra .12
|
|
|
|
|
|
|
|
|
|
.11 pla
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
|
2018-12-17 16:21:32 +01:00
|
|
|
|
.12 jsr StrMatch
|
2017-02-26 19:34:00 +01:00
|
|
|
|
bcs CS.RUN.NEXT no match, skip....
|
2016-11-01 22:37:12 +01:00
|
|
|
|
|
2016-12-09 17:36:24 +01:00
|
|
|
|
.4 ldy #S.STAT.P.DRIVE
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda (ZPFileStat),y ProDOS Device ?
|
2017-02-24 08:46:53 +01:00
|
|
|
|
bne .6
|
2016-11-01 22:37:12 +01:00
|
|
|
|
|
2016-12-09 17:36:24 +01:00
|
|
|
|
ldy #S.STAT.P.TYPE
|
2017-02-24 17:34:02 +01:00
|
|
|
|
lda (ZPFileStat),y
|
2016-11-01 22:37:12 +01:00
|
|
|
|
cmp #$0F Directory ?
|
2017-02-24 08:46:53 +01:00
|
|
|
|
bne .5
|
2017-02-20 18:16:23 +01:00
|
|
|
|
|
2017-10-04 17:12:03 +02:00
|
|
|
|
>LDA.G bRecurse
|
2017-02-26 19:34:00 +01:00
|
|
|
|
bpl CS.RUN.NEXT
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2018-11-05 17:28:40 +01:00
|
|
|
|
lda (ZPFileName)
|
2017-02-24 17:34:02 +01:00
|
|
|
|
cmp #'.'
|
2017-02-26 19:34:00 +01:00
|
|
|
|
beq CS.RUN.NEXT Skip "." & ".."
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
jsr CS.RUN.BuildFilePath
|
2017-02-24 08:46:53 +01:00
|
|
|
|
jmp CS.RUN.DIR
|
2016-11-01 22:37:12 +01:00
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
.5 jsr CS.RUN.BuildFilePath
|
|
|
|
|
jmp CS.RUN.FILE
|
2017-02-24 08:46:53 +01:00
|
|
|
|
|
2017-10-26 18:01:54 +02:00
|
|
|
|
.6 lda #MLI.E.UNSUPST
|
2017-02-24 08:46:53 +01:00
|
|
|
|
sec
|
2017-02-24 17:34:02 +01:00
|
|
|
|
.9 rts
|
2017-02-22 17:32:02 +01:00
|
|
|
|
*--------------------------------------
|
2017-07-01 15:45:53 +02:00
|
|
|
|
CS.RUN.CR.NEXT jsr CS.RUN.CR
|
2017-02-26 19:34:00 +01:00
|
|
|
|
CS.RUN.NEXT jsr GetNextEntry
|
|
|
|
|
bcs CS.RUN.LEAVE
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-02-24 17:34:02 +01:00
|
|
|
|
CS.RUN.LEAVE jsr LeaveSubDir exit this sub dir....
|
2017-02-24 08:46:53 +01:00
|
|
|
|
bcs .99 base, we are done, exit
|
2017-02-26 19:34:00 +01:00
|
|
|
|
jsr BasePath..
|
2017-02-24 08:46:53 +01:00
|
|
|
|
|
2016-11-13 22:03:31 +01:00
|
|
|
|
.DO X.DELETE.SOURCE=1
|
2017-02-24 08:46:53 +01:00
|
|
|
|
.DO X.COPY.TO.DEST=0
|
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
jsr GetEntry
|
|
|
|
|
bcs *
|
|
|
|
|
|
2017-06-28 16:34:11 +02:00
|
|
|
|
jsr CS.RUN.BuildFilePath
|
|
|
|
|
|
2017-06-27 22:37:45 +02:00
|
|
|
|
ldy #hSrcFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
|
|
|
|
|
2017-06-27 22:37:45 +02:00
|
|
|
|
>STYA ZPPtr1
|
2017-02-26 19:34:00 +01:00
|
|
|
|
>PUSHYA
|
|
|
|
|
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.DIR.MSG
|
2017-06-27 18:00:32 +02:00
|
|
|
|
bcs CS.RUN.LEAVE.RTS
|
2017-02-24 08:46:53 +01:00
|
|
|
|
|
2017-06-27 22:37:45 +02:00
|
|
|
|
>LDYA ZPPtr1
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL remove
|
2017-02-22 17:32:02 +01:00
|
|
|
|
jsr CS.RUN.CheckErr
|
2016-11-13 22:03:31 +01:00
|
|
|
|
bcs .99
|
|
|
|
|
.FIN
|
2017-02-24 08:46:53 +01:00
|
|
|
|
.FIN
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
jmp CS.RUN.NEXT
|
|
|
|
|
|
2017-06-23 14:04:39 +02:00
|
|
|
|
.99 ldy #bQuiet
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bmi .91
|
|
|
|
|
|
|
|
|
|
ldy #Count+1
|
2017-06-21 17:46:43 +02:00
|
|
|
|
>PUSHB (pData),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (pData),y
|
2018-08-23 17:16:20 +02:00
|
|
|
|
|
|
|
|
|
>PUSHBI 2
|
2017-06-21 17:46:43 +02:00
|
|
|
|
>LDYA L.MSG.DONE
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2017-06-21 17:46:43 +02:00
|
|
|
|
|
2017-06-23 14:04:39 +02:00
|
|
|
|
.91 ldy #RC
|
2017-02-26 19:34:00 +01:00
|
|
|
|
lda (pData),y get global RC in case of bContinue
|
2016-11-01 22:37:12 +01:00
|
|
|
|
sec
|
2017-06-27 18:00:32 +02:00
|
|
|
|
CS.RUN.LEAVE.RTS
|
|
|
|
|
rts
|
2016-11-01 22:37:12 +01:00
|
|
|
|
*--------------------------------------
|
2017-06-30 17:11:29 +02:00
|
|
|
|
CS.RUN.DIR jsr CS.RUN.DIR.MSG
|
2017-06-27 18:00:32 +02:00
|
|
|
|
bcs CS.RUN.LEAVE.RTS
|
2017-02-24 08:46:53 +01:00
|
|
|
|
|
2017-06-30 17:11:29 +02:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-06-27 22:37:45 +02:00
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHW L.STAT
|
2017-06-27 18:00:32 +02:00
|
|
|
|
|
|
|
|
|
ldy #hDstFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>SYSCALL Stat
|
2017-02-26 19:34:00 +01:00
|
|
|
|
bcs .3 File Not exists...go create
|
2017-02-21 18:01:30 +01:00
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
ldy #bNoConfirm
|
|
|
|
|
lda (pData),y
|
2017-02-26 19:34:00 +01:00
|
|
|
|
bmi .21 no prompt, nothing to create, enter subdir
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.OVERWRITE.MSG
|
2017-02-27 15:18:03 +01:00
|
|
|
|
bcs CS.RUN.DIR.RTS
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
.1 >SLEEP
|
2017-10-03 17:33:30 +02:00
|
|
|
|
>SYSCALL GetChar
|
2017-02-24 17:34:02 +01:00
|
|
|
|
bcs .1
|
|
|
|
|
cmp #3
|
|
|
|
|
beq .99 abort
|
|
|
|
|
|
|
|
|
|
cmp #'N'
|
2017-02-26 19:34:00 +01:00
|
|
|
|
bne .2
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
jmp CS.RUN.CR.NEXT no overwrite, nothing to do, no recurse
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
.2 cmp #'Y'
|
|
|
|
|
beq .21 no create, but recurse
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
|
|
|
|
cmp #'A'
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
ldy #bNoConfirm
|
|
|
|
|
lda #$ff
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
.21 clc
|
|
|
|
|
lda #0
|
|
|
|
|
bra .4
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
.3 ldy #hDstFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2017-06-27 18:00:32 +02:00
|
|
|
|
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL mkdir
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
.4 jsr CS.RUN.CheckErr
|
2017-02-27 15:18:03 +01:00
|
|
|
|
bcs CS.RUN.DIR.RTS
|
2017-02-21 18:01:30 +01:00
|
|
|
|
.FIN
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
|
|
|
|
.7 >LDYA ZPFileName
|
2016-11-01 22:37:12 +01:00
|
|
|
|
jmp EnterSubDirYA
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
.99 ldy #RC
|
2017-06-21 17:46:43 +02:00
|
|
|
|
lda (pData),y get global RC in case of bContinue
|
2017-02-24 17:34:02 +01:00
|
|
|
|
sec
|
2017-02-27 15:18:03 +01:00
|
|
|
|
CS.RUN.DIR.RTS rts
|
2016-11-01 22:37:12 +01:00
|
|
|
|
*--------------------------------------
|
2017-06-30 17:11:29 +02:00
|
|
|
|
CS.RUN.FILE jsr CS.RUN.FILE.MSG
|
2017-02-27 15:18:03 +01:00
|
|
|
|
bcs CS.RUN.DIR.RTS
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-06-30 17:11:29 +02:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
|
|
|
|
>PUSHW L.STAT
|
2017-06-27 18:00:32 +02:00
|
|
|
|
|
|
|
|
|
ldy #hDstFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>SYSCALL Stat
|
|
|
|
|
bcs .2 File Not exists...go create
|
|
|
|
|
|
|
|
|
|
ldy #bNoConfirm
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bmi .2 no prompt, ovverwrite
|
|
|
|
|
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.OVERWRITE.MSG
|
2017-02-24 17:34:02 +01:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2017-11-17 17:16:05 +01:00
|
|
|
|
.1 >SLEEP
|
2017-10-03 17:33:30 +02:00
|
|
|
|
>SYSCALL GetChar
|
2017-02-24 17:34:02 +01:00
|
|
|
|
bcs .1
|
|
|
|
|
cmp #3
|
|
|
|
|
beq .99 abort
|
|
|
|
|
|
|
|
|
|
cmp #'N'
|
|
|
|
|
bne .11
|
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
jmp CS.RUN.CR.NEXT no overwrite exit
|
2017-06-23 14:04:39 +02:00
|
|
|
|
.90 rts
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
|
|
|
|
.11 cmp #'Y'
|
|
|
|
|
beq .12 copy
|
|
|
|
|
|
|
|
|
|
cmp #'A'
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
ldy #bNoConfirm
|
|
|
|
|
lda #$ff
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
.12 jsr GetEntry get back current entry corrupted by SLEEP
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-06-21 17:46:43 +02:00
|
|
|
|
.2 .DO X.DELETE.SOURCE=1 mv file, check if srcbase=dstbase
|
|
|
|
|
ldy #hSrcBasePath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
|
|
|
|
|
2017-06-21 17:46:43 +02:00
|
|
|
|
>PUSHYA
|
|
|
|
|
ldy #hDstBasePath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
|
|
|
|
|
2018-12-17 16:21:32 +01:00
|
|
|
|
>SYSCALL StrCaseCmp
|
2017-06-21 17:46:43 +02:00
|
|
|
|
bcs .3 not same dir, go copy/delete
|
|
|
|
|
|
|
|
|
|
jsr CS.RUN.Rename
|
2017-06-27 22:37:45 +02:00
|
|
|
|
jsr CS.RUN.CheckErr
|
|
|
|
|
bcs .9
|
|
|
|
|
jmp CS.RUN.NEXT
|
2017-06-21 17:46:43 +02:00
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
.3 jsr CS.RUN.CopyStart
|
2017-02-24 17:34:02 +01:00
|
|
|
|
bcc .4
|
2017-02-24 08:46:53 +01:00
|
|
|
|
jsr CS.RUN.CheckErr
|
2018-11-28 12:39:33 +01:00
|
|
|
|
bcs .9
|
2017-08-02 23:05:36 +02:00
|
|
|
|
jmp CS.RUN.NEXT
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.FIN
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
|
|
|
|
.4 .DO X.DELETE.SOURCE=1
|
2017-06-26 17:28:18 +02:00
|
|
|
|
|
2017-06-27 22:37:45 +02:00
|
|
|
|
ldy #hSrcFullPath
|
2017-06-27 18:00:32 +02:00
|
|
|
|
lda (pData),y
|
2017-02-22 17:32:02 +01:00
|
|
|
|
ldy #hToDelete
|
|
|
|
|
sta (pData),y
|
|
|
|
|
.FIN
|
2017-02-26 19:34:00 +01:00
|
|
|
|
|
|
|
|
|
clc
|
2017-02-27 15:18:03 +01:00
|
|
|
|
.9 rts
|
2017-02-24 17:34:02 +01:00
|
|
|
|
|
2017-02-26 19:34:00 +01:00
|
|
|
|
.99 ldy #RC
|
2017-06-27 22:37:45 +02:00
|
|
|
|
lda (pData),y get global RC in case of bContinue
|
2017-02-24 17:34:02 +01:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2017-06-23 14:04:39 +02:00
|
|
|
|
*--------------------------------------
|
2017-06-30 17:11:29 +02:00
|
|
|
|
CS.RUN.DIR.MSG sec
|
|
|
|
|
.HS 90 bcc opcode
|
|
|
|
|
CS.RUN.FILE.MSG clc
|
|
|
|
|
|
2018-08-11 12:57:57 +02:00
|
|
|
|
>LDA.G bQuiet
|
2017-06-30 17:11:29 +02:00
|
|
|
|
bmi .8
|
|
|
|
|
php
|
|
|
|
|
|
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-06-27 22:37:45 +02:00
|
|
|
|
|
2017-07-06 17:30:40 +02:00
|
|
|
|
ldy #hDstFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2017-06-27 22:37:45 +02:00
|
|
|
|
>PUSHYA
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
2017-06-27 22:37:45 +02:00
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
ldy #hSrcFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2018-08-23 22:38:32 +02:00
|
|
|
|
>PUSHYA
|
2017-06-30 17:11:29 +02:00
|
|
|
|
|
2018-08-23 17:16:20 +02:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
|
|
|
|
|
|
|
|
|
>PUSHBI 4
|
|
|
|
|
|
|
|
|
|
.ELSE
|
|
|
|
|
|
|
|
|
|
>PUSHBI 2
|
|
|
|
|
|
|
|
|
|
.FIN
|
|
|
|
|
|
2017-06-30 17:11:29 +02:00
|
|
|
|
plp
|
|
|
|
|
bcc .1
|
2017-06-27 22:37:45 +02:00
|
|
|
|
>LDYA L.MSG.DIR
|
2017-06-30 17:11:29 +02:00
|
|
|
|
bcs .2
|
|
|
|
|
.1 >LDYA L.MSG.FILE
|
2018-06-21 17:12:10 +02:00
|
|
|
|
.2 >SYSCALL printf
|
2017-06-30 17:11:29 +02:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 clc
|
2017-06-27 22:37:45 +02:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-06-30 17:11:29 +02:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
2017-06-30 17:11:29 +02:00
|
|
|
|
CS.RUN.OVERWRITE.MSG
|
2018-08-11 12:57:57 +02:00
|
|
|
|
>LDA.G bQuiet
|
2017-07-01 15:45:53 +02:00
|
|
|
|
bmi .1
|
|
|
|
|
|
|
|
|
|
jsr CS.RUN.CR
|
|
|
|
|
|
|
|
|
|
.1 ldy #hDstFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2017-06-23 14:04:39 +02:00
|
|
|
|
>PUSHYA
|
2018-08-23 17:16:20 +02:00
|
|
|
|
>PUSHBI 2
|
2017-06-30 17:11:29 +02:00
|
|
|
|
>LDYA L.MSG.OVERWRITE
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2017-06-23 14:04:39 +02:00
|
|
|
|
rts
|
2017-07-01 15:45:53 +02:00
|
|
|
|
|
|
|
|
|
CS.RUN.OVERWRITE.KEY
|
|
|
|
|
|
|
|
|
|
rts
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
2017-06-30 17:11:29 +02:00
|
|
|
|
.FIN
|
2017-07-01 15:45:53 +02:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.CR lda #13
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL PutChar
|
2017-08-02 23:05:36 +02:00
|
|
|
|
bcs .9
|
2017-07-01 15:45:53 +02:00
|
|
|
|
lda #10
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL PutChar
|
2017-08-02 23:05:36 +02:00
|
|
|
|
.9 rts
|
2017-06-21 17:46:43 +02:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DO X.COPY.TO.DEST=1
|
|
|
|
|
.DO X.DELETE.SOURCE=1
|
2017-06-27 18:00:32 +02:00
|
|
|
|
CS.RUN.Rename ldy #hDstFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
|
|
|
|
|
2017-06-21 17:46:43 +02:00
|
|
|
|
>PUSHYA
|
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
ldy #hSrcFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
|
|
|
|
|
2017-06-21 17:46:43 +02:00
|
|
|
|
>SYSCALL Rename
|
2018-11-12 22:34:55 +01:00
|
|
|
|
bcs .9
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
2018-11-12 22:34:55 +01:00
|
|
|
|
jsr CS.RUN.IncCount
|
|
|
|
|
.9 rts
|
2017-06-21 17:46:43 +02:00
|
|
|
|
.FIN
|
2017-10-04 17:12:03 +02:00
|
|
|
|
.FIN
|
2017-02-20 18:16:23 +01:00
|
|
|
|
*--------------------------------------
|
2017-02-21 18:01:30 +01:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
|
|
|
|
CS.RUN.CopyStart
|
2017-06-27 18:00:32 +02:00
|
|
|
|
ldy #hSrcFullPath
|
2018-10-02 17:52:30 +02:00
|
|
|
|
lda #O.RDONLY
|
2018-11-28 12:39:33 +01:00
|
|
|
|
|
2017-06-28 16:34:11 +02:00
|
|
|
|
jsr CS.RUN.Open
|
2017-02-24 08:46:53 +01:00
|
|
|
|
bcs .99
|
2017-04-03 17:35:03 +02:00
|
|
|
|
|
2018-08-11 12:57:57 +02:00
|
|
|
|
>STA.G hSrcFile
|
2017-02-20 18:16:23 +01:00
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
ldy #hDstFullPath
|
2018-10-02 17:52:30 +02:00
|
|
|
|
lda #O.WRONLY+O.CREATE
|
2017-06-28 16:34:11 +02:00
|
|
|
|
|
|
|
|
|
jsr CS.RUN.Open
|
2017-02-24 08:46:53 +01:00
|
|
|
|
bcs .9
|
2017-02-20 18:16:23 +01:00
|
|
|
|
|
2017-02-24 08:46:53 +01:00
|
|
|
|
ldy #hDstFile
|
2017-02-20 18:16:23 +01:00
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2017-02-21 18:01:30 +01:00
|
|
|
|
ldy #bCopy
|
|
|
|
|
lda #$ff
|
|
|
|
|
sta (pData),y
|
2017-06-28 16:34:11 +02:00
|
|
|
|
inc
|
|
|
|
|
ldy #CopyRC Reset RC
|
|
|
|
|
sta (pData),y
|
2017-02-21 18:01:30 +01:00
|
|
|
|
clc
|
2017-02-24 08:46:53 +01:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 pha
|
2018-08-11 12:57:57 +02:00
|
|
|
|
>LDA.G hSrcFile
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL fclose
|
2017-02-24 08:46:53 +01:00
|
|
|
|
pla
|
2017-06-28 16:34:11 +02:00
|
|
|
|
|
2018-11-28 12:39:33 +01:00
|
|
|
|
.99 ldy #CopyRC
|
2017-06-28 16:34:11 +02:00
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2017-02-24 08:46:53 +01:00
|
|
|
|
sec
|
2018-11-28 12:39:33 +01:00
|
|
|
|
rts
|
2017-02-21 18:01:30 +01:00
|
|
|
|
*--------------------------------------
|
2017-06-28 16:34:11 +02:00
|
|
|
|
CS.RUN.Open phy Save Filename
|
|
|
|
|
pha Save open mode
|
|
|
|
|
|
|
|
|
|
ldy #S.STAT.P.AUXTYPE+1
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
ldy #S.STAT.P.TYPE
|
|
|
|
|
>PUSHB (ZPFileStat),y
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
ply
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2017-06-28 16:34:11 +02:00
|
|
|
|
>SYSCALL FOpen
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-09-05 13:31:49 +02:00
|
|
|
|
CS.RUN.Copy >STZ.G hCopyBuf
|
2017-06-28 16:34:11 +02:00
|
|
|
|
>LDYAI X.COPY.BUF.SIZE
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL getmem
|
2017-02-21 18:01:30 +01:00
|
|
|
|
bcs .9
|
2017-02-20 18:16:23 +01:00
|
|
|
|
|
2017-02-21 18:01:30 +01:00
|
|
|
|
>STYA ZPPtr1
|
2018-09-05 13:31:49 +02:00
|
|
|
|
txa
|
|
|
|
|
>STA.G hCopyBuf
|
2017-02-20 18:16:23 +01:00
|
|
|
|
|
2017-02-24 17:34:02 +01:00
|
|
|
|
>PUSHWI X.COPY.BUF.SIZE Bytes To Read
|
2018-07-25 17:26:14 +02:00
|
|
|
|
>PUSHW ZPPtr1 Dst Ptr
|
2018-07-24 18:00:24 +02:00
|
|
|
|
>LDA.G hSrcFile
|
2017-02-21 18:01:30 +01:00
|
|
|
|
>SYSCALL FRead
|
|
|
|
|
bcc .1
|
2017-10-26 18:01:54 +02:00
|
|
|
|
cmp #MLI.E.EOF
|
2017-02-22 08:31:16 +01:00
|
|
|
|
bne .9
|
|
|
|
|
lda #0
|
|
|
|
|
bra .9
|
2017-02-20 18:16:23 +01:00
|
|
|
|
|
2018-09-05 13:31:49 +02:00
|
|
|
|
.1 >PUSHYA Bytes To Write
|
2018-07-25 17:26:14 +02:00
|
|
|
|
>PUSHW ZPPtr1 Src Ptr
|
2018-07-24 18:00:24 +02:00
|
|
|
|
>LDA.G hDstFile
|
2017-02-21 18:01:30 +01:00
|
|
|
|
>SYSCALL FWrite
|
|
|
|
|
bcs .9
|
2017-02-20 18:16:23 +01:00
|
|
|
|
|
2018-09-05 13:31:49 +02:00
|
|
|
|
>LDA.G hCopyBuf
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL FreeMem
|
2017-02-22 08:31:16 +01:00
|
|
|
|
|
2017-06-23 14:04:39 +02:00
|
|
|
|
ldy #bQuiet
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bmi .8
|
|
|
|
|
|
2017-02-21 18:01:30 +01:00
|
|
|
|
lda #'.'
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL PutChar
|
2017-02-21 18:01:30 +01:00
|
|
|
|
rts
|
2017-04-03 17:35:03 +02:00
|
|
|
|
|
2017-06-23 14:04:39 +02:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
|
2017-02-21 18:01:30 +01:00
|
|
|
|
.9 ldy #CopyRC
|
|
|
|
|
sta (pData),y
|
2017-02-20 18:16:23 +01:00
|
|
|
|
|
2018-09-05 13:31:49 +02:00
|
|
|
|
>LDA.G hCopyBuf
|
2017-02-21 18:01:30 +01:00
|
|
|
|
beq CS.RUN.CopyEnd
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL FreeMem
|
2017-02-21 18:01:30 +01:00
|
|
|
|
*--------------------------------------
|
2018-08-11 12:57:57 +02:00
|
|
|
|
CS.RUN.CopyEnd >LDA.G hSrcFile
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL fclose
|
2017-06-28 16:34:11 +02:00
|
|
|
|
|
2018-09-05 13:31:49 +02:00
|
|
|
|
>LDA.G hDstFile
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL fclose
|
2017-02-22 17:32:02 +01:00
|
|
|
|
|
2018-11-12 22:34:55 +01:00
|
|
|
|
>STZ.G bCopy
|
2016-11-13 22:03:31 +01:00
|
|
|
|
clc
|
2017-10-04 17:12:03 +02:00
|
|
|
|
rts
|
2017-02-22 17:32:02 +01:00
|
|
|
|
.FIN
|
2017-02-21 18:01:30 +01:00
|
|
|
|
*--------------------------------------
|
2017-02-22 17:32:02 +01:00
|
|
|
|
CS.RUN.CheckErr bcs .1
|
2017-06-21 17:46:43 +02:00
|
|
|
|
|
2018-11-12 22:34:55 +01:00
|
|
|
|
>LDA.G bQuiet
|
2017-06-23 14:04:39 +02:00
|
|
|
|
bmi .8
|
|
|
|
|
|
|
|
|
|
>LDYA L.MSG.OK
|
2018-08-23 17:16:20 +02:00
|
|
|
|
>SYSCALL puts
|
2018-09-05 13:31:49 +02:00
|
|
|
|
.8 rts
|
2017-02-21 18:01:30 +01:00
|
|
|
|
|
2018-11-28 12:39:33 +01:00
|
|
|
|
.1 pha
|
2017-02-22 17:32:02 +01:00
|
|
|
|
>PUSHA
|
2018-08-23 17:16:20 +02:00
|
|
|
|
>PUSHBI 1
|
2017-02-21 18:01:30 +01:00
|
|
|
|
>LDYA L.MSG.ERR
|
|
|
|
|
|
2018-06-21 17:12:10 +02:00
|
|
|
|
>SYSCALL printf
|
2017-02-22 17:32:02 +01:00
|
|
|
|
|
2018-11-28 12:39:33 +01:00
|
|
|
|
>LDA.G bContinue
|
|
|
|
|
eor #$80
|
|
|
|
|
asl
|
2017-02-23 17:43:42 +01:00
|
|
|
|
pla
|
2017-06-23 14:04:39 +02:00
|
|
|
|
rts
|
2016-11-01 22:37:12 +01:00
|
|
|
|
*--------------------------------------
|
2017-06-27 18:00:32 +02:00
|
|
|
|
CS.RUN.BuildFilePath
|
2017-06-26 17:28:18 +02:00
|
|
|
|
ldy #hSrcBasePath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2017-06-27 18:00:32 +02:00
|
|
|
|
>PUSHYA
|
2017-06-26 17:28:18 +02:00
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
ldy #hSrcFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2017-06-27 18:00:32 +02:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
|
2017-10-03 17:33:30 +02:00
|
|
|
|
>SYSCALL StrCpy
|
2017-06-27 18:00:32 +02:00
|
|
|
|
|
2017-06-26 17:28:18 +02:00
|
|
|
|
>PUSHW ZPFileName
|
2018-07-16 07:52:52 +02:00
|
|
|
|
>LDYA ZPPtr1
|
2017-10-03 17:33:30 +02:00
|
|
|
|
>SYSCALL StrCat
|
2017-06-27 18:00:32 +02:00
|
|
|
|
|
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2017-10-04 17:12:03 +02:00
|
|
|
|
|
2017-06-26 17:28:18 +02:00
|
|
|
|
ldy #hDstBasePath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2017-06-27 18:00:32 +02:00
|
|
|
|
>PUSHYA
|
2017-06-26 17:28:18 +02:00
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
ldy #hDstFullPath
|
2017-06-30 17:11:29 +02:00
|
|
|
|
jsr CS.RUN.GetPathY
|
2017-06-27 18:00:32 +02:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
|
2017-10-03 17:33:30 +02:00
|
|
|
|
>SYSCALL StrCpy
|
2017-06-27 18:00:32 +02:00
|
|
|
|
|
2017-06-26 17:28:18 +02:00
|
|
|
|
ldy #hDstFileName
|
|
|
|
|
lda (pData),y
|
2017-06-27 18:00:32 +02:00
|
|
|
|
beq .1
|
2017-06-26 17:28:18 +02:00
|
|
|
|
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL GetMemPtr
|
2017-06-26 17:28:18 +02:00
|
|
|
|
>PUSHYA
|
2017-06-27 18:00:32 +02:00
|
|
|
|
bra .2
|
|
|
|
|
|
|
|
|
|
.1 >PUSHW ZPFileName
|
|
|
|
|
|
2018-07-16 07:52:52 +02:00
|
|
|
|
.2 >LDYA ZPPtr1
|
2017-10-03 17:33:30 +02:00
|
|
|
|
>SYSCALL StrCat
|
2017-06-27 18:00:32 +02:00
|
|
|
|
.FIN
|
2016-11-13 22:03:31 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-06-30 17:11:29 +02:00
|
|
|
|
CS.RUN.GetPathY lda (pData),y
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL GetMemPtr
|
2017-06-30 17:11:29 +02:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-11-12 22:34:55 +01:00
|
|
|
|
CS.RUN.IncCount >INCW.G Count
|
|
|
|
|
rts
|
2017-06-28 16:34:11 +02:00
|
|
|
|
*--------------------------------------
|
2017-02-20 18:16:23 +01:00
|
|
|
|
CS.DOEVENT sec
|
2016-11-01 22:37:12 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.QUIT jsr LeaveSubDir
|
|
|
|
|
bcc CS.QUIT
|
2017-06-27 22:37:45 +02:00
|
|
|
|
.DO X.COPY.TO.DEST=1
|
2018-08-11 12:57:57 +02:00
|
|
|
|
>LDA.G bCopy
|
2017-06-27 18:00:32 +02:00
|
|
|
|
bpl .1
|
2017-02-23 08:42:48 +01:00
|
|
|
|
|
2018-08-11 12:57:57 +02:00
|
|
|
|
>LDA.G hSrcFile
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL fclose
|
2018-08-11 12:57:57 +02:00
|
|
|
|
|
|
|
|
|
>LDA.G hDstFile
|
2018-07-20 13:51:08 +02:00
|
|
|
|
>SYSCALL fclose
|
2017-02-23 08:42:48 +01:00
|
|
|
|
|
2017-06-27 22:37:45 +02:00
|
|
|
|
.1 ldy #hDstFullPath
|
2017-06-27 18:00:32 +02:00
|
|
|
|
jsr CS.QUIT.FREE
|
2017-06-26 17:28:18 +02:00
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
ldy #hDstFilename
|
|
|
|
|
jsr CS.QUIT.FREE
|
2017-06-27 22:37:45 +02:00
|
|
|
|
.FIN
|
2017-06-27 18:00:32 +02:00
|
|
|
|
ldy #hSrcFullPath
|
|
|
|
|
jsr CS.QUIT.FREE
|
|
|
|
|
|
2018-08-11 12:57:57 +02:00
|
|
|
|
ldy #hFilter
|
|
|
|
|
jsr CS.QUIT.FREE
|
|
|
|
|
|
2017-06-27 18:00:32 +02:00
|
|
|
|
clc
|
2016-11-01 22:37:12 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-06-27 18:00:32 +02:00
|
|
|
|
CS.QUIT.FREE lda (pData),y
|
|
|
|
|
beq .9
|
2018-07-18 17:30:42 +02:00
|
|
|
|
>SYSCALL FreeMem
|
2017-06-27 18:00:32 +02:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2016-11-01 22:37:12 +01:00
|
|
|
|
MAN
|
2018-11-17 18:17:13 +01:00
|
|
|
|
SAVE USR/SRC/BIN/X.CPMVRM.S
|
|
|
|
|
LOAD USR/SRC/BIN/CP.S
|
2018-08-11 12:57:57 +02:00
|
|
|
|
ASM
|