From 529c992d9b44deafaecffa5b11520d0e1b76d7bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GIBERT?= Date: Wed, 19 Oct 2016 17:47:53 +0200 Subject: [PATCH] Kernel version 0.8 : LS : adding -L & -R options --- A2OSX.BOOT.po | Bin 143360 -> 143360 bytes A2OSX.SRC.po | Bin 819200 -> 819200 bytes BIN/LS.S.txt | 140 ++++++++++++++++++++++++++++++++++++------- BIN/X.CPLSMVRM.S.txt | 126 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 244 insertions(+), 22 deletions(-) diff --git a/A2OSX.BOOT.po b/A2OSX.BOOT.po index 4c0d220dc5adedb3d86a825d15be952941c51f8a..0d2635cbac7d6248670c94fca19b7b3b0cd312e6 100644 GIT binary patch delta 784 zcmZ8fU1-x#6i({G+OAy(n>A~7-lQkaRaO)ngdunv*_hLZVf!eWH&5%vPES!eAQ;Qr3Z*r-1`uzAFaVhWIk?ZB#bz!~Hnt-1B|s=VrIO*)4Bv zHtiYaUd^TNJei8NbTITJP)yKc8!-V!VGM4=U3d(fvWJro}yY@XNb9^ zGnQy~>6{fGFdh;nLnc?Pody@cToygFj;83mFyE~|RL5*-i0Hj2DTRgFOsn>(ThE%9_v50OBt88k3)nvAS& zx-B`^%2=Mn(@Hs+VWuzWe)3Fc7Fve_l;~B5;`JTA^PQ0G(9c>*BV=>PCuR?!8^xKO zw6QySslp>;nDDAitwbHlNt#y11*k?*CE`YD36Z?mXtCQ&(*2)WR1}SonJQH2fu(3; zm_2&6$&;dL=xc0WA^Uibqe{>Jyn+3^W=Q^lo#29rHk(cVTDP~UnAU~a0pCB`;?3{f zqDm%x${l#zgJee^`1QVMq9#cPxxT|-A_yh9=z0=8_10^IwkJVny9oAQ-pv31ecpTKcGBEVcGe2; zY5Z-y@aV<;a_oo_Ru-Mqe&K2IhI}W#$t10i>-09gM-@dZBjw|&PrmqMkn?>aR^-2? zKVh4!59_K6x~zX8NcAM#2`;x2%7)p%<~L7&$&i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?aZ?yBPC=T4q6kq?U?uxc#Nz13aN=qRSbUzJiLTo02vE zj>8x-h6O-PLs#>iG&wbZ=7X(lx24Ot-V3SYSy)x#Ckv}82!~ZtH8j{gwUu@)SgoM1 zp=(+QxDcO)z#_&8t>!&fo<$R61#{f;5xYt0!-he|Ed16Ep5*kPYz)js6U}p? zHDMJ1%yXj`LMqOSlm?QGt5`N%MLSc`&Q)|o5>XY)h15{bh_8syaX$HKP_~R+fVz!! zMyr5zi1tL!o)dD+h~_mu$i0lbcT&zVEaa}QWUil6MV|avKfA7)NiAqEU*~J>q&+#M zhJv&v%b&T2Z+CArWByz|g<36bPQ0vp&$!QdXw0t!52-Y5F}_&P+PXN6L*E+MzQ z5N9GiYhuTYTRI$_GOG_WOS^((ZqTO&esd90@|8@3?3|*KUVEp%rO*!YRh-ZYqn0s> z?3{`UFnH+?G$DMFX%MuVqKH#SBa+e?74LSZ$mfNEqsPpA59})i{`M~0Lyg(`RG9*efITK z{tW`2foOe`Zsc(iVB*tzgkg1Hv*uU4#!-d4!LorEj>u;7M$Q#46nc@H)F;sUEXdtN z>__CBz-I14JnP&u9!82o zp>!{I`+dyq`rWiLYNh&q1~EN=GXTGH;*G%cpg?bov>}0&Jup5bgl#W^L>W|7<@gSYSCALL SYS.GetArgC lda (ZPPtr1) cmp #2 - bcc .7 + bne .7 ldy #1 lda (ZPPtr1),y cmp #'-' bne .7 + iny lda (ZPPtr1),y - cmp #'R' - bne .90 - ldy bRecurse + + ldx OptionList + +.2 cmp OptionList,x + beq .3 + dex + bne .2 + beq .90 Syntax error + +.3 ldy OptionVars-1,x lda #$80 sta (pData),y bra .1 .7 >LDYA ZPPtr1 jsr CS.INIT.OPENDIR - bcc .1 bcs .99 + ldy #hDIR A=hDir + sta (pData),y + bra .1 .8 ldy #hDIR lda (pData),y @@ -100,7 +115,7 @@ CS.INIT >SYSCALL SYS.GetArgC *-------------------------------------- CS.INIT.OPENDIR >SYSCALL SYS.GetFullPathYA bcs .99 - stx hFullPath + stx .90+1 >STYA ZPPtr1 >PUSHW L.STAT @@ -147,8 +162,6 @@ CS.INIT.OPENDIR >SYSCALL SYS.GetFullPathYA .7 >LDYA ZPPtr1 >SYSCALL SYS.OPENDIRYA bcs .9 - ldy #hDIR A=hDir - sta (pData),y jsr .9 Cleanup clc @@ -156,7 +169,7 @@ CS.INIT.OPENDIR >SYSCALL SYS.GetFullPathYA .9 pha - lda hFullPath +.90 lda #$ff >SYSCALL SYS.FreeMemA pla sec @@ -178,6 +191,20 @@ CS.RUN ldy #bCANCEL lda (pData),y >SYSCALL SYS.READDIRA bcc .20 + + ldy #bLong + lda (pData),y + bmi .89 + + ldy #ColCount + lda (pData),y + beq .89 + + lda #13 + >SYSCALL SYS.COutA + +.89 lda #0 + sec rts .20 phx Save hDIRENT @@ -186,7 +213,7 @@ CS.RUN ldy #bCANCEL .3 lda (ZPPtr1) beq .8 No more entry..exit - + lda ZPPtr1 set Ptr2=Ptr1+LEN-> S.STAT sec adc (ZPPtr1) @@ -231,8 +258,9 @@ CS.RUN ldy #bCANCEL sta ZPPtr1+1 bra .3 -.8 pla +.8 pla Discard hDIRENT >SYSCALL SYS.FreeMemA + clc rts *-------------------------------------- @@ -255,7 +283,28 @@ CS.RUN.DEV ldy #S.STAT.PRODOS.DEVBLOCKS+1 >SYSCALL SYS.PrintFYA rts *-------------------------------------- -CS.RUN.DIR jsr CS.RUN.PUSHDATES +CS.RUN.DIR ldy #bLong + lda (pData),y + bmi .8 + + >PUSHW ZPPtr1 + >LDYA L.MSG.DIR + >SYSCALL SYS.PrintFYA + + ldy #ColCount + lda (pData),y + inc + sta (pData),y + cmp #MAX.COL + bne .7 + + lda #0 + sta (pData),y + lda #13 + >SYSCALL SYS.COutA +.7 rts + +.8 jsr CS.RUN.PUSHEXTRA ldy #S.STAT.MODE+1 lda (ZPPtr2),y @@ -265,11 +314,53 @@ CS.RUN.DIR jsr CS.RUN.PUSHDATES >PUSHA File Mode >PUSHW ZPPtr1 - >LDYA L.MSG.DIR + >LDYA L.MSG.DIREXT >SYSCALL SYS.PrintFYA + rts *-------------------------------------- -CS.RUN.FILE jsr CS.RUN.PUSHDATES +CS.RUN.FILE ldy #bLong + lda (pData),y + bmi .8 + + ldy #S.STAT.PRODOS.TYPE + lda (ZPPtr2),y + jsr FileType2PSTR + >PUSHYA Type + + >PUSHW ZPPtr1 + >LDYA L.MSG.FILE + >SYSCALL SYS.PrintFYA + + ldy #ColCount + lda (pData),y + inc + sta (pData),y + cmp #MAX.COL + bne .7 + + lda #0 + sta (pData),y + lda #13 + >SYSCALL SYS.COutA + rts + +.7 lda #80/MAX.COL-5 + sec + sbc (ZPPtr1) + beq .71 + tax + +.70 lda #' ' + phx + >SYSCALL SYS.COutA + plx + dex + bne .70 + +.71 rts + +.8 jsr CS.RUN.PUSHEXTRA lda ZPPtr2 clc @@ -299,11 +390,11 @@ CS.RUN.FILE jsr CS.RUN.PUSHDATES >PUSHYA Type >PUSHW ZPPtr1 - >LDYA L.MSG.FILE + >LDYA L.MSG.FILEEXT >SYSCALL SYS.PrintFYA rts *-------------------------------------- -CS.RUN.PUSHDATES +CS.RUN.PUSHEXTRA >PUSHW L.TIME.Mod >PUSHW L.TIME.Format lda ZPPtr2 @@ -416,13 +507,14 @@ FileType2PSTR ldy #0 *-------------------------------------- CS.END *-------------------------------------- -hFullPath .BS 1 -STAT .BS S.STAT -ArgCount .BS 1 +OptionList >PSTRING "LR" +OptionVars .DA #bLong,bRecurse *-------------------------------------- MSG.DEV >CSTRING "%15S S%d,D%d Blocks Used:%5D,Total:%5D\n" -MSG.DIR >CSTRING "/%15S %a %S %S\n" -MSG.FILE >CSTRING "%15S %S $%H %a %10u %S %S\n" +MSG.DIR >CSTRING "/%18S" +MSG.DIREXT >CSTRING "/%15S %a %S %S\n" +MSG.FILE >CSTRING "%S.%S" +MSG.FILEEXT >CSTRING "%15S %S $%H %a %10u %S %S\n" *-------------------------------------- PRODOS.FT.HEX .HS 0406FAFCFDE2FF PRODOS.FT.TXT >PSTRING "TXT" @@ -437,16 +529,20 @@ TIME.Format >PSTRING "%d-%b-%y %H:%M" TIME.Create .BS 20 TIME.Mod .BS 20 HEXDIGIT .AS '0123456789ABCDEF' +STAT .BS S.STAT +ArgCount .BS 1 *-------------------------------------- .DUMMY .OR 0 DS.START -hDIRPATH .BS 1 hDIR .BS 1 +hDIRs .BS MAX.RECURSE+1 hFilter .BS 1 bSTOP .BS 1 bCANCEL .BS 1 +bLong .BS 1 bRecurse .BS 1 +ColCount .BS 1 DS.END .ED *-------------------------------------- diff --git a/BIN/X.CPLSMVRM.S.txt b/BIN/X.CPLSMVRM.S.txt index a2c04e14..77d9daca 100644 --- a/BIN/X.CPLSMVRM.S.txt +++ b/BIN/X.CPLSMVRM.S.txt @@ -5,6 +5,132 @@ INC 1 AUTO 6 .LIST OFF *-------------------------------------- +* Uses: (pData) +* hDIRs .BS MAX.RECURSE+1 +* hBasePath .BS 1 +*-------------------------------------- +SetSrcDirYA >SYSCALL SYS.GetFullPathYA + bcs .99 + stx .90+1 + >STYA ZPPtr1 + + lda (ZPPtr1) + cmp #1 + beq .5 we have '/' + + >PUSHW L.STAT + >PUSHW ZPPtr1 + >SYSCALL SYS.STAT + + bcs .1 File/DIR does not exists, go extract wildcard + + lda STAT+S.STAT.PRODOS.TYPE + cmp #$0f + beq .7 TYPE=DIR, do not estract wildcard + +.1 lda (ZPPtr1) + tay + +.2 lda (ZPPtr1),y search backward for a / + cmp #'/' + beq .3 + dey + bne .2 + +.3 tya + cmp (ZPPtr1) + beq .7 Make sure at least one char + + ldx #0 + phy save / pos to trunk string later + +.4 iny + inx + lda (ZPPtr1),y + sta UsrBuf256,x + tya + cmp (ZPPtr1) + bne .4 + + pla get back / pos + sta (ZPPtr1) trunk it for Opendir + + stx UsrBuf256 + >LDYAI UsrBuf256 + >SYSCALL SYS.NewPstrYA + bcs .9 + txa + ldy #hFilter + sta (pData),y + +.5 >PUSHWI 256 + >PUSHBI 0 + >SYSCALL SYS.GetMem Get a 256 buffer to store BasePath + bcs .9 + + >STYA ZPPtr2 + txa + ldy #hBasePath + sta (pData),y + + >PUSHW ZPPtr1 Push Src + >PUSHW ZPPtr2 Push Dst + >SYSCALL SYS.PStrCpy + + >LDYA ZPPtr1 + >SYSCALL SYS.OPENDIRYA + bcs .9 + + ldy #hDIRs + sta (pData),y set hDIRs[1] = Src Hdir + tya + sta (pData),y set hDIRs index=hDIRs[1] + + jsr .9 Cleanup + + clc +.99 rts + + +.9 pha +.90 lda #$ff self modified + >SYSCALL SYS.FreeMemA + pla + sec + rts +*-------------------------------------- +EnterDirYA >PUSHYA push Src for StrCat + ldy #hBasePath + lda (pData),y + >SYSCALL SYS.GetMemPtrA + >STYA ZPPtr1 save full path + >PUSHYA push Src for StrCat + >SYSCALL SYS.StrCat + + jsr GetNextDir + + beq .99 CS + + + + + clc +.99 rts +*-------------------------------------- +LeaveDir +*-------------------------------------- +GetNextDir ldy #hDIRs + lda (pData),y + cmp #hDIRs+MAX.RECURSE+1 + beq .99 CS full!!! all hDIRs already alloacated + inc + + + + clc +.99 rts +*-------------------------------------- +GetLastDir *-------------------------------------- MAN SAVE BIN/X.CPLSMVRM.S.txt