Kernel version 0.9 : MV,CP,RM.....some more progress:many bugs fixed

This commit is contained in:
Rémy GIBERT 2017-06-27 22:37:45 +02:00
parent 503314812d
commit fd11558386
9 changed files with 124 additions and 37 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -26,7 +26,7 @@ OptionVars .DA #bContinue,#bRecurse,#bNoConfirm,#bQuiet,#bContinue,#bRecurse,#b
MSG.USAGE >CSTR "Usage : CP [Src File/Dir, *,? wildcards allowed]\r\n -C : Continue on error\r\n -Q : Quiet\r\n -R : Recurse subdirectories\r\n -Y : Dont't prompt for override\r\n" MSG.USAGE >CSTR "Usage : CP [Src File/Dir, *,? wildcards allowed]\r\n -C : Continue on error\r\n -Q : Quiet\r\n -R : Recurse subdirectories\r\n -Y : Dont't prompt for override\r\n"
MSG.DIR >CSTR "CP Dir :%S to %S..." MSG.DIR >CSTR "CP Dir :%S to %S..."
MSG.FILE >CSTR "CP File:%S to %S..." MSG.FILE >CSTR "CP File:%S to %S..."
MSG.OVERWRTE >CSTR "\r\nOverwrite [Yes,No,All]?" MSG.OVERWRITE >CSTR "\r\nOverwrite [Yes,No,All]?"
MSG.OK >PSTR "[OK]\r\n" MSG.OK >PSTR "[OK]\r\n"
MSG.ERR >PSTR "[%h]\r\n" MSG.ERR >PSTR "[%h]\r\n"
MSG.DONE >PSTR "%D File(s) Copied.\r\n" MSG.DONE >PSTR "%D File(s) Copied.\r\n"
@ -42,12 +42,17 @@ Index .BS 1
hDIRs .BS X.MAX.RECURSE hDIRs .BS X.MAX.RECURSE
hDIRENTs .BS X.MAX.RECURSE hDIRENTs .BS X.MAX.RECURSE
oDIRENTs .BS X.MAX.RECURSE*2 oDIRENTs .BS X.MAX.RECURSE*2
hSrcBasePath .BS 1 hSrcBasePath .BS 1
hDstBasePath .BS 1
hFilter .BS 1 hFilter .BS 1
hDstFileName .BS 1 hSrcFullPath .BS 1
hSrcFile .BS 1 hSrcFile .BS 1
hDstBasePath .BS 1
hDstFileName .BS 1
hDstFullPath .BS 1
hDstFile .BS 1 hDstFile .BS 1
bPause .BS 1 bPause .BS 1
bCopy .BS 1 bCopy .BS 1
hToDelete .BS 1 hToDelete .BS 1

View File

@ -26,7 +26,7 @@ OptionVars .DA #bContinue,#bRecurse,#bNoConfirm,#bQuiet,#bContinue,#bRecurse,#b
MSG.USAGE >CSTR "Usage : MV [Src File/Dir, *,? wildcards allowed]\r\n -C : Continue on error\r\n -Q : Quiet\r\n -R : Recurse subdirectories\r\n -Y : Dont't prompt for override\r\n" MSG.USAGE >CSTR "Usage : MV [Src File/Dir, *,? wildcards allowed]\r\n -C : Continue on error\r\n -Q : Quiet\r\n -R : Recurse subdirectories\r\n -Y : Dont't prompt for override\r\n"
MSG.DIR >CSTR "MV Dir :%S to %S..." MSG.DIR >CSTR "MV Dir :%S to %S..."
MSG.FILE >CSTR "MV File:%S to %S..." MSG.FILE >CSTR "MV File:%S to %S..."
MSG.OVERWRTE >CSTR "\r\nOverwrite [Yes,No,All]?" MSG.OVERWRITE >CSTR "\r\nOverwrite [Yes,No,All]?"
MSG.OK >PSTR "[OK]\r\n" MSG.OK >PSTR "[OK]\r\n"
MSG.ERR >PSTR "[%h]\r\n" MSG.ERR >PSTR "[%h]\r\n"
MSG.DONE >PSTR "%D File(s) Moved.\r\n" MSG.DONE >PSTR "%D File(s) Moved.\r\n"

