diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 8b6e0b4a..c776a429 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/BIN/ATTR.S.txt b/BIN/ATTR.S.txt index 699e3db0..6d15462f 100644 --- a/BIN/ATTR.S.txt +++ b/BIN/ATTR.S.txt @@ -13,6 +13,7 @@ NEW X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 *-------------------------------------- .DUMMY .OR ZPBIN @@ -32,6 +33,8 @@ bContinue .BS 1 bRecurse .BS 1 bPause .BS 1 +hFilter .BS 1 + ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -93,7 +96,7 @@ CS.RUN dec AttrAND set mask = $ff bne .9 >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcc CS.RUN rts @@ -133,7 +136,7 @@ CS.RUN.LOOP ldy #S.PS.hStdIn .1 lda bPause bmi CS.RUN.LOOP Pause... *-------------------------------------- - jsr GetEntry + jsr X.GetEntry bcs CS.RUN.LEAVE ldy #S.STAT.MODE+1 @@ -159,13 +162,13 @@ CS.RUN.LOOP ldy #S.PS.hStdIn sec .99 rts *-------------------------------------- -CS.RUN.NEXT jsr GetNextEntry +CS.RUN.NEXT jsr X.GetNextEntry bcc CS.RUN.LOOP -CS.RUN.LEAVE jsr LeaveSubDir +CS.RUN.LEAVE jsr X.LeaveSubDir bcs .90 - jsr BasePath.. + jsr X.BasePath.. jmp CS.RUN.NEXT @@ -188,7 +191,7 @@ CS.RUN.DIR lda (ZPFileName) lda (ZPFileName),y beq .8 -.1 jsr FilterMatch +.1 jsr X.IncludeMatch bcs .8 jsr CS.RUN.GetFilePath @@ -221,12 +224,12 @@ CS.RUN.DIR lda (ZPFileName) bpl .8 >LDYA ZPFileName - jmp EnterSubDirYA + jmp X.EnterSubDirYA .8 clc .9 rts *-------------------------------------- -CS.RUN.FILE jsr FilterMatch +CS.RUN.FILE jsr X.IncludeMatch bcs .8 jsr CS.RUN.GetFilePath @@ -401,8 +404,9 @@ Access2CSTR ldy #S.STAT.P.ACCESS CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT + >LDA.G hFilter beq .1 diff --git a/BIN/CHAUX.S.txt b/BIN/CHAUX.S.txt index 954c68b9..351add22 100644 --- a/BIN/CHAUX.S.txt +++ b/BIN/CHAUX.S.txt @@ -13,6 +13,7 @@ NEW X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 *-------------------------------------- * Zero Page Segment, up to 32 bytes *-------------------------------------- @@ -37,6 +38,8 @@ bPause .BS 1 bContinue .BS 1 bRecurse .BS 1 +hFilter .BS 1 + ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -107,13 +110,14 @@ CS.RUN inc ArgIndex jsr GetAuxType bcs .99 + bra CS.RUN .5 >LDA.G hSrcBasePath bne .99 >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcs .99 bra CS.RUN *-------------------------------------- @@ -155,10 +159,10 @@ CS.RUN.LOOP ldy #S.PS.hStdIn .1 bit bPause bmi CS.RUN.LOOP Pause... *-------------------------------------- - jsr GetEntry + jsr X.GetEntry bcs CS.RUN.LEAVE - jsr FilterMatch + jsr X.IncludeMatch bcs CS.RUN.NEXT no match, skip.... ldy #S.STAT.MODE+1 @@ -181,13 +185,13 @@ CS.RUN.LOOP ldy #S.PS.hStdIn sec .99 rts *-------------------------------------- -CS.RUN.NEXT jsr GetNextEntry +CS.RUN.NEXT jsr X.GetNextEntry bcc CS.RUN.LOOP -CS.RUN.LEAVE jsr LeaveSubDir +CS.RUN.LEAVE jsr X.LeaveSubDir bcs .90 - jsr BasePath.. + jsr X.BasePath.. jmp CS.RUN.NEXT @@ -216,12 +220,12 @@ CS.RUN.DIR bit bRecurse .1 jsr CS.RUN.GetFilePath >LDYA ZPFileName - jmp EnterSubDirYA + jmp X.EnterSubDirYA .8 clc rts *-------------------------------------- -CS.RUN.FILE jsr FilterMatch +CS.RUN.FILE jsr X.IncludeMatch bcs .8 no match, skip.... jsr CS.RUN.GetFilePath @@ -277,7 +281,7 @@ CS.RUN.GetFilePath CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT >LDA.G hFilter diff --git a/BIN/CHGRP.S.txt b/BIN/CHGRP.S.txt index 2c019fdf..97cd59d9 100644 --- a/BIN/CHGRP.S.txt +++ b/BIN/CHGRP.S.txt @@ -13,6 +13,7 @@ NEW X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 *-------------------------------------- .DUMMY .OR ZPBIN @@ -23,6 +24,8 @@ ZPFileName .BS 2 ZPFileStat .BS 2 ZPFullPath .BS 2 +hFilter .BS 1 + ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -70,6 +73,7 @@ CS.RUN >INC.G ArgIndex .2 cmp OptionList,x beq .3 + dex bpl .2 @@ -93,8 +97,9 @@ CS.RUN >INC.G ArgIndex .5 >LDA.G hSrcBasePath bne .9 + >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcc CS.RUN rts @@ -140,7 +145,7 @@ CS.RUN.LOOP ldy #S.PS.hStdIn .1 >LDA.G bPause bne CS.RUN.LOOP Pause... *-------------------------------------- - jsr GetEntry + jsr X.GetEntry bcs CS.RUN.LEAVE ldy #S.STAT.MODE+1 @@ -166,13 +171,13 @@ CS.RUN.LOOP ldy #S.PS.hStdIn sec .99 rts *-------------------------------------- -CS.RUN.NEXT jsr GetNextEntry +CS.RUN.NEXT jsr X.GetNextEntry bcc CS.RUN.LOOP -CS.RUN.LEAVE jsr LeaveSubDir +CS.RUN.LEAVE jsr X.LeaveSubDir bcs .90 - jsr BasePath.. + jsr X.BasePath.. jmp CS.RUN.NEXT @@ -195,7 +200,7 @@ CS.RUN.DIR lda (ZPFileName) lda (ZPFileName),y beq .8 skip ".." -.1 jsr FilterMatch +.1 jsr X.IncludeMatch bcs .8 jsr CS.RUN.GetFilePath @@ -217,7 +222,7 @@ CS.RUN.DIR lda (ZPFileName) bpl .8 >LDYA ZPFileName - jmp EnterSubDirYA + jmp X.EnterSubDirYA .8 clc .9 rts @@ -269,13 +274,16 @@ CS.RUN.GetFilePath CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT + >LDA.G hFilter beq .1 + >SYSCALL FreeMem .1 >LDA.G hSrcFullPath beq .8 + >SYSCALL FreeMem .8 clc rts diff --git a/BIN/CHMOD.S.txt b/BIN/CHMOD.S.txt index da45d380..56f981fb 100644 --- a/BIN/CHMOD.S.txt +++ b/BIN/CHMOD.S.txt @@ -13,6 +13,7 @@ NEW X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 *-------------------------------------- .DUMMY .OR ZPBIN @@ -25,6 +26,9 @@ ZPFullPath .BS 2 ZPMode .BS 2 ArgIndex .BS 1 StrMode .BS 1 + +hFilter .BS 1 + ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -98,8 +102,9 @@ CS.RUN inc ArgIndex bne .9 >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcc CS.RUN + rts .8 lda StrMode @@ -144,7 +149,7 @@ CS.RUN.LOOP ldy #S.PS.hStdIn .1 >LDA.G bPause bne CS.RUN.LOOP Pause... *-------------------------------------- - jsr GetEntry + jsr X.GetEntry bcs CS.RUN.LEAVE ldy #S.STAT.MODE+1 @@ -170,13 +175,13 @@ CS.RUN.LOOP ldy #S.PS.hStdIn sec .99 rts *-------------------------------------- -CS.RUN.NEXT jsr GetNextEntry +CS.RUN.NEXT jsr X.GetNextEntry bcc CS.RUN.LOOP -CS.RUN.LEAVE jsr LeaveSubDir +CS.RUN.LEAVE jsr X.LeaveSubDir bcs .90 - jsr BasePath.. + jsr X.BasePath.. jmp CS.RUN.NEXT @@ -199,7 +204,7 @@ CS.RUN.DIR lda (ZPFileName) lda (ZPFileName),y beq .8 -.1 jsr FilterMatch +.1 jsr X.IncludeMatch bcs .8 jsr CS.RUN.GetFilePath @@ -220,7 +225,7 @@ CS.RUN.DIR lda (ZPFileName) bpl .8 >LDYA ZPFileName - jmp EnterSubDirYA + jmp X.EnterSubDirYA .8 clc .9 rts @@ -309,14 +314,19 @@ CS.RUN.GetFilePath CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT + >LDA.G hFilter beq .1 + >SYSCALL FreeMem + .1 >LDA.G hSrcFullPath beq .8 + >SYSCALL FreeMem + .8 clc rts *-------------------------------------- diff --git a/BIN/CHOWN.S.txt b/BIN/CHOWN.S.txt index ce8f1f22..bc290cdb 100644 --- a/BIN/CHOWN.S.txt +++ b/BIN/CHOWN.S.txt @@ -13,6 +13,7 @@ NEW X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 *-------------------------------------- .DUMMY .OR ZPBIN @@ -23,6 +24,8 @@ ZPFileName .BS 2 ZPFileStat .BS 2 ZPFullPath .BS 2 +hFilter .BS 1 + ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -95,7 +98,7 @@ CS.RUN >INC.G ArgIndex bne .9 >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcc CS.RUN rts @@ -141,7 +144,7 @@ CS.RUN.LOOP ldy #S.PS.hStdIn .1 >LDA.G bPause bne CS.RUN.LOOP Pause... *-------------------------------------- - jsr GetEntry + jsr X.GetEntry bcs CS.RUN.LEAVE ldy #S.STAT.MODE+1 @@ -167,13 +170,13 @@ CS.RUN.LOOP ldy #S.PS.hStdIn sec .99 rts *-------------------------------------- -CS.RUN.NEXT jsr GetNextEntry +CS.RUN.NEXT jsr X.GetNextEntry bcc CS.RUN.LOOP -CS.RUN.LEAVE jsr LeaveSubDir +CS.RUN.LEAVE jsr X.LeaveSubDir bcs .90 - jsr BasePath.. + jsr X.BasePath.. jmp CS.RUN.NEXT @@ -196,7 +199,7 @@ CS.RUN.DIR lda (ZPFileName) lda (ZPFileName),y beq .8 skip ".." -.1 jsr FilterMatch +.1 jsr X.IncludeMatch bcs .8 jsr CS.RUN.GetFilePath @@ -218,7 +221,7 @@ CS.RUN.DIR lda (ZPFileName) bpl .8 >LDYA ZPFileName - jmp EnterSubDirYA + jmp X.EnterSubDirYA .8 clc .9 rts @@ -270,14 +273,19 @@ CS.RUN.GetFilePath CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT + >LDA.G hFilter beq .1 + >SYSCALL FreeMem + .1 >LDA.G hSrcFullPath beq .8 + >SYSCALL FreeMem + .8 clc rts *-------------------------------------- diff --git a/BIN/CHTYP.S.txt b/BIN/CHTYP.S.txt index 9e1f12f8..851f4b65 100644 --- a/BIN/CHTYP.S.txt +++ b/BIN/CHTYP.S.txt @@ -13,6 +13,7 @@ NEW X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 *-------------------------------------- * Zero Page Segment, up to 32 bytes *-------------------------------------- @@ -36,6 +37,8 @@ bPause .BS 1 bContinue .BS 1 bRecurse .BS 1 +hFilter .BS 1 + ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -111,7 +114,7 @@ CS.RUN inc ArgIndex bne .99 >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcs .99 bra CS.RUN *-------------------------------------- @@ -152,10 +155,10 @@ CS.RUN.LOOP ldy #S.PS.hStdIn .1 bit bPause bmi CS.RUN.LOOP Pause... *-------------------------------------- - jsr GetEntry + jsr X.GetEntry bcs CS.RUN.LEAVE - jsr FilterMatch + jsr X.IncludeMatch bcs CS.RUN.NEXT no match, skip.... ldy #S.STAT.MODE+1 @@ -178,13 +181,13 @@ CS.RUN.LOOP ldy #S.PS.hStdIn sec .99 rts *-------------------------------------- -CS.RUN.NEXT jsr GetNextEntry +CS.RUN.NEXT jsr X.GetNextEntry bcc CS.RUN.LOOP -CS.RUN.LEAVE jsr LeaveSubDir +CS.RUN.LEAVE jsr X.LeaveSubDir bcs .90 - jsr BasePath.. + jsr X.BasePath.. jmp CS.RUN.NEXT @@ -213,12 +216,12 @@ CS.RUN.DIR bit bRecurse .1 jsr CS.RUN.GetFilePath >LDYA ZPFileName - jmp EnterSubDirYA + jmp X.EnterSubDirYA .8 clc rts *-------------------------------------- -CS.RUN.FILE jsr FilterMatch +CS.RUN.FILE jsr X.IncludeMatch bcs .8 no match, skip.... jsr CS.RUN.GetFilePath @@ -274,7 +277,7 @@ CS.RUN.GetFilePath CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT >LDA.G hFilter diff --git a/BIN/DU.S.txt b/BIN/DU.S.txt index 04e60dda..732461d0 100644 --- a/BIN/DU.S.txt +++ b/BIN/DU.S.txt @@ -11,9 +11,10 @@ NEW .INB inc/mli.i .INB inc/mli.e.i *-------------------------------------- -X.ENTER.SUBDIR .EQ 1 -X.COPY.TO.DEST .EQ 0 -X.DELETE.SOURCE .EQ 0 +X.ENTER.SUBDIR .EQ 1 +X.COPY.TO.DEST .EQ 0 +X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 1 *-------------------------------------- .DUMMY .OR ZPBIN @@ -35,6 +36,8 @@ bAllFiles .BS 1 ArgCount .BS 1 ArgDir .BS 1 +hFilter .BS 1 + ZS.END .ED *-------------------------------------- @@ -122,7 +125,7 @@ CS.RUN jsr CS.RUN.SetCRLF sta ArgDir >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcc .1 scan for any other args rts @@ -133,7 +136,7 @@ CS.RUN jsr CS.RUN.SetCRLF ldy #S.PS.hCWD lda (pPS),y >SYSCALL GetMemPtr - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcs .99 .8 >PUSHEA.G TIME.SysTime @@ -165,10 +168,10 @@ CS.RUN.LOOP stz bPass2 .3 bit bPause bmi .1 - jsr GetEntry First entry + jsr X.GetEntry First entry bcs .9 - jsr FilterMatch Filter filename + jsr X.IncludeMatch Filter filename bcs .8 no match, skip.... lda (ZPFileName) @@ -186,13 +189,13 @@ CS.RUN.LOOP stz bPass2 jsr CS.RUN.PRINT.JMP bcs .99 -.8 jsr GetNextEntry Next entry +.8 jsr X.GetNextEntry Next entry bcc .1 If there is one, go again bit bPass2 bmi .9 - jsr ResetSrcDir + jsr X.ResetSrcDir bcs .99 dec bPass2 @@ -206,12 +209,12 @@ CS.RUN.LOOP stz bPass2 jsr CS.RUN.NewLine .91 dec bDirLevel - jsr LeaveSubDir "cd .." + jsr X.LeaveSubDir "cd .." bcs .97 This means we are done - jsr BasePath.. Prune pathname + jsr X.BasePath.. Prune pathname - jsr GetNextEntry Get next entry + jsr X.GetNextEntry Get next entry jmp CS.RUN.LOOP Go again .97 bit bSummary @@ -315,7 +318,7 @@ CS.RUN.PRINT.DIR inc bDirLevel >LDYA ZPFileName - jmp EnterSubDirYA + jmp X.EnterSubDirYA .8 clc .9 rts @@ -354,7 +357,7 @@ CS.RUN.PRINT.BDEV inc bDirLevel >LDYA ZPFileName - jsr EnterSubDirYA + jsr X.EnterSubDirYA bcs .9 .8 clc @@ -433,7 +436,7 @@ CS.RUN.SetCRLF ldy #S.PS.hStdOut CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT >LDA.G hFilter diff --git a/BIN/LC.S.txt b/BIN/LC.S.txt index c9b10acf..68f22771 100644 --- a/BIN/LC.S.txt +++ b/BIN/LC.S.txt @@ -13,6 +13,7 @@ NEW X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 *-------------------------------------- .DUMMY .OR ZPBIN @@ -185,7 +186,7 @@ CS.RUN.DIR lda (ZPFileName) lda (ZPFileName),y beq .8 -.1 jsr FilterMatch +.1 jsr X.IncludeMatch bcs .8 jsr CS.RUN.GetFilePath @@ -213,7 +214,7 @@ CS.RUN.DIR lda (ZPFileName) .8 clc .9 rts *-------------------------------------- -CS.RUN.FILE jsr FilterMatch +CS.RUN.FILE jsr X.IncludeMatch bcs .8 no match, skip.... jsr CS.RUN.GetFilePath diff --git a/BIN/LS.S.txt b/BIN/LS.S.txt index 2c9d18f3..7f47a241 100644 --- a/BIN/LS.S.txt +++ b/BIN/LS.S.txt @@ -14,6 +14,7 @@ NEW X.ENTER.SUBDIR .EQ 1 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 1 *-------------------------------------- MAX.COLW .EQ 20 MAX.COLC .EQ 4 @@ -48,6 +49,8 @@ bToFile .BS 1 ZPLineBuf .BS 2 ZPLineBufPtr .BS 2 +hFilter .BS 1 + ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -152,7 +155,7 @@ CS.RUN ldy #S.PS.hStdOut bra .1 .4 >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcc .1 scan for any other args .9 rts @@ -163,7 +166,7 @@ CS.RUN ldy #S.PS.hStdOut ldy #S.PS.hCWD lda (pPS),y >SYSCALL GetMemPtr - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcs .9 .8 >PUSHEA.G TIME.SysTime @@ -211,10 +214,10 @@ CS.RUN.LOOP stz bPass2 .2 bit bPause bmi .1 - jsr GetEntry + jsr X.GetEntry bcs .6 - jsr FilterMatch + jsr X.IncludeMatch bcs .5 no match, skip.... bit bAllmostAll @@ -235,7 +238,7 @@ CS.RUN.LOOP stz bPass2 jsr CS.RUN.PRINT.JMP bcs .99 -.5 jsr GetNextEntry +.5 jsr X.GetNextEntry bcc .1 bit bPass2 @@ -244,7 +247,7 @@ CS.RUN.LOOP stz bPass2 jsr CS.RUN.CheckRoot beq .6 - jsr ResetSrcDir + jsr X.ResetSrcDir bcs .99 dec bPass2 @@ -256,15 +259,15 @@ CS.RUN.LOOP stz bPass2 jsr CS.RUN.LineBufFlush bcs .99 -.7 jsr LeaveSubDir +.7 jsr X.LeaveSubDir bcs .8 - jsr BasePath.. + jsr X.BasePath.. jsr CS.RUN.ENTER.MSG bcs .99 - jsr GetNextEntry + jsr X.GetNextEntry jmp CS.RUN.LOOP .8 lda #0 @@ -508,7 +511,7 @@ CS.RUN.PRINT.BDEVEND bcs .9 .7 >LDYA ZPFileName - jsr EnterSubDirYA + jsr X.EnterSubDirYA bcs .9 jmp CS.RUN.ENTER.MSG @@ -864,7 +867,7 @@ CS.RUN.LineBufCOut CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT ldy #hFilter diff --git a/BIN/PAK.S.txt b/BIN/PAK.S.txt index 4033840d..99ee546d 100644 --- a/BIN/PAK.S.txt +++ b/BIN/PAK.S.txt @@ -4,8 +4,6 @@ NEW .OP 65C02 .OR $2000 .TF bin/pak -*-------------------------------------- -X.RESETSRCDIR .EQ 0 single pass *-------------------------------------- .INB inc/macros.i .INB inc/a2osx.i @@ -17,6 +15,7 @@ X.RESETSRCDIR .EQ 0 single pass X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 single pass *-------------------------------------- .DUMMY .OR ZPBIN diff --git a/BIN/UC.S.txt b/BIN/UC.S.txt index 9b26a189..e6b50136 100644 --- a/BIN/UC.S.txt +++ b/BIN/UC.S.txt @@ -13,6 +13,7 @@ NEW X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 *-------------------------------------- .DUMMY .OR ZPBIN @@ -34,6 +35,8 @@ bPause .BS 1 bContinue .BS 1 bRecurse .BS 1 +hFilter .BS 1 + ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -89,7 +92,7 @@ CS.RUN inc ArgIndex bne .9 >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcc CS.RUN .99 rts @@ -133,7 +136,7 @@ CS.RUN.LOOP ldy #S.PS.hStdIn .1 lda bPause bne CS.RUN.LOOP Pause... *-------------------------------------- - jsr GetEntry + jsr X.GetEntry bcs CS.RUN.LEAVE ldy #S.STAT.MODE+1 @@ -159,13 +162,13 @@ CS.RUN.LOOP ldy #S.PS.hStdIn sec .99 rts *-------------------------------------- -CS.RUN.NEXT jsr GetNextEntry +CS.RUN.NEXT jsr X.GetNextEntry bcc CS.RUN.LOOP -CS.RUN.LEAVE jsr LeaveSubDir +CS.RUN.LEAVE jsr X.LeaveSubDir bcs .90 - jsr BasePath.. + jsr X.BasePath.. jmp CS.RUN.NEXT @@ -188,7 +191,7 @@ CS.RUN.DIR lda (ZPFileName) lda (ZPFileName),y beq .8 -.1 jsr FilterMatch +.1 jsr X.IncludeMatch bcs .8 jsr CS.RUN.GetFilePath @@ -211,12 +214,12 @@ CS.RUN.DIR lda (ZPFileName) bpl .8 >LDYA ZPFileName is now lowercase - jmp EnterSubDirYA + jmp X.EnterSubDirYA .8 clc .9 rts *-------------------------------------- -CS.RUN.FILE jsr FilterMatch +CS.RUN.FILE jsr X.IncludeMatch bcs .8 no match, skip.... jsr CS.RUN.GetFilePath @@ -285,7 +288,7 @@ CS.RUN.GetNewPath CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT >LDA.G hFilter diff --git a/BIN/WC.S.txt b/BIN/WC.S.txt index f2086ddc..8f8dd87a 100644 --- a/BIN/WC.S.txt +++ b/BIN/WC.S.txt @@ -14,6 +14,7 @@ NEW X.ENTER.SUBDIR .EQ 0 X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 +X.RESET.SRC.DIR .EQ 0 *-------------------------------------- .DUMMY .OR ZPBIN @@ -43,6 +44,8 @@ bWord .BS 1 bInWord .BS 1 bTotal .BS 1 +hFilter .BS 1 + ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -98,7 +101,7 @@ CS.RUN inc ArgIndex bne .9 >LDYA ZPPtr1 - jsr InitSrcDirYA + jsr X.InitSrcDirYA bcc CS.RUN .99 rts @@ -185,7 +188,7 @@ CS.RUN.LOOP ldy #S.PS.hStdIn .10 lda bPause bne CS.RUN.LOOP Pause... - jsr GetEntry + jsr X.GetEntry bcs .9 ldy #S.STAT.P.DRIVE @@ -213,11 +216,11 @@ CS.RUN.LOOP ldy #S.PS.hStdIn bra .8 -.9 jsr LeaveSubDir +.9 jsr X.LeaveSubDir bcs .90 - jsr BasePath.. -.8 jsr GetNextEntry + jsr X.BasePath.. +.8 jsr X.GetNextEntry jmp CS.RUN.LOOP .90 jsr CS.RUN.PrintTstat @@ -252,20 +255,20 @@ CS.RUN.DIR lda bRecurse beq .8 >LDYA ZPFileName - jsr EnterSubDirYA + jsr X.EnterSubDirYA jmp CS.RUN.CheckErr .8 clc rts *-------------------------------------- CS.RUN.DEV -.8 jsr GetNextEntry +.8 jsr X.GetNextEntry CS.RUN.DEV.CLC.RTS clc rts *-------------------------------------- -CS.RUN.FILE jsr FilterMatch +CS.RUN.FILE jsr X.IncludeMatch bcs CS.RUN.DEV.CLC.RTS no match, skip.... jsr CS.RUN.GetFilePath @@ -565,7 +568,7 @@ CS.RUN.PrintTstat CS.DOEVENT sec rts *-------------------------------------- -CS.QUIT jsr LeaveSubDir +CS.QUIT jsr X.LeaveSubDir bcc CS.QUIT >LDA.G hFilter diff --git a/INC/KERNEL.I.txt b/INC/KERNEL.I.txt index 262d0736..09bc6870 100644 --- a/INC/KERNEL.I.txt +++ b/INC/KERNEL.I.txt @@ -22,26 +22,25 @@ K.IRQDEV.MAX .EQ 4 Mem.Table .EQ $0800 -> $1000 *-------------------------------------- * Z80 .EQ $1000 -* Scratch512 .EQ $1100 *-------------------------------------- -hFDs .EQ $1300 K.hFD.MAX -hFDs.hName .EQ $1320 K.hFD.MAX -hFDs.oCnt .EQ $1340 K.hFD.MAX +* Tables start at $1C00 *-------------------------------------- -Flt.Table.pftLO .EQ $1360 K.FLT.MAX -Flt.Table.pftHI .EQ $1364 K.FLT.MAX -Flt.Table.cbLO .EQ $1368 K.FLT.MAX -Flt.Table.cbHI .EQ $136C K.FLT.MAX +hFDs .EQ $1D00 K.hFD.MAX +hFDs.hName .EQ $1D20 K.hFD.MAX +hFDs.oCnt .EQ $1D40 K.hFD.MAX *-------------------------------------- -S.Table.hSID .EQ $1370 K.USR.MAX -S.Table.hFile .EQ $1378 K.USR.MAX +Flt.Table.pftLO .EQ $1D60 K.FLT.MAX +Flt.Table.pftHI .EQ $1D64 K.FLT.MAX +Flt.Table.cbLO .EQ $1D68 K.FLT.MAX +Flt.Table.cbHI .EQ $1D6C K.FLT.MAX *-------------------------------------- -PS.Table.PID .EQ $1380 K.PS.MAX -PS.Table.hPS .EQ $13A0 K.PS.MAX -PS.Table.Hits .EQ $13C0 K.PS.MAX -PS.Table.Stats .EQ $13E0 K.PS.MAX +S.Table.hSID .EQ $1D70 K.USR.MAX +S.Table.hFile .EQ $1D78 K.USR.MAX *-------------------------------------- -A2osX.EndTables .EQ $1400 +PS.Table.PID .EQ $1D80 K.PS.MAX +PS.Table.hPS .EQ $1DA0 K.PS.MAX +PS.Table.Hits .EQ $1DC0 K.PS.MAX +PS.Table.Stats .EQ $1DE0 K.PS.MAX *-------------------------------------- MAN SAVE inc/kernel.i diff --git a/SHARED/X.CPMVRM.S.txt b/SHARED/X.CPMVRM.S.txt index c112ecd3..c06adc0f 100644 --- a/SHARED/X.CPMVRM.S.txt +++ b/SHARED/X.CPMVRM.S.txt @@ -2,7 +2,7 @@ NEW AUTO 3,1 .LIST OFF *-------------------------------------- -X.RESETSRCDIR .EQ 0 single pass +X.RESET.SRC.DIR .EQ 0 single pass *-------------------------------------- .DUMMY .OR ZPBIN diff --git a/SHARED/X.FILEENUM.S.txt b/SHARED/X.FILEENUM.S.txt index db9d1c87..6f96f3fa 100644 --- a/SHARED/X.FILEENUM.S.txt +++ b/SHARED/X.FILEENUM.S.txt @@ -149,13 +149,11 @@ X.InitSrcDirPtr1 >LDA.G STATBUF+S.STAT.MODE+1 and #$F0 cmp /S.STAT.MODE.DIR - bne .4 TYPE not a DIR, extract.... - - bra .5 TYPE=DIR, do not extract pattern - .ELSE - bra .4 + beq .8 TYPE=DIR, do not extract pattern .FIN + bra .4 + .1 cmp #MLI.E.INVPATH beq .11 @@ -208,7 +206,7 @@ X.InitSrcDirPtr1 sec .99 rts *-------------------------------------- - .DO X.RESETSRCDIR=1 + .DO X.RESET.SRC.DIR=1 X.ResetSrcDir jsr X.GethDIR >SYSCALL CloseDir @@ -642,5 +640,5 @@ X.GetoDIRENT >LDA.G index *-------------------------------------- MAN SAVE usr/src/shared/x.fileenum.s -LOAD usr/src/bin/cp.s +LOAD usr/src/bin/ls.s ASM diff --git a/SYS/KERNEL.S.CORE.txt b/SYS/KERNEL.S.CORE.txt index 863c251a..ccaeff99 100644 --- a/SYS/KERNEL.S.CORE.txt +++ b/SYS/KERNEL.S.CORE.txt @@ -85,7 +85,7 @@ CORE.Events jsr CORE.GetEvents >STYA pPs >LDYAI K.STACKTOP >STYA pStack - lda #Evt.Table + lda #K.S.EVT sta pEvent .1 lda (pEvent) @@ -201,7 +201,7 @@ CORE.UpdPPS tax save RC From INIT or RUN * CC * event in YA * (pEvent) *-------------------------------------- -CORE.GetEvents lda #Evt.Table +CORE.GetEvents lda #K.S.EVT sta pEvent point to start of event list stz CORE.EvtCount reset Size bit A2osX.IRQMode do we have IRQ enabled for Ticks ? @@ -306,7 +306,7 @@ CORE.Dispatch ldx #1 skip PS0 sta (pPS),y jsr CORE.PSSelect - lda #Evt.Table + lda #K.S.EVT sta pEvent Select first event in list lda CORE.EvtCount sta CORE.EvtIndex diff --git a/SYS/KERNEL.S.DEF.txt b/SYS/KERNEL.S.DEF.txt index 912bf060..b63e61c1 100644 --- a/SYS/KERNEL.S.DEF.txt +++ b/SYS/KERNEL.S.DEF.txt @@ -130,15 +130,6 @@ FOUTBuf .EQ $103 Aux * Aux $200 -> 3FD : /RAM Driver * Aux $3FE -> 3FF : IRQ Vector *-------------------------------------- -K.S.STAT .EQ $0300 S.STAT for internal kernel operations -Evt.Table .EQ $0340 K.EVT.MAX*S.EVT=4*8=32b -K.S.IOCTL .EQ $0360 9 bytes -K.MLI.PATH .EQ $0369 64+1 -K.MLI.PARAMS .EQ $03AA Main, 18 bytes min for GetFileInfo -* GetFileInfoEx/SetFileInfoEx need 1 + 2 + 48 = 51 -*-------------------------------------- -K.STACKTOP .EQ $03ED XFer !!! down to $3E0 -*-------------------------------------- *** $3F0-$3FF IRQ Handler.... *** *-------------------------------------- SYS.BASL0 .EQ $400 @@ -154,15 +145,22 @@ Mem.LastSlot .EQ $0806 *-------------------------------------- * free $1000->$1FFF = $1000 (4096) Aux *-------------------------------------- -*** Z80 Reserved $1000-10FF*** +A2osX.Main .EQ $1200 *-------------------------------------- -Z80CODE .EQ $1000 (00000h) Up To $10FF -Z80STACK .EQ $10FF (000FFh) Down to $1000 +K.S.STAT .EQ $1C00 S.STAT for internal kernel operations +K.S.EVT .EQ $1C40 K.EVT.MAX*S.EVT=4*8=32b +K.S.IOCTL .EQ $1C60 9 bytes +K.MLI.PATH .EQ $1C69 64+1 +K.MLI.PARAMS .EQ $1CAA Main, 18 bytes min for GetFileInfo +* GetFileInfoEx/SetFileInfoEx need 1 + 2 + 48 = 51 *-------------------------------------- -K.Buf256 .EQ $1100 512 bytes.... +K.STACKTOP .EQ $1CFF *-------------------------------------- -K.IOBuf .EQ $1200 ....for ReadDir +K.Buf256 .EQ $1E00 512 bytes.... *-------------------------------------- +K.IOBuf .EQ $1F00 ....for ReadDir +*-------------------------------------- +Mem.MLoMem .EQ $2000 Mem.MHiMem .EQ A2osX.SYSCALL Mem.XLoMem .EQ $1000 Mem.XHiMem .EQ $A000 diff --git a/SYS/KERNEL.S.INIT.txt b/SYS/KERNEL.S.INIT.txt index fbc77793..339a249d 100644 --- a/SYS/KERNEL.S.INIT.txt +++ b/SYS/KERNEL.S.INIT.txt @@ -22,7 +22,7 @@ Kernel.Init2 sei >LDYA PAKME.MAIN >STYA ZPInBufPtr - >LDYAI A2osX.EndTables + >LDYAI A2osX.Main jsr A2osX.Unpak >LDYA PAKME.AUX @@ -306,7 +306,7 @@ MemMgrInit >LDYAI Mem.MHiMem ldx #K.EVT.MAX*S.EVT-1 -.5 stz Evt.Table,x +.5 stz K.S.EVT,x dex bpl .5 @@ -630,20 +630,27 @@ Detect6502 ldy #0 Test 6502 BCD bug * Out: * A = Z80 Slot *-------------------------------------- -DetectZ80 ldx #Z80Code.Size +DetectZ80 ldx #Z80.300.L -.1 lda Z80Code.Start-1,x - sta Z80CODE-1,x 00000H for Z80 +.1 lda Z80.300-1,x + sta $300-1,x 0F300H for Z80 dex bne .1 + ldx #Z80.1000.L + +.2 lda Z80.1000-1,x + sta $1000-1,x 00000H for Z80 + dex + bne .2 + stz ZPPtr1 lda #$C1 sta ZPPtr1+1 -.2 sta (ZPPtr1) - lda $100D +.3 sta (ZPPtr1) to Z80..... + lda $100B .....back bmi .8 inc ZPPtr1+1 @@ -653,14 +660,31 @@ DetectZ80 ldx #Z80Code.Size clc adc #$20 - sta $100A - bra .2 + sta $302 + bra .3 .8 lda ZPPtr1+1 and #$0F clc .9 rts *-------------------------------------- +* Z80 Reserved +*-------------------------------------- +*Z80CODE .EQ $300 0F300h +*Z80STACK .EQ $3CF 0F3CFh +*-------------------------------------- +Z80.300 .HS 3200E1 LD (0E100H),A Back to 6502 + + +Z80.300.L .EQ *-Z80.300 +*-------------------------------------- +Z80.1000 .HS 31CFF3 START: LD SP,0F3CFh Init Stack + .HS 3EFF LD A,0FFH Set Flag + .HS 320B00 LD (FLAG),A + .HS C300F3 JP 0F300h + .HS 00 FLAG: .DB 0 +Z80.1000.L .EQ *-Z80.1000 +*-------------------------------------- DevMgrInit >LDYAI MSG.DEV >SYSCALL2 puts @@ -1161,7 +1185,7 @@ EvtMgrInit >LDYAI MSG.EVT stz CORE.EvtCount - lda /Evt.Table + lda /K.S.EVT sta pEvent+1 clc rts @@ -1276,14 +1300,6 @@ ZP.IsDigit.9 sec .EP Kernel.ZP.S .EQ *-Kernel.ZP *-------------------------------------- -Z80Code.Start .HS 31FF00 START: LD SP,000FFH Init Stack - .HS 3EFF LD A,0FFH Set Flag - .HS 320D00 LD (FLAG),A - .HS 3200E1 LD (0E100H),A Back to 6502 - .HS 18F3 JR START Loop - .HS 00 FLAG: .DB 0 -Z80Code.Size .EQ *-Z80Code.Start -*-------------------------------------- Mouse.OFS .HS 05070B0CFB Mouse.SIG .HS 38180120D6 *-------------------------------------- diff --git a/SYS/KERNEL.S.txt b/SYS/KERNEL.S.txt index 44243719..4065efe7 100644 --- a/SYS/KERNEL.S.txt +++ b/SYS/KERNEL.S.txt @@ -33,13 +33,15 @@ PAKME.E0 .DA E0 MAIN .DA #0 .DA MAIN.S -MAIN.B .PH A2osX.EndTables +MAIN.B .PH A2osX.Main .INB usr/src/sys/kernel.s.core .INB usr/src/sys/kernel.s.drv .INB usr/src/sys/kernel.s.pft .INB usr/src/sys/kernel.s.fs .INB usr/src/sys/kernel.s.mathf -Mem.MLoMem .EQ * + .LIST ON +MAIN.E .EQ * + .LIST OFF .EP MAIN.S .EQ *-MAIN.B