diff --git a/.Docs/KERNEL.md b/.Docs/KERNEL.md index 249f7d35..4425aa47 100644 --- a/.Docs/KERNEL.md +++ b/.Docs/KERNEL.md @@ -67,8 +67,14 @@ Y,A = FD A = DEVID # OpenDir + +## C +`int hDIR opendir (const char * dirpath);` + +## ASM **In:** - Y,A = PATH (C-String) +`>LDYA dirpath` +`>SYSCALL opendir` **Out:** CC : success A = hDIR @@ -76,8 +82,15 @@ Y,A = FD A = EC # ReadDir -**In:** - A = hDIR + +## C +`int readdir (int hDIR, S.DIRENT * dirent);` + +## ASM +**In:** +`>PUSHW dirent` +`lda hDIR` +`>SYSCALL readdir` **Out:** CC : success X = hDIRENT @@ -87,8 +100,14 @@ Y,A = FD note : A = 0 means no more entry # CloseDir + +## C +`void closedir(hDIR);` + +## ASM **In:** - A = hDIR +`lda hDIR` +`>SYSCALL closedir` **Out:** none, always succeed. @@ -445,9 +464,15 @@ Load a file in AUX memory (Stock Objects) # Stat Return information about a file + +## C +`int stat(const char *pathname, struct stat *statbuf);` + +## ASM **In:** - PUSHW = PTR to S.STAT buffer - PUSHW = PTR to Filename (C-String) +`>PUSHW statbuf` +`>LDYA pathname` +`>SYSCALL stat` **Out:** # MKDir diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 7f31ac4c..526a6bec 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 4d637188..f8131714 100644 Binary files a/.Floppies/A2OSX.SRC.po and b/.Floppies/A2OSX.SRC.po differ diff --git a/BIN/ASM.S.FIO.txt b/BIN/ASM.S.FIO.txt index 750164e7..35d6130c 100644 --- a/BIN/ASM.S.FIO.txt +++ b/BIN/ASM.S.FIO.txt @@ -324,7 +324,7 @@ FIO.FileClose ldy #SRC.COUNT adc #SRC.hFILES-1 tay lda (pData),y - >SYSCALL FClose.A + >SYSCALL fclose ldy #SRC.COUNT lda (pData),y diff --git a/BIN/ASM.S.MAC.txt b/BIN/ASM.S.MAC.txt index 3d2eaf9a..14bf0cc1 100644 --- a/BIN/ASM.S.MAC.txt +++ b/BIN/ASM.S.MAC.txt @@ -8,7 +8,7 @@ MAC.Init >SYSCALL SListNew >STA.G MAC.hMacroList >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPMacroBuf @@ -21,7 +21,7 @@ MAC.Init >SYSCALL SListNew >STA.G MAC.hCtxList >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPCtxBuf diff --git a/BIN/ASM.S.SYM.txt b/BIN/ASM.S.SYM.txt index 92d9afe7..89fa16d8 100644 --- a/BIN/ASM.S.SYM.txt +++ b/BIN/ASM.S.SYM.txt @@ -21,7 +21,7 @@ SYM.Init >SYSCALL SListNew >STA.G SYM.hGlobalList >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPNameBuf @@ -29,7 +29,7 @@ SYM.Init >SYSCALL SListNew >STA.G SYM.hNameBuf >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPGlobalBuf @@ -37,7 +37,7 @@ SYM.Init >SYSCALL SListNew >STA.G SYM.hGlobalBuf >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPLookupBuf diff --git a/BIN/ASM.S.txt b/BIN/ASM.S.txt index 7d1ca1b4..93b84625 100644 --- a/BIN/ASM.S.txt +++ b/BIN/ASM.S.txt @@ -219,14 +219,14 @@ CS.INIT ldy #S.PS.ARGC jsr OUT.Init >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPLineBuf txa >STA.G SRC.hLineBuf >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPTmpBuf txa diff --git a/BIN/ATBROWSE.S.txt b/BIN/ATBROWSE.S.txt index 645d2621..81d92b05 100644 --- a/BIN/ATBROWSE.S.txt +++ b/BIN/ATBROWSE.S.txt @@ -78,7 +78,7 @@ CS.RUN >STZ.G P.GetInfo Sync >LDYAI 1024 >STYA.G P.LookupName+$10 BufLen - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .99 >STYA.G P.LookupName+$12 BufPtr diff --git a/BIN/CHTYP.S.txt b/BIN/CHTYP.S.txt index c95e1c03..600149d2 100644 --- a/BIN/CHTYP.S.txt +++ b/BIN/CHTYP.S.txt @@ -102,7 +102,7 @@ CS.INIT beq .99 we also have a TYPE >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .99 >STYA ZPFullPath txa diff --git a/BIN/LS.S.txt b/BIN/LS.S.txt index 52888e73..d3d263fd 100644 --- a/BIN/LS.S.txt +++ b/BIN/LS.S.txt @@ -4,11 +4,11 @@ AUTO 4,1 .LIST OFF .OP 65C02 .OR $2000 - .TF /A2OSX.BUILD/BIN/LS + .TF BIN/LS *-------------------------------------- - .INB /A2OSX.BUILD/INC/MACROS.I - .INB /A2OSX.BUILD/INC/A2OSX.I - .INB /A2OSX.BUILD/INC/MLI.ERR.I + .INB INC/MACROS.I + .INB INC/A2OSX.I + .INB INC/MLI.ERR.I *-------------------------------------- X.COPY.TO.DEST .EQ 0 X.DELETE.SOURCE .EQ 0 diff --git a/BIN/MD5.S.txt b/BIN/MD5.S.txt index 2a71ae03..3590d6f7 100644 --- a/BIN/MD5.S.txt +++ b/BIN/MD5.S.txt @@ -132,7 +132,7 @@ CS.RUN.FILE >LDA.G Arg >STA.G hFullPath >LDYAI FILEBUF.SIZE - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPDataBufPtr txa @@ -204,7 +204,7 @@ CS.QUIT >LDA.G hFullPath .2 >LDA.G hFile beq .3 - >SYSCALL FClose.A + >SYSCALL fclose .3 .7 lda hLIBCRYPT diff --git a/BIN/X.CPMVRM.S.txt b/BIN/X.CPMVRM.S.txt index 8d2e03a9..ce2b1885 100644 --- a/BIN/X.CPMVRM.S.txt +++ b/BIN/X.CPMVRM.S.txt @@ -123,7 +123,7 @@ CS.INIT .FIN .8 >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 txa >STA.G hSrcFullPath @@ -131,7 +131,7 @@ CS.INIT .DO X.COPY.TO.DEST=1 >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 txa >STA.G hDstFullPath @@ -217,7 +217,7 @@ CS.RUN >SYSCALL GetChar ldy #hSrcFullPath jsr CS.RUN.GetPathY - >SYSCALL Remove.YA + >SYSCALL remove bcs .22 jsr CS.RUN.CheckErr Success!!! jsr CS.RUN.IncCount @@ -295,7 +295,7 @@ CS.RUN.LEAVE jsr LeaveSubDir exit this sub dir.... bcs CS.RUN.LEAVE.RTS >LDYA ZPPtr1 - >SYSCALL Remove.YA + >SYSCALL remove jsr CS.RUN.CheckErr bcs .99 .FIN @@ -330,8 +330,6 @@ CS.RUN.DIR jsr CS.RUN.DIR.MSG ldy #hDstFullPath jsr CS.RUN.GetPathY - >PUSHYA - >SYSCALL Stat bcs .3 File Not exists...go create @@ -370,7 +368,7 @@ CS.RUN.DIR jsr CS.RUN.DIR.MSG .3 ldy #hDstFullPath jsr CS.RUN.GetPathY - >SYSCALL MKDir.YA + >SYSCALL mkdir .4 jsr CS.RUN.CheckErr bcs CS.RUN.DIR.RTS @@ -394,8 +392,6 @@ CS.RUN.FILE jsr CS.RUN.FILE.MSG ldy #hDstFullPath jsr CS.RUN.GetPathY - >PUSHYA - >SYSCALL Stat bcs .2 File Not exists...go create @@ -587,7 +583,7 @@ CS.RUN.CopyStart .9 pha ldy #hSrcFile lda (pData),y - >SYSCALL FClose.A + >SYSCALL fclose pla ldy #CopyRC @@ -618,7 +614,7 @@ CS.RUN.Open phy Save Filename *-------------------------------------- CS.RUN.Copy stz .90+1 >LDYAI X.COPY.BUF.SIZE - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPPtr1 @@ -667,11 +663,11 @@ CS.RUN.Copy stz .90+1 *-------------------------------------- CS.RUN.CopyEnd ldy #hSrcFile lda (pData),y - >SYSCALL FClose.A + >SYSCALL fclose ldy #hDstFile lda (pData),y - >SYSCALL FClose.A + >SYSCALL fclose ldy #bCopy lda #$0 @@ -725,7 +721,6 @@ CS.RUN.BuildFilePath jsr CS.RUN.GetPathY >STYA ZPPtr1 - >PUSHYA >SYSCALL StrCpy >PUSHW ZPFileName @@ -742,7 +737,6 @@ CS.RUN.BuildFilePath jsr CS.RUN.GetPathY >STYA ZPPtr1 - >PUSHYA >SYSCALL StrCpy ldy #hDstFileName @@ -791,10 +785,10 @@ CS.QUIT jsr LeaveSubDir ldy #hSrcFile lda (pData),y - >SYSCALL FClose.A + >SYSCALL fclose ldy #hDstFile lda (pData),y - >SYSCALL FClose.A + >SYSCALL fclose .1 ldy #hDstFullPath jsr CS.QUIT.FREE diff --git a/BIN/X.FILEENUM.S.txt b/BIN/X.FILEENUM.S.txt index 52095b7b..b32fba76 100644 --- a/BIN/X.FILEENUM.S.txt +++ b/BIN/X.FILEENUM.S.txt @@ -28,7 +28,7 @@ InitSrcDirYA >SYSCALL RealPath jmp .5 .55 >PUSHEA.G STAT - >PUSHW ZPPtr1 + >LDYA ZPPtr1 >SYSCALL Stat bcs .1 File/DIR does not exists, go extract pattern @@ -144,7 +144,7 @@ InitDstDirYA >SYSCALL RealPath >STA.G hFullPath >PUSHEA.G STAT - >PUSHW ZPPtr1 + >LDYA ZPPtr1 >SYSCALL Stat bcs .1 File/DIR does not exists, go extract DstFileName @@ -384,7 +384,7 @@ GetEntry.ReadDir adc #hDIRs-1 tay lda (pData),y - + >SYSCALL ReadDir bcs .9 >STYA ZPFileName @@ -563,3 +563,5 @@ BasePath..1 lda (pData),y *-------------------------------------- MAN SAVE /A2OSX.SRC/BIN/X.FILEENUM.S +LOAD /A2OSX.SRC/BIN/LS.S +ASM diff --git a/BMP2PIX.S.txt b/BMP2PIX.S.txt index 3b07a916..7e9e395f 100644 --- a/BMP2PIX.S.txt +++ b/BMP2PIX.S.txt @@ -94,7 +94,7 @@ CS.INIT beq .99 >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs CS.INIT.RTS >STYA ZPBufPtr @@ -316,7 +316,7 @@ CS.QUIT >LDA.G hBuf .1 >LDA.G hOutputFile beq .8 - >SYSCALL FClose.A + >SYSCALL fclose .8 clc rts diff --git a/DRV/LANCEGS.DRV.S.txt b/DRV/LANCEGS.DRV.S.txt index 16919347..1970d61a 100644 --- a/DRV/LANCEGS.DRV.S.txt +++ b/DRV/LANCEGS.DRV.S.txt @@ -195,7 +195,7 @@ READBLOCK.RxOK lda #L91C96.2.PTR.RCVD+L91C96.2.PTR.AUTOI+L91C96.2.PTR.READ bne .11 inc -.11 >SYSCALL GetMem.YA +.11 >SYSCALL getmem bcs .99 >STYA ZPTmpPTR stx .8+1 diff --git a/DRV/UTHER2.AI.DRV.S.txt b/DRV/UTHER2.AI.DRV.S.txt index 3c9b6ee3..cc91d02f 100644 --- a/DRV/UTHER2.AI.DRV.S.txt +++ b/DRV/UTHER2.AI.DRV.S.txt @@ -206,7 +206,7 @@ READBLOCK.RxOK >AR.SELECT S0.RX.RD adc /S.IP ply - >SYSCALL GetMem.YA + >SYSCALL getmem bcs READBLOCK.RTS >STYA ZPTmpPTR diff --git a/DRV/UTHERNET.DRV.S.txt b/DRV/UTHERNET.DRV.S.txt index 663bc569..6b243076 100644 --- a/DRV/UTHERNET.DRV.S.txt +++ b/DRV/UTHERNET.DRV.S.txt @@ -226,7 +226,7 @@ READBLOCK php lda Size+1 adc #0 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPTmpPTR diff --git a/DRV/UTHERNET2.DRV.S.txt b/DRV/UTHERNET2.DRV.S.txt index 9a479582..f2313beb 100644 --- a/DRV/UTHERNET2.DRV.S.txt +++ b/DRV/UTHERNET2.DRV.S.txt @@ -192,7 +192,7 @@ READBLOCK.RxOK >AR.SELECT S0.RX.RD ldy W5100.DR,x get RX.Size LO sty RXTX.Size - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .99 >STYA ZPTmpPTR stx .8+1 diff --git a/FNT2FON.S.txt b/FNT2FON.S.txt index 43400b9c..abffb5b5 100644 --- a/FNT2FON.S.txt +++ b/FNT2FON.S.txt @@ -97,7 +97,7 @@ CS.INIT beq .99 >LDYAI 8192 max 256x256 pixels - >SYSCALL GetMem.YA + >SYSCALL getmem bcs CS.INIT.RTS >STYA ZPCharBufPtr @@ -180,7 +180,7 @@ CS.INIT.CREATEOUTPUT >STA.G hOutputFile >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPOutPutBufPtr @@ -228,7 +228,7 @@ CS.RUN ldy #S.FNT.dfBreakChar sta (pData),y ply - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPOutPutTblPtr txa @@ -789,7 +789,7 @@ CS.QUIT >LDA.G hOutPutBuf .1 >LDA.G hOutputFile beq .2 - >SYSCALL FClose.A + >SYSCALL fclose .2 >LDA.G hInputBuf beq .3 diff --git a/LIB/LIBCRYPT.S.txt b/LIB/LIBCRYPT.S.txt index bdfdde6d..23670aad 100644 --- a/LIB/LIBCRYPT.S.txt +++ b/LIB/LIBCRYPT.S.txt @@ -153,7 +153,7 @@ MD5 >STYA ZPDataPtr * A = hMem To S.MD5 *\-------------------------------------- MD5Init >LDYAI S.MD5 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPCtxPtr diff --git a/LIB/LIBGUI.S.WND.txt b/LIB/LIBGUI.S.WND.txt index 2caaf15b..5b07b46c 100644 --- a/LIB/LIBGUI.S.WND.txt +++ b/LIB/LIBGUI.S.WND.txt @@ -55,7 +55,7 @@ WND.Quit rts *-------------------------------------- WND.New >STYA ZPPtr1 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPWNDPtr diff --git a/LIB/LIBTCPIP.S.FRM.txt b/LIB/LIBTCPIP.S.FRM.txt index 09801f84..e5a84f2b 100644 --- a/LIB/LIBTCPIP.S.FRM.txt +++ b/LIB/LIBTCPIP.S.FRM.txt @@ -43,7 +43,7 @@ FRM.NewIP stx .8+1 txa adc #0 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 stx hFrameOut diff --git a/LIB/LIBTCPIP.S.SKT.txt b/LIB/LIBTCPIP.S.SKT.txt index c2313445..27959523 100644 --- a/LIB/LIBTCPIP.S.SKT.txt +++ b/LIB/LIBTCPIP.S.SKT.txt @@ -1162,7 +1162,7 @@ SKT.NewTCB >LDYAI S.TCB bpl .2 >LDYAI K.TCP.WSIZE - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 txa @@ -1170,7 +1170,7 @@ SKT.NewTCB >LDYAI S.TCB sta (ZPTmpPtr3),y >LDYAI K.TCP.WSIZE - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 txa diff --git a/README.md b/README.md index fa5bf91d..3192e22d 100644 --- a/README.md +++ b/README.md @@ -304,23 +304,24 @@ note : '$VAR' does NOT expand Variable | LSDEV | Working | | 0.92 | | PS | Working | | 0.92 | | MD | Working | | 0.92 | -| LS | Working | -A : Do Not Print . & .. | 0.9.1 | +| LS | Working | -A : Do Not Print . & .. | 0.92 | | | | -L : long listing with size/date... | | | | | -R : Recurse subdirectories | | -| RM | Working | -C : Continue On Error | 0.9.1 | +| RM | Working | -C : Continue On Error | 0.92 | | | | -Q : Quiet | | | | | -R : Recurse subdirectories | | -| CP | Working | -C : Continue On Error | 0.9.1 | +| CP | Working | -C : Continue On Error | 0.92 | | | | -Q : Quiet | | | | | -R : Recurse subdirectories | | | | | -Y : Dont't Prompt For Override | | -| MV | Working | -C : Continue On Error | 0.9.1 | +| MV | Working | -C : Continue On Error | 0.92 | | | | -Q : Quiet | | | | | -R : Recurse subdirectories | | | | | -Y : Dont't Prompt For Override | | | CAT | Working | -A : Show All non printable caracters | 0.92 | | | | -N : Number all output lines | | | | | -S : Suppress repeated empty output lines | | +| EDIT | Working | still missing : find/replace | 0.92 | | CHTYP | Working | -C : Continue On Error | 0.9.1 | | | | -R : Recurse subdirectories | | | CHMOD | In Progress | -C : Continue On Error | 0.9 | @@ -332,8 +333,10 @@ note : '$VAR' does NOT expand Variable | FORMAT | In Progress | -L : Low-Level Format | 0.9.1 | | | | -1..9 : Catalog Size (block count) | | | MD5 | In Progress | -D : String Input | 0.9.1 | -| EDIT | Working | still missing : find/replace | 0.92 | | NSCUTIL | Working | Tool for setting time in NSC/DL1216E | 0.9 | + +## Network (TCPIP) tools: +| Name | Status | Comment | K.Ver | | ---- | ------ | ------- | ----- | | ARP | Working | dump ARP cache, setup a static ARP entry | 0.9.1 | | PING | Working | | 0.9.1 | @@ -341,7 +344,7 @@ note : '$VAR' does NOT expand Variable | IPCONFIG | Working | renamed from NETINFO | 0.9.1 | | NETSTAT | Working | | 0.9.1 | -## BIN,External DEV Shell commands: +## DEV tools: | Name | Status | Comment | K.Ver | | ---- | ------ | ------- | ----- | | ASM | In Progress | S-C MASM based multi CPU assembler | 0.9.1 | diff --git a/SBIN/HTTPD.S.txt b/SBIN/HTTPD.S.txt index c9270956..2d388dad 100644 --- a/SBIN/HTTPD.S.txt +++ b/SBIN/HTTPD.S.txt @@ -106,7 +106,7 @@ CS.RUN.INIT ldx #3 sta (pData),y >LDYAI 256 - >SYSCALL GetMem.YA + >SYSCALL getmem bcs CS.RUN.RTS >STYA ZPLinePtr diff --git a/SBIN/SHELL.S.CMD.txt b/SBIN/SHELL.S.CMD.txt index 6b62f2a0..a0047c32 100644 --- a/SBIN/SHELL.S.CMD.txt +++ b/SBIN/SHELL.S.CMD.txt @@ -74,9 +74,10 @@ Cmd.Parse.NextC lda (ZPPtr1) Cmd.Exec lda #0 >STA.G CMD.bStartProc >STA.G CMD.hFullpath - - >LDYA ZPCMDBuf - >SYSCALL puts + +* SET +X +* >LDYA ZPCMDBuf +* >SYSCALL puts >LDYA ZPCMDBuf >SYSCALL ExpandStr @@ -155,7 +156,7 @@ Cmd.Exec.EXT jsr Cmd.Exec.Split bne .1 >PUSHEA.G CMD.Stat - >PUSHW ZPPtr1 + >LDYA ZPPtr1 >SYSCALL STAT bcs Cmd.Exec.Done @@ -315,7 +316,7 @@ Cmd.Exec.CD lda (ZPPTR2) beq .8 we have '/' >PUSHEA.G CMD.Stat - >PUSHW ZPPTR2 + >LDYA ZPPTR2 >SYSCALL STAT bcs .9 diff --git a/SYS/KERNEL.S.BIN.txt b/SYS/KERNEL.S.BIN.txt index 5da37644..153e7660 100644 --- a/SYS/KERNEL.S.BIN.txt +++ b/SYS/KERNEL.S.BIN.txt @@ -197,7 +197,7 @@ BIN.Load >STYA BIN.CmdLine bne .1 *-------------------------------------- BIN.Load.1 >PUSHWI K.S.STAT - >PUSHW BIN.CmdLine + >LDYA BIN.CmdLine >SYSCALL STAT BANK1!!! Look for AUXTYPE bcs .9 diff --git a/SYS/KERNEL.S.DIRENT.txt b/SYS/KERNEL.S.DIRENT.txt index 53e5f44b..7ee1e59e 100644 --- a/SYS/KERNEL.S.DIRENT.txt +++ b/SYS/KERNEL.S.DIRENT.txt @@ -3,8 +3,12 @@ PREFIX /A2OSX.BUILD AUTO 4,1 */-------------------------------------- * # OpenDir +* ## C +* `int hDIR opendir (const char * dirpath);` +* ## ASM * **In:** -* Y,A = PATH (C-String) +* `>LDYA dirpath` +* `>SYSCALL opendir` * **Out:** * CC : success * A = hDIR @@ -59,8 +63,13 @@ K.OpenDir jsr PFT.CheckPathYA .99 rts */-------------------------------------- * # ReadDir -* **In:** -* A = hDIR +* ## C +* `int readdir (int hDIR, S.DIRENT * dirent);` +* ## ASM +* **In:** +* `>PUSHW dirent` +* `lda hDIR` +* `>SYSCALL readdir` * **Out:** * CC : success * X = hDIRENT @@ -599,8 +608,12 @@ K.ReadDir.ConvertTime rts */------------------------------------- * # CloseDir +* ## C +* `void closedir(hDIR);` +* ## ASM * **In:** -* A = hDIR +* `lda hDIR` +* `>SYSCALL closedir` * **Out:** * none, always succeed. *\------------------------------------- diff --git a/SYS/KERNEL.S.ENV.txt b/SYS/KERNEL.S.ENV.txt index 6e0e571c..35e988bc 100644 --- a/SYS/KERNEL.S.ENV.txt +++ b/SYS/KERNEL.S.ENV.txt @@ -203,7 +203,7 @@ K.FileSearch.YA >STYA .4+1 bra .4 .5 >PUSHWI K.S.STAT - >PUSHWI K.Buf256 + >LDYAI K.Buf256 >SYSCALL STAT -> BNK1 bcs .1 Failed...retry next path... diff --git a/SYS/KERNEL.S.INIT.txt b/SYS/KERNEL.S.INIT.txt index 82e016a5..661736b4 100644 --- a/SYS/KERNEL.S.INIT.txt +++ b/SYS/KERNEL.S.INIT.txt @@ -993,16 +993,16 @@ MSG.Init2.OK .AZ "A2osX[Stage2]:Complete.\n" *-------------------------------------- SYSSCREEN.TOP .AZ "A2osX 0.92 System Screen" MSG.Init3 .AZ "A2osX[Stage3]:Init\r\nPress Ctrl-D for Mantenance Mode.\r\n" -MSG.DEV .AZ "-Device Manager...\r\n" -MSG.BLKDEV .AZ " /DEV/%s\r\n" -MSG.IRQ .AZ "-Interrupt Manager..." -MSG.IRQ.VBL .AZ "Mouse VBL IRQ Activated.\r\n" -MSG.IRQ.CLOCK .AZ "Clock Card IRQ Activated.\r\n" -MSG.IRQ.POLL .AZ "Polling Mode.\r\n" -MSG.EVT .AZ "-Event Manager...\r\n" -MSG.FLT .AZ "-Path Filter...\r\n" -MSG.TSK .AZ "-Task Manager...\r\n" -MSG.Prefix .AZ "Prefix:%s\r\n" +MSG.DEV .AZ "Device Manager...\r\n" +MSG.BLKDEV .AZ " Adding : /DEV/%s\r\n" +MSG.IRQ .AZ "Interrupt Manager...\r\n" +MSG.IRQ.VBL .AZ " Mouse VBL IRQ Activated.\r\n" +MSG.IRQ.CLOCK .AZ " Clock Card IRQ Activated.\r\n" +MSG.IRQ.POLL .AZ " Polling Mode.\r\n" +MSG.EVT .AZ "Event Manager...\r\n" +MSG.FLT .AZ "Path Filter...\r\n" +MSG.TSK .AZ "Task Manager...\r\n" +MSG.Prefix .AZ "Root:%s\r\n" MSG.MMode .AZ "Ctrl-D Pressed, entering Maintenance mode...\r\n" MSG.Startup .AZ "Executing Kernel Startup Script...\r\nCmd:%s\r\n" MSG.StartupErr .AZ "Failed : [$%h]\r\n" diff --git a/SYS/KERNEL.S.PFT.txt b/SYS/KERNEL.S.PFT.txt index 5ac5eaea..dc51a48d 100644 --- a/SYS/KERNEL.S.PFT.txt +++ b/SYS/KERNEL.S.PFT.txt @@ -87,7 +87,9 @@ PFT.CheckNodeA sta .9+1 save hFILE jsr K.GetMemPtr X = unmodified >STYA ZPPtr1 - lda (ZPPtr1) + + ldy #S.FD.HANDLER + lda (ZPPtr1),y beq .9 Handler is 0, back to kernel.... jsr K.GetMemPtr diff --git a/SYS/KERNEL.S.STAT.txt b/SYS/KERNEL.S.STAT.txt index 2265c2ac..9dd26f0c 100644 --- a/SYS/KERNEL.S.STAT.txt +++ b/SYS/KERNEL.S.STAT.txt @@ -4,6 +4,9 @@ AUTO 4,1 *-------------------------------------- * # FStat * Return information about a hfile +* ## ASM +* `int fstat(int fd, struct stat *statbuf);` +* ## ASM * **In:** * PUSHW = PTR to S.STAT buffer * PUSHB = hFile @@ -14,14 +17,20 @@ AUTO 4,1 */-------------------------------------- * # Stat * Return information about a file +* ## C +* `int stat(const char *pathname, struct stat *statbuf);` +* ## ASM * **In:** -* PUSHW = PTR to S.STAT buffer -* PUSHW = PTR to Filename (C-String) +* `>PUSHW statbuf` +* `>LDYA pathname` +* `>SYSCALL stat` * **Out:** *\-------------------------------------- -K.Stat jsr PFT.CheckPathSTK - jsr STDIO.PullMLIPath +K.Stat jsr PFT.CheckPathYA + jsr STDIO.SetMLIPathYA + >PULLW K.Stat.StoreY+1 + >MLICALL MLIGETFILEINFO bcs .9 diff --git a/TEST.S.txt b/TEST.S.txt index 921c1267..725f2107 100644 --- a/TEST.S.txt +++ b/TEST.S.txt @@ -91,7 +91,7 @@ CS.RUN.Pak >PUSHWI 0 Aux type >STA.G PAK.hFileBuf >LDYA.G PAK.FileSize - >SYSCALL GetMem.YA + >SYSCALL getmem bcs .9 >STYA ZPPakSrcPtr txa