View File

@ -52,7 +52,7 @@ bCopy .BS 1
hToDelete .BS 1 hToDelete .BS 1
RC .BS 1 RC .BS 1
bWildcard .BS 1 bWildcard .BS 1
CopyRC .BS 1
bContinue .BS 1 bContinue .BS 1
bRecurse .BS 1 bRecurse .BS 1
bNoConfirm .BS 1 bNoConfirm .BS 1

View File

@ -34,7 +34,7 @@ L.MSG.USAGE .DA MSG.USAGE
L.MSG.DIR .DA MSG.DIR L.MSG.DIR .DA MSG.DIR
L.MSG.FILE .DA MSG.FILE L.MSG.FILE .DA MSG.FILE
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
L.MSG.OVERWRTE .DA MSG.OVERWRTE L.MSG.OVERWRITE .DA MSG.OVERWRITE
.FIN .FIN
L.MSG.OK .DA MSG.OK L.MSG.OK .DA MSG.OK
L.MSG.ERR .DA MSG.ERR L.MSG.ERR .DA MSG.ERR
@ -291,20 +291,17 @@ CS.RUN.LEAVE jsr LeaveSubDir exit this sub dir....
jsr GetEntry jsr GetEntry
bcs * bcs *
>PUSHW ZPFileName ldy #hSrcFullPath
ldy #hSrcBasePath
lda (pData),y lda (pData),y
>SYSCALL GetMemPtrA >SYSCALL GetMemPtrA
>STYA ZPPtr1
>PUSHYA >PUSHYA
>LDYA L.MSG.DIR >LDYA L.MSG.DIR
>SYSCALL CPrintFYA >SYSCALL CPrintFYA
bcs CS.RUN.LEAVE.RTS bcs CS.RUN.LEAVE.RTS
jsr CS.RUN.GetSrcFilePath >LDYA ZPPtr1
>LDYAI UsrBuf256
>SYSCALL RemoveYA >SYSCALL RemoveYA
jsr CS.RUN.CheckErr jsr CS.RUN.CheckErr
bcs .99 bcs .99
@ -313,7 +310,6 @@ CS.RUN.LEAVE jsr LeaveSubDir exit this sub dir....
jmp CS.RUN.NEXT jmp CS.RUN.NEXT
.99 ldy #bQuiet .99 ldy #bQuiet
lda (pData),y lda (pData),y
bmi .91 bmi .91
@ -331,17 +327,15 @@ CS.RUN.LEAVE jsr LeaveSubDir exit this sub dir....
CS.RUN.LEAVE.RTS CS.RUN.LEAVE.RTS
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN.DIR .DO X.COPY.TO.DEST=1 CS.RUN.DIR ldy #bQuiet
ldy #hSrcFullPath
lda (pData),y lda (pData),y
>SYSCALL GetMemPtrA bmi .10
>PUSHYA
>LDYA L.MSG.DIR jsr CS.RUN.DIR.MSG
>SYSCALL CPrintFYA
bcs CS.RUN.LEAVE.RTS bcs CS.RUN.LEAVE.RTS
.10 .DO X.COPY.TO.DEST=1
>PUSHW L.STAT >PUSHW L.STAT
ldy #hDstFullPath ldy #hDstFullPath
@ -356,7 +350,14 @@ CS.RUN.DIR .DO X.COPY.TO.DEST=1
lda (pData),y lda (pData),y
bmi .21 no prompt, nothing to create, enter subdir bmi .21 no prompt, nothing to create, enter subdir
>LDYA L.MSG.OVERWRTE ldy #bQuiet
lda (pData),y
bpl .15
jsr CS.RUN.DIR.MSG
bcs CS.RUN.DIR.RTS
.15 >LDYA L.MSG.OVERWRITE
>SYSCALL CPrintFYA >SYSCALL CPrintFYA
bcs CS.RUN.DIR.RTS bcs CS.RUN.DIR.RTS
@ -433,7 +434,7 @@ CS.RUN.FILE ldy #bQuiet
jsr CS.RUN.FILE.MSG jsr CS.RUN.FILE.MSG
bcs .90 bcs .90
.15 >LDYA L.MSG.OVERWRTE .15 >LDYA L.MSG.OVERWRITE
>SYSCALL CPrintFYA >SYSCALL CPrintFYA
bcs .9 bcs .9
@ -474,7 +475,9 @@ CS.RUN.FILE ldy #bQuiet
bcs .3 not same dir, go copy/delete bcs .3 not same dir, go copy/delete
jsr CS.RUN.Rename jsr CS.RUN.Rename
bra .9 jsr CS.RUN.CheckErr
bcs .9
jmp CS.RUN.NEXT
.FIN .FIN
.3 jsr CS.RUN.CopyStart .3 jsr CS.RUN.CopyStart
@ -485,7 +488,7 @@ CS.RUN.FILE ldy #bQuiet
.4 .DO X.DELETE.SOURCE=1 .4 .DO X.DELETE.SOURCE=1
ldy #hDstFullPath ldy #hSrcFullPath
lda (pData),y lda (pData),y
>SYSCALL GetMemPtrA >SYSCALL GetMemPtrA
@ -500,10 +503,27 @@ CS.RUN.FILE ldy #bQuiet
.9 rts .9 rts
.99 ldy #RC .99 ldy #RC
lda (pData),y get global RC in case of bContnue lda (pData),y get global RC in case of bContinue
sec sec
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN.DIR.MSG .DO X.COPY.TO.DEST=1
ldy #hSrcFullPath
lda (pData),y
>SYSCALL GetMemPtrA
>PUSHYA
.FIN
ldy #hSrcFullPath
lda (pData),y
>SYSCALL GetMemPtrA
>PUSHYA
>LDYA L.MSG.DIR
>SYSCALL CPrintFYA
rts
*--------------------------------------
CS.RUN.FILE.MSG .DO X.COPY.TO.DEST=1 CS.RUN.FILE.MSG .DO X.COPY.TO.DEST=1
ldy #hDstFullPath ldy #hDstFullPath
@ -512,7 +532,7 @@ CS.RUN.FILE.MSG .DO X.COPY.TO.DEST=1
>PUSHYA >PUSHYA
.FIN .FIN
ldy #hDstFullPath ldy #hSrcFullPath
lda (pData),y lda (pData),y
>SYSCALL GetMemPtrA >SYSCALL GetMemPtrA
>PUSHYA >PUSHYA
@ -771,6 +791,7 @@ CS.DOEVENT sec
CS.QUIT jsr LeaveSubDir CS.QUIT jsr LeaveSubDir
bcc CS.QUIT bcc CS.QUIT
.DO X.COPY.TO.DEST=1
ldy #bCopy ldy #bCopy
lda (pData),y lda (pData),y
bpl .1 bpl .1
@ -778,21 +799,22 @@ CS.QUIT jsr LeaveSubDir
ldy #hSrcFile ldy #hSrcFile
lda (pData),y lda (pData),y
>SYSCALL FCloseA >SYSCALL FCloseA
ldy #hDstFile ldy #hDstFile
lda (pData),y lda (pData),y
>SYSCALL FCloseA >SYSCALL FCloseA
.1 ldy #hToDelete .1 ldy #hDstFullPath
jsr CS.QUIT.FREE jsr CS.QUIT.FREE
ldy #hDstFilename ldy #hDstFilename
jsr CS.QUIT.FREE jsr CS.QUIT.FREE
ldy #hFilter .FIN
ldy #hToDelete
jsr CS.QUIT.FREE jsr CS.QUIT.FREE
ldy #hDstFullPath ldy #hFilter
jsr CS.QUIT.FREE jsr CS.QUIT.FREE
ldy #hSrcFullPath ldy #hSrcFullPath
@ -808,5 +830,5 @@ CS.QUIT.FREE lda (pData),y
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE /A2OSX.SRC/BIN/X.CPMVRM.S SAVE /A2OSX.SRC/BIN/X.CPMVRM.S
LOAD /A2OSX.SRC/BIN/MV.S LOAD /A2OSX.SRC/BIN/CP.S
ASM ASM

