Kernel version 0.9 : CP,RM,MV, Code rewrite in progress....#3

This commit is contained in:
Rémy GIBERT 2017-06-30 17:11:29 +02:00
parent 188e0c6393
commit 915226f209
7 changed files with 70 additions and 85 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,7 @@
<NotepadPlus>
<UserLang name="S-C MASM 65C02" ext="" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="1" decimalSeparator="0" />
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="1" decimalSeparator="1" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="yes" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="yes" />
</Settings>
<KeywordLists>
@ -24,29 +24,29 @@
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">.BS&#x000D;&#x000A;.DA&#x000D;&#x000A;.AS&#x000D;&#x000A;.AT&#x000D;&#x000A;.EQ&#x000D;&#x000A;.MA&#x000D;&#x000A;.EM&#x000D;&#x000A;.OR&#x000D;&#x000A;.TF&#x000D;&#x000A;.LIST&#x000D;&#x000A;.HS&#x000D;&#x000A;.IN&#x000D;&#x000A;.INB&#x000D;&#x000A;.OP&#x000D;&#x000A;.TA&#x000D;&#x000A;.DO&#x000D;&#x000A;.ELSE&#x000D;&#x000A;.EM&#x000D;&#x000A;.FIN&#x000D;&#x000A;.PH&#x000D;&#x000A;.EP&#x000D;&#x000A;.DUMMY&#x000D;&#x000A;.ED</Keywords>
<Keywords name="Keywords1">.BS&#x000D;&#x000A;.DA&#x000D;&#x000A;.AS&#x000D;&#x000A;.AT&#x000D;&#x000A;.EQ&#x000D;&#x000A;.MA&#x000D;&#x000A;.EM&#x000D;&#x000A;.OR&#x000D;&#x000A;.TF&#x000D;&#x000A;.LIST&#x000D;&#x000A;.HS&#x000D;&#x000A;.IN&#x000D;&#x000A;.INB&#x000D;&#x000A;.OP&#x000D;&#x000A;.TA&#x000D;&#x000A;.EM&#x000D;&#x000A;.PH&#x000D;&#x000A;.EP&#x000D;&#x000A;.DUMMY&#x000D;&#x000A;.ED&#x000D;&#x000A;.DO&#x000D;&#x000A;.ELSE&#x000D;&#x000A;.FIN</Keywords>
<Keywords name="Keywords2">adc&#x000D;&#x000A;and&#x000D;&#x000A;asl&#x000D;&#x000A;bit&#x000D;&#x000A;brk&#x000D;&#x000A;clc&#x000D;&#x000A;cld&#x000D;&#x000A;cli&#x000D;&#x000A;clv&#x000D;&#x000A;cmp&#x000D;&#x000A;cpx&#x000D;&#x000A;cpy&#x000D;&#x000A;dec&#x000D;&#x000A;dex&#x000D;&#x000A;dey&#x000D;&#x000A;eor&#x000D;&#x000A;inc&#x000D;&#x000A;inx&#x000D;&#x000A;iny&#x000D;&#x000A;lda&#x000D;&#x000A;ldx&#x000D;&#x000A;ldy&#x000D;&#x000A;lsr&#x000D;&#x000A;nop&#x000D;&#x000A;ora&#x000D;&#x000A;rmb&#x000D;&#x000A;rol&#x000D;&#x000A;ror&#x000D;&#x000A;rti&#x000D;&#x000A;rts&#x000D;&#x000A;sbc&#x000D;&#x000A;sec&#x000D;&#x000A;sed&#x000D;&#x000A;sei&#x000D;&#x000A;smb&#x000D;&#x000A;sta&#x000D;&#x000A;stp&#x000D;&#x000A;stx&#x000D;&#x000A;sty&#x000D;&#x000A;stz&#x000D;&#x000A;tax&#x000D;&#x000A;tay&#x000D;&#x000A;trb&#x000D;&#x000A;tsb&#x000D;&#x000A;tsx&#x000D;&#x000A;txa&#x000D;&#x000A;txs&#x000D;&#x000A;tya&#x000D;&#x000A;wai</Keywords>
<Keywords name="Keywords3">&gt;</Keywords>
<Keywords name="Keywords3">$&#x000D;&#x000A;%&#x000D;&#x000A;/&#x000D;&#x000A;#&#x000D;&#x000A;&amp;</Keywords>
<Keywords name="Keywords4">.1&#x000D;&#x000A;.2&#x000D;&#x000A;.3&#x000D;&#x000A;.4&#x000D;&#x000A;.5&#x000D;&#x000A;.6&#x000D;&#x000A;.7&#x000D;&#x000A;.8&#x000D;&#x000A;.9&#x000D;&#x000A;</Keywords>
<Keywords name="Keywords5">AUTO&#x000D;&#x000A;MAN&#x000D;&#x000A;LOAD&#x000D;&#x000A;SAVE&#x000D;&#x000A;ASM&#x000D;&#x000A;CREATE&#x000D;&#x000A;INC&#x000D;&#x000A;LOMEM&#x000D;&#x000A;PREFIX&#x000D;&#x000A;PR#&#x000D;&#x000A;NEW&#x000D;&#x000A;BLOAD&#x000D;&#x000A;BSAVE&#x000D;&#x000A;TEXT&#x000D;&#x000A;DELETE&#x000D;&#x000A;</Keywords>
<Keywords name="Keywords6">pha&#x000D;&#x000A;php&#x000D;&#x000A;phx&#x000D;&#x000A;phy&#x000D;&#x000A;pla&#x000D;&#x000A;plp&#x000D;&#x000A;plx&#x000D;&#x000A;ply</Keywords>
<Keywords name="Keywords7">bbr&#x000D;&#x000A;bbs&#x000D;&#x000A;bcc&#x000D;&#x000A;bcs&#x000D;&#x000A;beq&#x000D;&#x000A;bmi&#x000D;&#x000A;bne&#x000D;&#x000A;bpl&#x000D;&#x000A;bra&#x000D;&#x000A;jmp&#x000D;&#x000A;jsr&#x000D;&#x000A;bvc&#x000D;&#x000A;bvs</Keywords>
<Keywords name="Keywords8">$&#x000D;&#x000A;%&#x000D;&#x000A;/&#x000D;&#x000A;#&#x000D;&#x000A;&amp;&#x000D;&#x000A;</Keywords>
<Keywords name="Keywords8">&gt;</Keywords>
<Keywords name="Delimiters"></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="008040" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="00B32D" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="A51505" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="00B32D" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="800040" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="CC1F15" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />

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.OVERWRITE >CSTR "\r\nOverwrite [Yes,No,All]?"
MSG.OVERWRITE >CSTR "\r\nOverwrite %S [Yes,No,All]?"
MSG.OK >PSTR "[OK]\r\n"
MSG.ERR >PSTR "[%h]\r\n"
MSG.DONE >PSTR "%D File(s) Copied.\r\n"

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.OVERWRITE >CSTR "\r\nOverwrite [Yes,No,All]?"
MSG.OVERWRITE >CSTR "\r\nOverwrite %S [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

