diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index e59798c7..7f589a8d 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/BIN/CSH.D.txt b/BIN/CSH.D.txt index ec0650b2..aa5683e3 100644 --- a/BIN/CSH.D.txt +++ b/BIN/CSH.D.txt @@ -5,6 +5,7 @@ NEW PathBuf .BS 65 hFileBuf .BS 1 +hIncludeBuf .BS 1 CSH.BufPtrSave .BS 2 CSH.CmdSave .BS 1 diff --git a/BIN/CSH.S.CORE.txt b/BIN/CSH.S.CORE.txt index 51a4ece1..bec7db40 100644 --- a/BIN/CSH.S.CORE.txt +++ b/BIN/CSH.S.CORE.txt @@ -52,11 +52,6 @@ CSH.Init >SYSCALL SListNew lda #0 >STA.G CSH.ConstPtr >STA.G CSH.StackPtr -* sta (ZPCSHConst) -* sta (ZPCSHStack) - -* >DEC.G bTrace -* >DEC.G bDebug * clc .9 rts *-------------------------------------- @@ -78,7 +73,12 @@ CSH.Quit >LDA.G CSH.hSymbols >PUSHA >SYSCALL SListFree -.3 lda ZPhMacro +.3 >LDA.G hIncludeBuf + beq .4 + + >SYSCALL FClose + +.4 lda ZPhMacro jsr .7 >LDA.G hFileBuf @@ -250,8 +250,6 @@ CSH.DIR.DEFINE jsr CSH.CheckSpace .2 iny - lda #0 - pha phy >PUSHB.G CSH.hDefines @@ -259,13 +257,13 @@ CSH.DIR.DEFINE jsr CSH.CheckSpace >PUSHW ZPFileBufPtr ply - pla + lda #0 >PUSHYA DataLen >SYSCALL SListAddData bcs .99 - bra CSH.SkipLine + jmp CSH.SkipLine .90 lda #CSH.E.SYNTAX sec @@ -315,8 +313,19 @@ CSH.DIR.INCLUDE >STZ.G PathBuf .8 jsr CSH.GetNextChar skip " or > - >LDYA pData - >SYSCALL PutS + >LDA.G hIncludeBuf + bne .90 + + >PUSHW pData + >PUSHBI O.RDONLY + >PUSHBI S.FI.T.TXT + >PUSHWZ Aux type + >SYSCALL LoadTxtFile + bcs .99 + + txa + >STA.G hIncludeBuf + rts *-------------------------------------- CSH.SkipLine jsr CSH.GetNextChar diff --git a/INCLUDE/stdio.h.txt b/INCLUDE/stdio.h.txt index 3a82cff7..689268d9 100644 --- a/INCLUDE/stdio.h.txt +++ b/INCLUDE/stdio.h.txt @@ -12,7 +12,7 @@ NEW fastcall int putchar(short int); // int fputc ( hFILE stream , short int character ); fastcall int puts(const char*); -// int fputs (hFILE stream, const char * str ); +int fputs (short int, const char*); // char *fgets(hFILE stream, char * s, int n); short int getchar(); fastcall short int getc(short int);