View File

@ -15,9 +15,9 @@ AUTO 6
.INB /A2OSX.BUILD/INC/LIBGFX.I .INB /A2OSX.BUILD/INC/LIBGFX.I
*-------------------------------------- *--------------------------------------
ZPBase .EQ ZPDRV ZPBase .EQ ZPDRV
ZPShiftLo .EQ ZPDRV+2 ZPCount .EQ ZPDRV+2
ZPShiftHi .EQ ZPDRV+4
ZPCount .EQ ZPDRV+6
*-------------------------------------- *--------------------------------------
* File Header (16 Bytes) * File Header (16 Bytes)
*-------------------------------------- *--------------------------------------
@ -165,6 +165,9 @@ L.MOD7.0 .DA MOD7.0
.DA MOD7.512 .DA MOD7.512
L.Shift0.Lo .DA Shift0.lo L.Shift0.Lo .DA Shift0.lo
L.Shift0.Hi .DA Shift0.hi L.Shift0.Hi .DA Shift0.hi
L.DIVMOD7Y0 .DA DIVMOD7Y0
.DA DIVMOD7Y1
.DA DIVMOD7Y2
.DA 0 end or relocation .DA 0 end or relocation
*-------------------------------------- *--------------------------------------
BADCALL lda #MLI.ERR.BADCALL BADCALL lda #MLI.ERR.BADCALL
@ -682,14 +685,55 @@ FILLRECT >STYA ZPBase
* 10 : SrcY2 * 10 : SrcY2
* 12 : DestX * 12 : DestX
* 14 : DestY * 14 : DestY
* 16 : BM Struct Ptr * 16 : SrcPtr
* 18 : Save Ptr * 18 : DstPtr
*-------------------------------------- *--------------------------------------
BITBLT >STYA ZPBase BITBLT >STYA ZPBase
lda (ZPBase) ldy #S.CB.DstPtr+1
.1 lda (ZPBase),y
sta CB.Cache,y
dey
bpl .1
clc clc
rts rts
*-------------------------------------- *--------------------------------------
* IN:
* Y = LO
* X = HI
* OUT:
* A = DIV
* X = MOD
*--------------------------------------
DIVMOD7YX jmp (L.DIVMOD7Y0,x)
DIVMOD7Y0 lda DIV7.0,y
ldx MOD7.0,y
rts
DIVMOD7Y1 lda DIV7.256,y
clc
adc #$24
ldx MOD7.256,y
rts
DIVMOD7Y2 lda DIV7.512,y
clc
adc #$49
ldx MOD7.512,y
rts
*--------------------------------------
DRV.CS.END DRV.CS.END
*-------------------------------------- *--------------------------------------
Shift0.lo .BS 128 Shift0.lo .BS 128

View File

@ -21,6 +21,22 @@ Mono.Masks .DA #%00000001
.DA #%00100000 .DA #%00100000
.DA #%01000000 .DA #%01000000
*-------------------------------------- *--------------------------------------
Mono.Head .DA #%01111111
.DA #%01111110
.DA #%01111100
.DA #%01111000
.DA #%01110000
.DA #%01100000
.DA #%01000000
*--------------------------------------
Mono.Tail .DA #%00000001
.DA #%00000011
.DA #%00000111
.DA #%00001111
.DA #%00011111
.DA #%00111111
.DA #%01111111
*--------------------------------------
* bits to "and" to reset color of pixel (0 means nothing to do) * bits to "and" to reset color of pixel (0 means nothing to do)
* 4 bytes * 7 mods * 4 bytes * 7 mods
*-------------------------------------- *--------------------------------------