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.DIR >CSTR "CP Dir :%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.ERR >PSTR "[%h]\r\n"
MSG.DONE >PSTR "%D File(s) Copied.\r\n"
@ -42,12 +42,17 @@ Index .BS 1
hDIRs .BS X.MAX.RECURSE
hDIRENTs .BS X.MAX.RECURSE
oDIRENTs .BS X.MAX.RECURSE*2
hSrcBasePath .BS 1
hDstBasePath .BS 1
hFilter .BS 1
hDstFileName .BS 1
hSrcFullPath .BS 1
hSrcFile .BS 1
hDstBasePath .BS 1
hDstFileName .BS 1
hDstFullPath .BS 1
hDstFile .BS 1
bPause .BS 1
bCopy .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.DIR >CSTR "MV Dir :%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.ERR >PSTR "[%h]\r\n"
MSG.DONE >PSTR "%D File(s) Moved.\r\n"

View File

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

View File

@ -15,9 +15,9 @@ AUTO 6
.INB /A2OSX.BUILD/INC/LIBGFX.I
*--------------------------------------
ZPBase .EQ ZPDRV
ZPShiftLo .EQ ZPDRV+2
ZPShiftHi .EQ ZPDRV+4
ZPCount .EQ ZPDRV+6
ZPCount .EQ ZPDRV+2
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
@ -165,6 +165,9 @@ L.MOD7.0 .DA MOD7.0
.DA MOD7.512
L.Shift0.Lo .DA Shift0.lo
L.Shift0.Hi .DA Shift0.hi
L.DIVMOD7Y0 .DA DIVMOD7Y0
.DA DIVMOD7Y1
.DA DIVMOD7Y2
.DA 0 end or relocation
*--------------------------------------
BADCALL lda #MLI.ERR.BADCALL
@ -682,14 +685,55 @@ FILLRECT >STYA ZPBase
* 10 : SrcY2
* 12 : DestX
* 14 : DestY
* 16 : BM Struct Ptr
* 18 : Save Ptr
* 16 : SrcPtr
* 18 : DstPtr
*--------------------------------------
BITBLT >STYA ZPBase
lda (ZPBase)
ldy #S.CB.DstPtr+1
.1 lda (ZPBase),y
sta CB.Cache,y
dey
bpl .1
clc
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
*--------------------------------------
Shift0.lo .BS 128

View File

@ -21,6 +21,22 @@ Mono.Masks .DA #%00000001
.DA #%00100000
.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)
* 4 bytes * 7 mods
*--------------------------------------