diff --git a/.Floppies/A2OSX.BLANK.woz b/.Floppies/A2OSX.BLANK.woz index 4a2fc33b..fd9c3447 100644 Binary files a/.Floppies/A2OSX.BLANK.woz and b/.Floppies/A2OSX.BLANK.woz differ diff --git a/.Floppies/A2OSX.BOOT.woz b/.Floppies/A2OSX.BOOT.woz index 77a2f9d2..7382135c 100644 Binary files a/.Floppies/A2OSX.BOOT.woz and b/.Floppies/A2OSX.BOOT.woz differ diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index a6424c2b..64e812ce 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.TEST.po b/.Floppies/A2OSX.TEST.po index 732780bc..b75bf1f5 100644 Binary files a/.Floppies/A2OSX.TEST.po and b/.Floppies/A2OSX.TEST.po differ diff --git a/BIN/ATTR.S.txt b/BIN/ATTR.S.txt new file mode 100644 index 00000000..03f997b6 --- /dev/null +++ b/BIN/ATTR.S.txt @@ -0,0 +1,376 @@ +NEW + AUTO 3,1 + .LIST OFF + .OP 65C02 + .OR $2000 + .TF bin/attr +*-------------------------------------- + .INB inc/macros.i + .INB inc/a2osx.i + .INB inc/mli.i + .INB inc/mli.e.i +*-------------------------------------- +X.ENTER.SUBDIR .EQ 0 +X.COPY.TO.DEST .EQ 0 +X.DELETE.SOURCE .EQ 0 +*-------------------------------------- + .DUMMY + .OR ZPBIN +ZS.START +ZPPtr1 .BS 2 +ZPPtr2 .BS 2 +ZPFileName .BS 2 +ZPFileStat .BS 2 +ZPFullPath .BS 2 +ZPMode .BS 2 +ArgIndex .BS 1 +StrMode .BS 1 +ZS.END .ED +*-------------------------------------- +* File Header (16 Bytes) +*-------------------------------------- +CS.START cld + jmp (.1,x) + .DA #$61 6502,Level 1 (65c02) + .DA #1 BIN Layout Version 1 + .DA 0 + .DA CS.END-CS.START Code Size (without Constants) + .DA DS.END-DS.START Data SegmentSize + .DA #64 Stack Size + .DA #ZS.END-ZS.START Zero Page Size + .DA 0 +*-------------------------------------- +* Relocation Table +*-------------------------------------- +.1 .DA CS.INIT + .DA CS.RUN + .DA CS.DOEVENT + .DA CS.QUIT +L.MSG.USAGE .DA MSG.USAGE +L.MSG.DIR .DA MSG.DIR +L.MSG.FILE .DA MSG.FILE +L.MSG.OK .DA MSG.OK +L.MSG.ERR .DA MSG.ERR + .DA 0 +*-------------------------------------- +CS.INIT clc + rts +*-------------------------------------- +CS.RUN inc ArgIndex + lda ArgIndex + >SYSCALL ArgV + bcs .8 + + >STYA ZPPtr1 + lda (ZPPtr1) + cmp #'-' + bne .4 + + ldy #1 + lda (ZPPtr1),y + + ldx #OptionVars-OptionList-1 + +.2 cmp OptionList,x + beq .3 + dex + bpl .2 + +.9 >PUSHW L.MSG.USAGE + >PUSHBI 0 + >SYSCALL PrintF + lda #E.SYN + sec +.99 rts + +.3 ldy OptionVars,x + lda #$80 + sta (pData),y + bra CS.RUN +*-------------------------------------- +.4 lda StrMode + bne .5 + + lda ArgIndex + sta StrMode + bra CS.RUN + +.5 >LDA.G hSrcBasePath + bne .9 + + >LDYA ZPPtr1 + jsr InitSrcDirYA + bcc CS.RUN + rts + +.8 lda StrMode + beq .9 + + jsr CS.RUN.Str2Mode + bcs .9 + + >LDA.G hSrcBasePath + beq .9 + + >LDYAI 256 + >SYSCALL GetMem + bcs .99 + + >STYA ZPFullPath + txa + >STA.G hSrcFullPath +*-------------------------------------- +CS.RUN.LOOP ldy #S.PS.hStdIn + lda (pPS),y + >SYSCALL feof + bcs .99 + + tay + bne .1 + + >SYSCALL GetChar + bcs .99 + + cmp #$03 Ctrl-C + beq .99 Abort.... + + cmp #$13 Ctrl-S + bne .1 + + >LDA.G bPause + eor #$ff + sta (pData),y + bne CS.RUN.LOOP + +.1 >LDA.G bPause + bne CS.RUN.LOOP Pause... +*-------------------------------------- + jsr GetEntry + bcs CS.RUN.LEAVE + + ldy #S.STAT.MODE+1 + lda (ZPFileStat),y + and #$70 + bne .5 REG file ? + + jsr CS.RUN.FILE + bcc CS.RUN.NEXT + rts + +.5 cmp /S.STAT.MODE.DIR DIR ? + beq .6 + + cmp /S.STAT.MODE.BDEV VOL ? + bne .9 + +.6 jsr CS.RUN.DIR + bcc CS.RUN.NEXT + rts + +.9 lda #MLI.E.UNSUPST + sec +.99 rts +*-------------------------------------- +CS.RUN.NEXT jsr GetNextEntry + bcc CS.RUN.LOOP + +CS.RUN.LEAVE jsr LeaveSubDir + bcs .90 + + jsr BasePath.. + + jmp CS.RUN.NEXT + +.90 lda #0 + sec +.99 rts +*-------------------------------------- +CS.RUN.DIR lda (ZPFileName) + cmp #'.' + bne .1 + + ldy #1 + lda (ZPFileName),y + beq .8 + + cmp #'.' + bne .1 + + iny + lda (ZPFileName),y + beq .8 + +.1 jsr FilterMatch + bcs .8 + + jsr CS.RUN.GetFilePath + >PUSHW L.MSG.DIR + >PUSHW ZPFullPath + >PUSHBI 2 + >SYSCALL PrintF + bcs .9 + + >PUSHW ZPFullPath + >PUSHW ZPMode + >SYSCALL chmod + + jsr CS.RUN.CheckErr + bcs .9 + + >LDA.G bRecurse + bpl .8 + + >LDYA ZPFileName + jmp EnterSubDirYA + +.8 clc +.9 rts +*-------------------------------------- +CS.RUN.FILE clc +.9 rts +*-------------------------------------- +CS.RUN.Str2Mode >SYSCALL ArgV + >STYA ZPPtr1 + + ldy #$ff + +.1 iny + lda (ZPPtr1),y + bne .1 + + cpy #4 must be "765" max + bcs .9 + + stz ZPMode + stz ZPMode+1 + + ldy #0 + +.2 lda (ZPPtr1),y + beq .8 + cmp #'0' + bcc .9 + + cmp #'7'+1 + bcs .9 + + asl ZPMode + rol ZPMode+1 + asl ZPMode + rol ZPMode+1 + asl ZPMode + rol ZPMode+1 + and #7 + clc + adc ZPMode + sta ZPMode + bcc .3 + + inc ZPMode+1 + +.3 iny + bra .2 + +.8 clc + rts + +.9 sec + rts +*-------------------------------------- +CS.RUN.CheckErr bcs .1 + >LDYA L.MSG.OK + >SYSCALL PutS + rts + +.1 pha + >PUSHW L.MSG.ERR + pla + pha + >PUSHA + >PUSHBI 1 + >SYSCALL PrintF + >LDA.G bContinue + eor #$80 + asl + pla + rts +*-------------------------------------- +CS.RUN.GetFilePath + >LDA.G hSrcBasePath + >SYSCALL GetMemPtr + >PUSHYA + >LDYA ZPFullPath + >SYSCALL StrCpy + >PUSHW ZPFileName + >LDYA ZPFullPath + >SYSCALL StrCat + rts +*-------------------------------------- +CS.DOEVENT sec + rts +*-------------------------------------- +CS.QUIT jsr LeaveSubDir + bcc CS.QUIT + >LDA.G hFilter + beq .1 + >SYSCALL FreeMem +.1 >LDA.G hSrcFullPath + beq .8 + >SYSCALL FreeMem +.8 clc + rts +*-------------------------------------- + .INB usr/src/bin/x.fileenum.s +*-------------------------------------- +CS.END +*-------------------------------------- +OptionList .AS "CRcr" +OptionVars .DA #bContinue,#bRecurse,#bContinue,#bRecurse +*-------------------------------------- +ATTRS .AS "DeReBn----InWrRd" +*-------------------------------------- +MSG.USAGE .AS "Usage : ATTR File(s) (*,? wildcards allowed)\r\n" + .AS " -C : Continue on error\r\n" + .AS " -R : Recurse subdirectories\r\n" + .AZ "+|-De : Destroy enable\r\n" + .AS "+|-Re : Rename enable\r\n" + .AZ "+|-Bn : Backup needed\r\n" + .AZ "+|-In : Invisible\r\n" + .AZ "+|-Wr : Write enable\r\n" + .AS "+|-Rd : Read enable\r\n" +*-------------------------------------- +* 7 6 5 4 3 2 1 0 +* +--+--+--+--+--+--+--+--+ +* |D |RN|B |Reserved|W |R | +* +--+--+--+--+--+--+--+--+ +* +* D: Destroy enable bit +* RN: Rename enable bit +* B: Backup needed bit +* W: Write enable bit +* R: Read enable bit +* +* Bit 2 = Invisible Bit +*-------------------------------------- +MSG.OK .AZ "[OK]" +MSG.ERR .AZ "[%h]\r\n" +MSG.DIR .AZ "Dir :%s..." +MSG.FILE .AZ "File:%s..." +*-------------------------------------- + .DUMMY + .OR 0 +DS.START +bContinue .BS 1 +bRecurse .BS 1 + +bPause .BS 1 +hSrcFullPath .BS 1 + + .INB usr/src/bin/x.fileenum.g + +DS.END + .ED +*-------------------------------------- +MAN +SAVE usr/src/bin/attr.s +ASM diff --git a/BIN/CHGRP.S.txt b/BIN/CHGRP.S.txt index 1694c8a3..c7020748 100644 --- a/BIN/CHGRP.S.txt +++ b/BIN/CHGRP.S.txt @@ -223,8 +223,7 @@ CS.RUN.DIR lda (ZPFileName) .8 clc .9 rts *-------------------------------------- -CS.RUN.FILE - clc +CS.RUN.FILE clc rts *-------------------------------------- CS.RUN.GetGID >SYSCALL ArgV diff --git a/BIN/CHMOD.S.txt b/BIN/CHMOD.S.txt index a325bd00..b3b4c4f1 100644 --- a/BIN/CHMOD.S.txt +++ b/BIN/CHMOD.S.txt @@ -226,23 +226,7 @@ CS.RUN.DIR lda (ZPFileName) .8 clc .9 rts *-------------------------------------- -CS.RUN.FILE jsr FilterMatch - bcs .8 no match, skip.... - - jsr CS.RUN.GetFilePath - - >PUSHW L.MSG.FILE - >PUSHW ZPFullPath - >PUSHBI 2 - >SYSCALL PrintF - bcs .9 - - >PUSHW ZPFullPath - >PUSHW ZPMode - >SYSCALL chmod - jsr CS.RUN.CheckErr - -.8 clc +CS.RUN.FILE clc .9 rts *-------------------------------------- CS.RUN.Str2Mode >SYSCALL ArgV @@ -254,15 +238,16 @@ CS.RUN.Str2Mode >SYSCALL ArgV lda (ZPPtr1),y bne .1 - cpy #3 - bne .9 + cpy #4 must be "765" max + bcs .9 stz ZPMode stz ZPMode+1 - dey + ldy #0 .2 lda (ZPPtr1),y + beq .8 cmp #'0' bcc .9 @@ -283,10 +268,10 @@ CS.RUN.Str2Mode >SYSCALL ArgV inc ZPMode+1 -.3 dey - bpl .2 +.3 iny + bra .2 - clc +.8 clc rts .9 sec diff --git a/BIN/LS.S.txt b/BIN/LS.S.txt index 6a30052c..f823b8c0 100644 --- a/BIN/LS.S.txt +++ b/BIN/LS.S.txt @@ -723,12 +723,11 @@ Mod2CSTR ldy #S.STAT.MODE+1 plp - ldx #8 - ldy #S.STAT.MODE lda (ZPFileStat),y ldy #MOD+1 + ldx #8 .1 pha lda #'-' diff --git a/BIN/TOUCH.S.txt b/BIN/TOUCH.S.txt index e69de29b..849a020d 100644 --- a/BIN/TOUCH.S.txt +++ b/BIN/TOUCH.S.txt @@ -0,0 +1,8 @@ +*-------------------------------------- +MSG.USAGE .AS "Usage : TOUCH File(s) (*,? wildcards allowed)\r\n" + .AS " -C : Continue on error\r\n" + .AS " -R : Recurse subdirectories\r\n" + .AS " -A : Change ACCESS date/time\r\n" + .AS " -M : Change MODIFICATION date/time\r\n" + .AZ " -K : Change CREATION date/time\r\n" + .AZ " -T YY/MM/DD,hh:MM:ss : Use Specified date/time instead of current\r\n" diff --git a/BIN/UC.S.txt b/BIN/UC.S.txt new file mode 100644 index 00000000..fcf49627 --- /dev/null +++ b/BIN/UC.S.txt @@ -0,0 +1,350 @@ +NEW + AUTO 3,1 + .LIST OFF + .OP 65C02 + .OR $2000 + .TF bin/uc +*-------------------------------------- + .INB inc/macros.i + .INB inc/a2osx.i + .INB inc/kernel.i + .INB inc/mli.i + .INB inc/mli.e.i +*-------------------------------------- +X.ENTER.SUBDIR .EQ 0 +X.COPY.TO.DEST .EQ 0 +X.DELETE.SOURCE .EQ 0 +*-------------------------------------- + .DUMMY + .OR ZPBIN +ZS.START +ZPPtr1 .BS 2 +ZPPtr2 .BS 2 +ZPFileName .BS 2 +ZPFileStat .BS 2 + +ZPFullPath .BS 2 +ZPNewPath .BS 2 + +ZPLineBuf .BS 2 + +bPause .BS 1 + +bContinue .BS 1 +bRecurse .BS 1 + +ZS.END .ED +*-------------------------------------- +* File Header (16 Bytes) +*-------------------------------------- +CS.START cld + jmp (.1,x) + .DA #$61 6502,Level 1 (65c02) + .DA #1 BIN Layout Version 1 + .DA 0 + .DA CS.END-CS.START Code Size (without Constants) + .DA DS.END-DS.START Data SegmentSize + .DA #64 Stack Size + .DA #ZS.END-ZS.START Zero Page Size + .DA 0 +*-------------------------------------- +* Relocation Table +*-------------------------------------- +.1 .DA CS.INIT + .DA CS.RUN + .DA CS.DOEVENT + .DA CS.QUIT +L.MSG.USAGE .DA MSG.USAGE +L.MSG.DIR .DA MSG.DIR +L.MSG.FILE .DA MSG.FILE +L.MSG.OK .DA MSG.OK +L.MSG.ERR .DA MSG.ERR + .DA 0 +*-------------------------------------- +CS.INIT clc + rts +*-------------------------------------- +CS.RUN >INC.G ArgIndex + >SYSCALL ArgV + bcs .5 + >STYA ZPPtr1 + lda (ZPPtr1) + cmp #'-' + bne .4 + jsr CS.RUN.CheckOpt + bcc CS.RUN + +.9 >PUSHW L.MSG.USAGE + >PUSHBI 0 + >SYSCALL PrintF + lda #E.SYN + sec + rts + +.4 >LDA.G hSrcBasePath + bne .9 + >LDYA ZPPtr1 + jsr InitSrcDirYA + bcc CS.RUN +.99 rts +*-------------------------------------- +.5 >LDYAI 256 + >SYSCALL GetMem + bcs .99 + >STYA ZPFullPath + txa + >STA.G hSrcFullPath + + >LDYAI 256 + >SYSCALL GetMem + bcs .99 + >STYA ZPNewPath + txa + >STA.G hSrcNewPath +*-------------------------------------- +CS.RUN.LOOP ldy #S.PS.hStdIn + lda (pPS),y + >SYSCALL feof + bcs .99 + + tay + bne .1 + + >SYSCALL GetChar + bcs .99 + + cmp #$03 Ctrl-C + beq .99 Abort.... + + cmp #$13 Ctrl-S + bne .1 + + lda bPause + eor #$ff + sta bPause + bne CS.RUN.LOOP + +.1 lda bPause + bne CS.RUN.LOOP Pause... +*-------------------------------------- + jsr GetEntry + bcs CS.RUN.LEAVE + + ldy #S.STAT.MODE+1 + lda (ZPFileStat),y + and #$70 + bne .5 REG file ? + + jsr CS.RUN.FILE + bcc CS.RUN.NEXT + rts + +.5 cmp /S.STAT.MODE.DIR DIR ? + beq .6 + + cmp /S.STAT.MODE.BDEV VOL ? + bne .9 + +.6 jsr CS.RUN.DIR + bcc CS.RUN.NEXT + rts + +.9 lda #MLI.E.UNSUPST + sec +.99 rts +*-------------------------------------- +CS.RUN.NEXT jsr GetNextEntry + bcc CS.RUN.LOOP + +CS.RUN.LEAVE jsr LeaveSubDir + bcs .90 + + jsr BasePath.. + + jmp CS.RUN.NEXT + +.90 lda #0 + sec +.99 rts +*-------------------------------------- +CS.RUN.DIR lda (ZPFileName) + cmp #'.' + bne .1 + + ldy #1 + lda (ZPFileName),y + beq .8 + + cmp #'.' + bne .1 + + iny + lda (ZPFileName),y + beq .8 + +.1 jsr FilterMatch + bcs .8 + + jsr CS.RUN.GetFilePath + + >PUSHW L.MSG.DIR + >PUSHW ZPFullPath + >PUSHBI 2 + >SYSCALL PrintF + bcs .9 + + >PUSHW ZPFullPath + jsr CS.RUN.GetNewPath + >PUSHYA + >SYSCALL Rename + jsr CS.RUN.CheckErr + bcs .9 + + lda bRecurse + bpl .8 + + >LDYA ZPFileName is now lowercase + jmp EnterSubDirYA + +.8 clc +.9 rts +*-------------------------------------- +CS.RUN.FILE jsr FilterMatch + bcs .8 no match, skip.... + + jsr CS.RUN.GetFilePath + >PUSHW L.MSG.FILE + >PUSHW ZPFullPath + >PUSHBI 2 + >SYSCALL PrintF + bcs .9 + + >PUSHW ZPFullPath + jsr CS.RUN.GetNewPath + >PUSHYA + >SYSCALL Rename + jsr CS.RUN.CheckErr + +.8 clc +.9 rts +*-------------------------------------- +CS.RUN.CheckErr bcs .1 + >LDYA L.MSG.OK + >SYSCALL PutS + rts + +.1 pha + >PUSHW L.MSG.ERR + pla + pha + >PUSHA + >PUSHBI 1 + >SYSCALL PrintF + lda bContinue + eor #$80 + asl + pla + rts +*-------------------------------------- +CS.RUN.GetFilePath + >LDA.G hSrcBasePath + >SYSCALL GetMemPtr + >PUSHYA + >LDYA ZPFullPath + >SYSCALL StrCpy + >PUSHW ZPFileName + >LDYA ZPFullPath + >SYSCALL StrCat + rts +*-------------------------------------- +CS.RUN.GetNewPath + >LDA.G hSrcBasePath + >SYSCALL GetMemPtr + >PUSHYA + >LDYA ZPNewPath + >SYSCALL StrCpy + + >LDYA ZPFileName + >SYSCALL strupr + + >PUSHW ZPFileName + >LDYA ZPNewPath + >SYSCALL StrCat + rts +*-------------------------------------- +CS.DOEVENT sec + rts +*-------------------------------------- +CS.QUIT jsr LeaveSubDir + bcc CS.QUIT + + >LDA.G hFilter + beq .1 + + >SYSCALL FreeMem +.1 >LDA.G hSrcFullPath + beq .2 + + >SYSCALL FreeMem + +.2 >LDA.G hSrcNewPath + beq .8 + + >SYSCALL FreeMem + +.8 clc + rts +*-------------------------------------- +CS.RUN.CheckOpt ldy #1 + lda (ZPPtr1),y + + ldx #OptionVars-OptionList-1 + +.2 cmp OptionList,x + beq .3 + dex + bpl .2 + + sec + rts + +.3 ldy OptionVars,x + lda #$ff + sta 0,y + clc + rts +*-------------------------------------- + .INB usr/src/bin/x.fileenum.s +*-------------------------------------- +CS.END +*-------------------------------------- +OptionList .AS "CRcr" +OptionVars .DA #bContinue,#bRecurse + .DA #bContinue,#bRecurse +*-------------------------------------- +MSG.USAGE .AS "Usage : UC File(s) (*,? wildcards allowed)\r\n" + .AS " -C : Continue on error\r\n" + .AS " -R : Recurse subdirectories\r\n" +MSG.OK .AZ "[OK]" +MSG.ERR .AZ "[%h]\r\n" +MSG.DIR .AZ "Dir :%s..." +MSG.FILE .AZ "File:%s..." +*-------------------------------------- + .DUMMY + .OR 0 +DS.START +ArgIndex .BS 1 + +hSrcFullPath .BS 1 +hSrcNewPath .BS 1 +hFile .BS 1 +hMem .BS 1 + + .INB usr/src/bin/x.fileenum.g + +DS.END + .ED +*-------------------------------------- +MAN +SAVE usr/src/bin/uc.s +ASM diff --git a/INC/A2osX.I.txt b/INC/A2osX.I.txt index f5e0fe54..606a6e1a 100644 --- a/INC/A2osX.I.txt +++ b/INC/A2osX.I.txt @@ -41,6 +41,8 @@ ZPBIN .EQ $E0 32 bytes ZPBIN.SIZE .EQ 32 PSCTX.SIZE .EQ $100-pCode *-------------------------------------- +A2osX.ZCALL .EQ $0000 +*-------------------------------------- * A2osX GLOBAL PAGE * $BC00->$BC0F : Public Vetors *-------------------------------------- diff --git a/SBIN/NETWORKD.S.txt b/SBIN/NETWORKD.S.txt index e012975f..2eac59e5 100644 --- a/SBIN/NETWORKD.S.txt +++ b/SBIN/NETWORKD.S.txt @@ -384,8 +384,8 @@ CS.END MSG.RUNNING .AZ "NETWORKD:Already loaded, exiting." MSG.DEV.KO .AZ "NETWORKD:No Device Found, exiting." MSG.DEV.OK .AZ "NETWORKD:Bound To Device : %s\r\n" -MSG.LIB .AZ "NETWORKD:Loading %s ... " -MSG.EXEC .AZ "NETWORKD:Running %s ... " +MSG.LIB .AZ "NETWORKD:Loading %s..." +MSG.EXEC .AZ "NETWORKD:Running %s..." MSG.OK .AZ "[OK]" MSG.ERR .AZ "[%h]\r\n" ETCNETWORK .AZ "${BOOT}etc/network" diff --git a/SYS/KERNEL.S.FS.txt b/SYS/KERNEL.S.FS.txt index 6a49b801..21adf739 100644 --- a/SYS/KERNEL.S.FS.txt +++ b/SYS/KERNEL.S.FS.txt @@ -217,10 +217,10 @@ FS.DirEnt2Stat jsr FS.ClrStat dex bne .2 - ldy #S.FIEX.ACCESS - lda (ZPPtr3),y +* ldy #S.FIEX.ACCESS +* lda (ZPPtr3),y - jsr FS.Access2Mode +* jsr FS.Access2Mode ldy #S.FIEX.ACL lda (ZPPtr3),y