diff --git a/.Floppies/A2OSX.BOOT.po b/.Floppies/A2OSX.BOOT.po index 436ce9ae..280aa872 100644 Binary files a/.Floppies/A2OSX.BOOT.po and b/.Floppies/A2OSX.BOOT.po differ diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index d55b0f9c..804452e7 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.SRC.po b/.Floppies/A2OSX.SRC.po index 06110f22..35d0ba8d 100644 Binary files a/.Floppies/A2OSX.SRC.po and b/.Floppies/A2OSX.SRC.po differ diff --git a/BIN/CP.S.txt b/BIN/CP.S.txt index f97d2273..9f24f7e0 100644 --- a/BIN/CP.S.txt +++ b/BIN/CP.S.txt @@ -29,6 +29,7 @@ MSG.FILE >CSTR "CP File:%S%S to %S%S..." MSG.OVERWRTE >CSTR "Overwrite [Yes,No,All]?" MSG.OK >PSTR "[OK]\r\n" MSG.ERR >PSTR "[%h]\r\n" +MSG.DONE >PSTR "%D File(s) Copied.\r\n" *-------------------------------------- STAT .BS S.STAT ArgCount .BS 1 @@ -54,6 +55,7 @@ RC .BS 1 bContinue .BS 1 bRecurse .BS 1 bNoConfirm .BS 1 +Count .BS 2 DS.END .ED *-------------------------------------- diff --git a/BIN/MV.S.txt b/BIN/MV.S.txt index 9c39a89a..0a7d867f 100644 --- a/BIN/MV.S.txt +++ b/BIN/MV.S.txt @@ -29,6 +29,7 @@ MSG.FILE >CSTR "MV File:%S%S to %S%S..." MSG.OVERWRTE >CSTR "Overwrite [Yes,No,All]?" MSG.OK >PSTR "[OK]\r\n" MSG.ERR >PSTR "[%h]\r\n" +MSG.DONE >PSTR "%D File(s) Moved.\r\n" *-------------------------------------- STAT .BS S.STAT ArgCount .BS 1 @@ -54,6 +55,7 @@ CopyRC .BS 1 bContinue .BS 1 bRecurse .BS 1 bNoConfirm .BS 1 +Count .BS 2 DS.END .ED *-------------------------------------- diff --git a/BIN/RM.S.txt b/BIN/RM.S.txt index 9e6e71c3..4fc5a244 100644 --- a/BIN/RM.S.txt +++ b/BIN/RM.S.txt @@ -28,6 +28,7 @@ MSG.DIR >CSTR "RM Dir :%S%S..." MSG.FILE >CSTR "RM File:%S%S..." MSG.OK >PSTR "[OK]\r\n" MSG.ERR >PSTR "[%h]\r\n" +MSG.DONE >PSTR "%D File(s) Removed.\r\n" *-------------------------------------- STAT .BS S.STAT ArgCount .BS 1 @@ -53,6 +54,7 @@ CopyRC .BS 1 bContinue .BS 1 bRecurse .BS 1 bNoConfirm .BS 1 +Count .BS 2 DS.END .ED *-------------------------------------- diff --git a/BIN/X.CPMVRM.S.txt b/BIN/X.CPMVRM.S.txt index 9d50df76..da74d776 100644 --- a/BIN/X.CPMVRM.S.txt +++ b/BIN/X.CPMVRM.S.txt @@ -38,6 +38,7 @@ L.MSG.OVERWRTE .DA MSG.OVERWRTE .FIN L.MSG.OK .DA MSG.OK L.MSG.ERR .DA MSG.ERR +L.MSG.DONE .DA MSG.DONE L.STAT .DA STAT .DA 0 *-------------------------------------- @@ -127,9 +128,15 @@ CS.INIT >SYSCALL GetArgC bcs .99 .FIN -.8 lda (pPs) - ora #S.PS.F.EVENT Now accept events - sta (pPs) +.8 ldy #Count + lda #0 + sta (pData),y + iny + sta (pData),y + +* lda (pPs) +* ora #S.PS.F.EVENT Now accept events +* sta (pPs) clc rts @@ -267,7 +274,14 @@ CS.RUN.LEAVE jsr LeaveSubDir exit this sub dir.... jmp CS.RUN.NEXT -.99 ldy #RC +.99 ldy #Count+1 + >PUSHB (pData),y + dey + >PUSHB (pData),y + >LDYA L.MSG.DONE + >SYSCALL PPrintFYA + + ldy #RC lda (pData),y get global RC in case of bContinue sec .9 rts @@ -344,7 +358,7 @@ CS.RUN.DIR .DO X.COPY.TO.DEST=1 jmp EnterSubDirYA .99 ldy #RC - lda (pData),y get global RC in case of bContnue + lda (pData),y get global RC in case of bContinue sec CS.RUN.DIR.RTS rts *-------------------------------------- @@ -410,7 +424,23 @@ CS.RUN.FILE .DO X.COPY.TO.DEST=1 .12 jsr GetEntry get back current entry corrupted by SLEEP -.2 jsr CS.RUN.CopyStart +.2 .DO X.DELETE.SOURCE=1 mv file, check if srcbase=dstbase + ldy #hSrcBasePath + lda (pData),y + >SYSCALL GetMemPtrA + >PUSHYA + ldy #hDstBasePath + lda (pData),y + >SYSCALL GetMemPtrA + >PUSHYA + >SYSCALL PStrMatch + bcs .3 not same dir, go copy/delete + + jsr CS.RUN.Rename + bra .9 + .FIN + +.3 jsr CS.RUN.CopyStart bcc .4 jsr CS.RUN.CheckErr rts @@ -435,6 +465,21 @@ CS.RUN.FILE .DO X.COPY.TO.DEST=1 lda (pData),y get global RC in case of bContnue sec rts +*-------------------------------------- + .DO X.COPY.TO.DEST=1 + .DO X.DELETE.SOURCE=1 +CS.RUN.Rename ldy #hDstFile + lda (pData),y + >SYSCALL GetMemPtrA + >PUSHYA + + ldy #hSrcBasePath + jsr CS.RUN.GetFilePath + >PUSHYA + >SYSCALL Rename + rts + .FIN + .FIN *-------------------------------------- .DO X.COPY.TO.DEST=1 CS.RUN.CopyStart @@ -560,7 +605,17 @@ CS.RUN.CopyEnd ldy #hSrcFile .FIN *-------------------------------------- CS.RUN.CheckErr bcs .1 - >LDYA L.MSG.OK + ldy #Count + lda (pData),y + inc + sta (pData),y + bne .10 + iny + lda (pData),y + inc + sta (pData),y + +.10 >LDYA L.MSG.OK >SYSCALL PPrintFYA rts @@ -635,3 +690,5 @@ CS.QUIT jsr LeaveSubDir *-------------------------------------- MAN SAVE /A2OSX.SRC/BIN/X.CPMVRM.S +LOAD /A2OSX.SRC/BIN/MV.S +ASM diff --git a/INC/A2osX.I.txt b/INC/A2osX.I.txt index ec485271..ffa82a20 100644 --- a/INC/A2osX.I.txt +++ b/INC/A2osX.I.txt @@ -293,7 +293,6 @@ SYSMGR.ERRSYN .EQ $CF Syntax Error SYSMGR.ERRENVF .EQ $CE Env is Full SYSMGR.ERRIBIN .EQ $CD Invalid BIN format SYSMGR.ERRFTB .EQ $CC File Too Big Error -SYSMGR.ERRFNF .EQ $CB File Not Found Error *-------------------------------------- * MEM STRUCT *-------------------------------------- diff --git a/INC/IO.I.txt b/INC/IO.I.txt index 0dcfd824..71810f40 100644 --- a/INC/IO.I.txt +++ b/INC/IO.I.txt @@ -59,7 +59,7 @@ SETHIRES .EQ $C057 W *CLRAN0 .EQ $C059 W, Set annunciator-0 output to 1 *SETAN1 .EQ $C05A W, Set annunciator-1 output to 0 *CLRAN1 .EQ $C05B W, Set annunciator-1 output to 1 -ENBVBLIIC .EQ $C05B W, Enable VBL switch (IIc) +*ENBVBLIIC .EQ $C05B W, Enable VBL switch (IIc) *SETAN2 .EQ $C05C W, Set annunciator-2 output to 0 *CLRAN2 .EQ $C05D W, Set annunciator-2 output to 1 *SETAN3 .EQ $C05E W, Set annunciator-3 output to 0 diff --git a/SYS/KERNEL.S.DIR.txt b/SYS/KERNEL.S.DIR.txt index b5711cc3..99260245 100644 --- a/SYS/KERNEL.S.DIR.txt +++ b/SYS/KERNEL.S.DIR.txt @@ -20,7 +20,7 @@ K.OpenDirYA jsr PFT.CheckPathYA >PUSHWI S.NODE.DIR >PUSHBI S.MEM.F.INIT0 jsr K.GetMem - bcs .9 + bcs .99 >STYA ZPPtr1 stx K.ReadDirA.hDir @@ -33,10 +33,6 @@ K.OpenDirYA jsr PFT.CheckPathYA cmp #'/' Root required ? beq .8 Yes, Go for ONLINE Call (S.DIR.PRODOS.REF=0) - lda #SYSMGR.ERRSYN - sec -.9 rts - .7 >MLICALL MLIGETFILEINFO bcs .98 file/dir does not exists....quit lda K.MLI.PARAMS+4 @@ -218,7 +214,7 @@ K.ReadDirA.ROOT ldy #S.NODE.DIR.FC did we already returned something ? tax jmp K.GetMemPtrA *-------------------------------------- -K.ReadDirA.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF +K.ReadDirA.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF >PUSHWI 512 Get a 512 bytes buffer for reading dir... >PUSHBI 0 @@ -232,13 +228,13 @@ K.ReadDirA.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF tya * clc CC from K.GetMem adc #4 Skip 4 bytes linked list - sta ZPPtr2 PTR to Buffer for PASS #1 - sta ZPPtr3 PTR to Buffer for PASS #2 + sta ZPPtr2 PTR to Buffer for PASS #1 + sta ZPPtr3 PTR to Buffer for PASS #2 pla adc #0 - sta ZPPtr2+1 PTR to Buffer for PASS #1 - sta ZPPtr3+1 PTR to Buffer for PASS #2 + sta ZPPtr2+1 PTR to Buffer for PASS #1 + sta ZPPtr3+1 PTR to Buffer for PASS #2 >LDYAI 512 >STYA K.MLI.PARAMS+4 @@ -252,7 +248,7 @@ K.ReadDirA.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF ldy #$1f+3 ldx #3 -.1 lda (ZPPtr2),y Get K.ReadDirA.EL.... From Block +.1 lda (ZPPtr2),y Get K.ReadDirA.EL.... From Block sta K.ReadDirA.EL,x dey dex @@ -297,7 +293,7 @@ K.ReadDirA.DIR sta K.MLI.PARAMS+1 A=#S.DIR.PRODOS.REF sta K.ReadDirA.BufSize stz K.ReadDirA.BufSize+1 -K.ReadDirA.DIR1 lda (ZPPtr2) X = EntryCount In This Block +K.ReadDirA.DIR1 lda (ZPPtr2) X = EntryCount In This Block beq .7 Free slot....goto next and #$F0 get storage_type @@ -307,7 +303,7 @@ K.ReadDirA.DIR1 lda (ZPPtr2) X = EntryCount In This Block cmp #$E0 directory header ? beq .2 - lda (ZPPtr2) regular DIR or File, get LEN + lda (ZPPtr2) regular DIR or File, get LEN and #$F compute filename len sec add "#" + S.STAT @@ -531,18 +527,50 @@ K.ReadDirA.ClrStat rts *-------------------------------------- K.ReadDirA.AddFNToBuf - lda (ZPPtr3) + ldy #$1C version/min_version for lowercase bitmap + lda (ZPPtr3),y check bxxxxxxx.xxxxxxxx... + bpl .7 not set, no lowercase bitmap present + + pha + iny + lda (ZPPtr3),y + pha + + lda #$1 + sta .2+1 + + ldy #15 + +.1 pla +.2 bit #$ff + pha + beq .3 + + lda (ZPPtr3),y + ora #$20 convert a-z to A-Z adding from $4x to $6x + sta (ZPPtr3),y + +.3 asl .2+1 + bne .4 + rol .2+1 + pla + +.4 dey + bne .1 + pla + +.7 lda (ZPPtr3) and #$0F get filename len tax jsr K.ReadDirA.AddToBuf ldy #1 -.1 lda (ZPPtr3),y +.8 lda (ZPPtr3),y jsr K.ReadDirA.AddToBuf iny dex - bne .1 + bne .8 rts *-------------------------------------- K.ReadDirA.AddToBuf diff --git a/SYS/KERNEL.S.FILE.txt b/SYS/KERNEL.S.FILE.txt index 9a078e97..dcd82b10 100644 --- a/SYS/KERNEL.S.FILE.txt +++ b/SYS/KERNEL.S.FILE.txt @@ -392,17 +392,41 @@ K.Stat jsr PFT.CheckPathSTK sta (ZPPtr2),y dex bne .3 + + ldy #S.STAT.SIZE + lda #0 + sta (ZPPtr2),y + + iny + + lda K.MLI.PARAMS+S.FILEINFO.BLOCKSUSED + asl + sta (ZPPtr2),y + + iny + + lda K.MLI.PARAMS+S.FILEINFO.BLOCKSUSED+1 + rol + sta (ZPPtr2),y + + iny + + lda #0 + rol + sta (ZPPtr2),y + clc .9 rts *-------------------------------------- K.Stat.SRC .DA #S.FILEINFO.TYPE -* .DA #S.FILEINFO.BLOCKSUSED,#S.FILEINFO.BLOCKSUSED+1 -* .DA # .DA #S.FILEINFO.AUXTYPE,#S.FILEINFO.AUXTYPE+1 + .DA #S.FILEINFO.BLOCKSUSED,#S.FILEINFO.BLOCKSUSED+1 + K.Stat.DST .DA #S.STAT.P.TYPE -* .DA #S.STAT.BLOCKS,#S.STAT.BLOCKS+1 -* .DA #S.STAT.SIZE,#S.STAT.SIZE+1,#S.STAT.SIZE+2 .DA #S.STAT.P.AUXTYPE,#S.STAT.P.AUXTYPE+1 + .DA #S.STAT.BLOCKS,#S.STAT.BLOCKS+1 + .DA #S.STAT.SIZE+1,#S.STAT.SIZE+2 + *-------------------------------------- FILE.SetIOBUF >PUSHWI 1024 get a ProDOS IOBUF >PUSHBI S.MEM.F.ALIGN+S.MEM.F.NOMOVE diff --git a/SYS/KERNEL.S.FIO.txt b/SYS/KERNEL.S.FIO.txt index ad14cb0e..108eccd7 100644 --- a/SYS/KERNEL.S.FIO.txt +++ b/SYS/KERNEL.S.FIO.txt @@ -17,22 +17,22 @@ AUTO 6 * CS : not found *\-------------------------------------- K.FileSearch >PULLW ZPPtr4 ZPPtr1 trashed by ExpandPStrYA - >PULLYA Get Search list + >PULLYA Get Search list >SYSCALL ExpandPStrYA Expand it (SYSCALL to BNK1) bcs .99 - stx K.FileSearch.hSrch - >STYA ZPPtr3 ZPPtr2 trashed by K.STAT !!! expanded search list ; + stx .98+1 + >STYA ZPPtr3 ZPPtr2 trashed by K.STAT !!! expanded search list ; stz K.FileSearch.Index -.1 stz KrnBuf256 reset String +.1 stz KrnBuf256 reset String ldx #0 ldy K.FileSearch.Index .2 tya - cmp (ZPPtr3) end of src string ? + cmp (ZPPtr3) end of src string ? beq .3 end of string, try it.... iny lda (ZPPtr3),y @@ -50,7 +50,7 @@ K.FileSearch >PULLW ZPPtr4 ZPPtr1 trashed by ExpandPStrYA ldy #0 .4 iny - lda (ZPPtr4),y Append Fiename... + lda (ZPPtr4),y Append Fiename... inx sta KrnBuf256,x tya @@ -64,18 +64,16 @@ K.FileSearch >PULLW ZPPtr4 ZPPtr1 trashed by ExpandPStrYA jsr K.STAT bcs .1 Failed...retry next path... - lda K.FileSearch.hSrch Discard Expanded hSrch list - jsr K.FreeMemA + jsr .98 Discard Expanded hSrch list bra K.GetFullPathYA.NewStr -.98 lda K.FileSearch.hSrch Discard Expanded hSrch list +.98 lda #$ff SELF MODIFIED : Discard Expanded hSrch list jsr K.FreeMemA - lda #SYSMGR.ERRFNF + lda #MLI.ERR.FNOTFND sec .99 rts *-------------------------------------- -K.FileSearch.hSrch .BS 1 K.FileSearch.Index .BS 1 */-------------------------------------- * # GetFullPathYA @@ -127,54 +125,61 @@ K.GetFullPathYA.9 * Y,A = File Length * X = hMem of Loaded File *\-------------------------------------- -K.LoadFile jsr K.FOpen - bcs .9 - - sta K.LoadFile.hFile +K.LoadFile lda (pStack) read PTR.LO on top of stack + pha + ldy #1 + lda (pStack),y read PTR.HI on top of stack + pha + >PUSHWI K.S.STAT + pla + ply + >PUSHYA + jsr K.Stat + bcs .10 - ldx #SYS.FSeek.END - jsr K.LoadFile.Seek - bcs .99 - - lda K.LoadFile.hFile - jsr K.FTellA - bcs .99 - >STYA K.LoadFile.Len - phx - plx - bne .98 LEN > 65535 !!??? - - >PUSHYA push len + lda K.S.STAT+S.STAT.SIZE+3 + ora K.S.STAT+S.STAT.SIZE+2 + bne .11 + + >PUSHW K.S.STAT+S.STAT.SIZE push len >PUSHBI 0 jsr K.GetMem - bcs .99 + bcs .10 >STYA K.LoadFile.Mem - stx K.LoadFile.hMem - - ldx #SYS.FSeek.SET - jsr K.LoadFile.Seek - bcs .97 + stx K.LoadFile.hMem + jsr K.FOpen + bcs .9 + sta K.LoadFile.hFile + >PUSHW K.LoadFile.Mem - >PUSHW K.LoadFile.Len + >PUSHW K.S.STAT+S.STAT.SIZE >PUSHB K.LoadFile.hFile jsr K.FRead bcs .97 + + phy + pha Save Bytes read jsr .99 - >LDYA K.LoadFile.Len + pla + ply ldx K.LoadFile.hMem clc .9 rts +.11 lda #SYSMGR.ERRFTB +.10 pha + >POP 6 + pla + sec + rts + .97 pha lda K.LoadFile.hMem jsr K.FreeMemA pla - .HS 2C - -.98 lda #SYSMGR.ERRFTB .99 pha lda K.LoadFile.hFile @@ -183,12 +188,9 @@ K.LoadFile jsr K.FOpen sec rts *-------------------------------------- -K.LoadFile.Seek >PUSHWI 0 - >PUSHWI 0 - txa - >PUSHA - >PUSHB K.LoadFile.hFile - jmp K.FSeek +K.LoadFile.hFile .BS 1 +K.LoadFile.hMem .BS 1 +K.LoadFile.Mem .BS 2 */-------------------------------------- * # SaveFile * ## In: @@ -202,9 +204,9 @@ K.LoadFile.Seek >PUSHWI 0 K.SaveFile jsr K.FOpen bcs .9 - sta K.LoadFile.hFile + sta .90+1 - >PUSHB K.LoadFile.hFile + >PUSHA jsr K.FWrite bcs .99 @@ -213,21 +215,18 @@ K.SaveFile jsr K.FOpen rts .99 pha - lda K.LoadFile.hFile +.90 lda #$ff jsr K.FCloseA pla sec rts -.9 >POP 4 Discard SrcPtr & SrcLen +.9 pha + >POP 4 Discard SrcPtr & SrcLen + pla sec rts -*-------------------------------------- -K.LoadFile.hFile .BS 1 -K.LoadFile.hMem .BS 1 -K.LoadFile.Mem .BS 2 -K.LoadFile.Len .BS 2 */-------------------------------------- * # ChTyp * ## In: diff --git a/SYS/KERNEL.S.txt b/SYS/KERNEL.S.txt index 41804eb3..469bec1b 100644 --- a/SYS/KERNEL.S.txt +++ b/SYS/KERNEL.S.txt @@ -52,7 +52,6 @@ A2osX.D1 .PH $D000 .INB /A2OSX.SRC/SYS/KERNEL.S.FILE .INB /A2OSX.SRC/SYS/KERNEL.S.DIR - .INB /A2OSX.SRC/SYS/KERNEL.S.PFT .INB /A2OSX.SRC/SYS/KERNEL.S.BIN .EP A2osX.D1.E .EQ * @@ -77,6 +76,7 @@ A2osX.E0 .PH $E000 .INB /A2OSX.SRC/SYS/KERNEL.S.DAT .INB /A2OSX.SRC/SYS/KERNEL.S.IRQ .INB /A2OSX.SRC/SYS/KERNEL.S.MEM + .INB /A2OSX.SRC/SYS/KERNEL.S.PFT .INB /A2OSX.SRC/SYS/KERNEL.S.CNV .INB /A2OSX.SRC/SYS/KERNEL.S.CHR .INB /A2OSX.SRC/SYS/KERNEL.S.D01 diff --git a/X.ERRORS.S.txt b/X.ERRORS.S.txt index aaebc82c..13799792 100644 --- a/X.ERRORS.S.txt +++ b/X.ERRORS.S.txt @@ -23,7 +23,6 @@ ERR.Codes .DA #MLI.ERR.IO .DA #MLI.ERR.OPEN *-------------------------------------- .DA #SYSMGR.ERRSYN - .DA #SYSMGR.ERRFNF *-------------------------------------- ERR.Count .EQ *-ERR.Codes *-------------------------------------- @@ -45,7 +44,6 @@ ERR.Messages >PSTR "I/O Error" >PSTR "File Already Open" *-------------------------------------- >PSTR "Syntax Error" - >PSTR "Command Not Found" *-------------------------------------- >PSTR "Unknown Error" *--------------------------------------