@ -248,11 +248,11 @@ CS.RUN >SYSCALL GetC
sta (pData),y
ldy #hSrcFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>SYSCALL RemoveYA
bcs .22
jsr CS.RUN.CheckErr Success!!!
jsr CS.RUN.IncCount
jmp CS.RUN.NEXT
@ -323,13 +323,12 @@ CS.RUN.LEAVE jsr LeaveSubDir exit this sub dir....
jsr CS.RUN.BuildFilePath
ldy #hSrcFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>STYA ZPPtr1
>PUSHYA
>LDYA L.MSG.DIR
>SYSCALL CPrintFYA
jsr CS.RUN.DIR.MSG
bcs CS.RUN.LEAVE.RTS
>LDYA ZPPtr1
@ -358,20 +357,16 @@ CS.RUN.LEAVE jsr LeaveSubDir exit this sub dir....
CS.RUN.LEAVE.RTS
rts
*--------------------------------------
CS.RUN.DIR ldy #bQuiet
lda (pData),y
bmi .10
jsr CS.RUN.DIR.MSG
CS.RUN.DIR jsr CS.RUN.DIR.MSG
bcs CS.RUN.LEAVE.RTS
.10 .DO X.COPY.TO.DEST=1
.DO X.COPY.TO.DEST=1
>PUSHW L.STAT
ldy #hDstFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
>SYSCALL Stat
@ -381,15 +376,7 @@ CS.RUN.DIR ldy #bQuiet
lda (pData),y
bmi .21 no prompt, nothing to create, enter subdir
ldy #bQuiet
lda (pData),y
bpl .15
jsr CS.RUN.DIR.MSG
bcs CS.RUN.DIR.RTS
.15 >LDYA L.MSG.OVERWRITE
>SYSCALL CPrintFYA
jsr CS.RUN.OVERWRITE.MSG
bcs CS.RUN.DIR.RTS
.1 >SYSCALL Sleep
@ -418,8 +405,7 @@ CS.RUN.DIR ldy #bQuiet
bra .4
.3 ldy #hDstFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>SYSCALL MKDirYA
@ -435,20 +421,16 @@ CS.RUN.DIR ldy #bQuiet
sec
CS.RUN.DIR.RTS rts
*--------------------------------------
CS.RUN.FILE ldy #bQuiet
lda (pData),y
bmi .14
jsr CS.RUN.FILE.MSG
CS.RUN.FILE jsr CS.RUN.FILE.MSG
bcs CS.RUN.DIR.RTS
.14 .DO X.COPY.TO.DEST=1
.DO X.COPY.TO.DEST=1
>PUSHW L.STAT
ldy #hDstFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
>SYSCALL Stat
@ -458,15 +440,10 @@ CS.RUN.FILE ldy #bQuiet
lda (pData),y
bmi .2 no prompt, ovverwrite
ldy #bQuiet
lda (pData),y
bpl .15
jsr CS.RUN.FILE.MSG
bcs .90
.15 >LDYA L.MSG.OVERWRITE
>SYSCALL CPrintFYA
jsr CS.RUN.OVERWRITE.MSG
bcs .9
.1 >SYSCALL Sleep
@ -495,12 +472,12 @@ CS.RUN.FILE ldy #bQuiet
.2 .DO X.DELETE.SOURCE=1 mv file, check if srcbase=dstbase
ldy #hSrcBasePath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
ldy #hDstBasePath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
>SYSCALL PStrMatch
bcs .3 not same dir, go copy/delete
@ -533,50 +510,59 @@ CS.RUN.FILE ldy #bQuiet
sec
rts
*--------------------------------------
CS.RUN.DIR.MSG .DO X.COPY.TO.DEST=1
CS.RUN.DIR.MSG sec
.HS 90 bcc opcode
CS.RUN.FILE.MSG clc
ldy #bQuiet
lda (pData),y
bmi .8
php
.DO X.COPY.TO.DEST=1
ldy #hSrcFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
.FIN
ldy #hSrcFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
plp
bcc .1
>LDYA L.MSG.DIR
>SYSCALL CPrintFYA
bcs .2
.1 >LDYA L.MSG.FILE
.2 >SYSCALL CPrintFYA
rts
.8 clc
rts
*--------------------------------------
CS.RUN.FILE.MSG .DO X.COPY.TO.DEST=1
.DO X.COPY.TO.DEST=1
CS.RUN.OVERWRITE.MSG
ldy #hDstFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
.FIN
ldy #hSrcFullPath
lda (pData),y
>SYSCALL GetMemPtrA
>PUSHYA
>LDYA L.MSG.FILE
>LDYA L.MSG.OVERWRITE
>SYSCALL CPrintFYA
rts
.FIN
*--------------------------------------
.DO X.COPY.TO.DEST=1
.DO X.DELETE.SOURCE=1
CS.RUN.Rename ldy #hDstFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
ldy #hSrcFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
>SYSCALL Rename
@ -639,8 +625,7 @@ CS.RUN.Open phy Save Filename
>PUSHA
ply
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
>SYSCALL FOpen
@ -749,13 +734,11 @@ CS.RUN.CheckErr bcs .1
*--------------------------------------
CS.RUN.BuildFilePath
ldy #hSrcBasePath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
ldy #hSrcFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>STYA ZPPtr1
>PUSHYA
@ -767,13 +750,11 @@ CS.RUN.BuildFilePath
.DO X.COPY.TO.DEST=1
ldy #hDstBasePath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>PUSHYA
ldy #hDstFullPath
lda (pData),y
>SYSCALL GetMemPtrA
jsr CS.RUN.GetPathY
>STYA ZPPtr1
>PUSHYA
@ -794,6 +775,10 @@ CS.RUN.BuildFilePath
.FIN
rts
*--------------------------------------
CS.RUN.GetPathY lda (pData),y
>SYSCALL GetMemPtrA
rts
*--------------------------------------
CS.RUN.IncCount ldy #Count
lda (pData),y
inc