diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 26c4e84f..5b93b103 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/BIN/SH.S.CMD.txt b/BIN/SH.S.CMD.txt index 2d8f16a8..499cb3ff 100644 --- a/BIN/SH.S.CMD.txt +++ b/BIN/SH.S.CMD.txt @@ -112,11 +112,7 @@ CMD.CD.YA >SYSCALL realpath sec rts -.11 ldy #$ff - -.1 iny - lda (ZPPtr1),y - bne .1 +.11 jsr GetPtr1Len dey lda (ZPPtr1),y @@ -179,11 +175,7 @@ CMD.SET lda (ZPArgVBufPtr) .1 lda (ZPPTR1) beq .8 Ending 0 ? - ldy #$ff - -.2 iny - lda (ZPPTR1),y - bne .2 + jsr GetPtr1Len tya sec @@ -607,9 +599,9 @@ CMD.CALL >LDA.G hFuncList >STYA M32.TMP KeyID - >PUSHWZ From Start + >PUSHWZ From Start >PUSHWI $ffff all - >PUSHWZ Allocate.. + >PUSHWZ Allocate.. >PUSHW M32.TMP KeyID >LDA.G hFuncList >SYSCALL SListGetData @@ -1028,8 +1020,8 @@ FOR.EXEC jsr CORE.ArgV.NextChar skip "`" >STZ.G IO.hOut - >PUSHWZ auxtype - >PUSHBI 0 type + >PUSHWZ auxtype + >PUSHBI S.FI.T.TXT >PUSHBI O.RDONLY+O.TEXT >LEA.G IO.FIFO >SYSCALL fopen @@ -1153,27 +1145,19 @@ CMD.NEXT.LIST.1 lda (pData) ldy #0 -.10 lda (ZPPtr1) +.10 jsr GetPtr1Next beq .3 - inc ZPPtr1 - bne .11 - inc ZPPtr1+1 - -.11 cmp #C.SPACE + cmp #C.SPACE beq .10 sta (ZPCLBuf),y iny -.1 lda (ZPPtr1) +.1 jsr GetPtr1Next beq .3 - inc ZPPtr1 - bne .2 - inc ZPPtr1+1 - -.2 cmp #C.SPACE + cmp #C.SPACE beq .3 sta (ZPCLBuf),y diff --git a/BIN/SH.S.CORE.txt b/BIN/SH.S.CORE.txt index 7513001b..d072c1f3 100644 --- a/BIN/SH.S.CORE.txt +++ b/BIN/SH.S.CORE.txt @@ -363,11 +363,7 @@ CORE.ArgV.Dup >STYA ZPPtr1 .1 lda (ZPPtr1) beq .4 - ldy #0 - -.2 iny - lda (ZPPtr1),y - bne .2 + jsr GetPtr1Len jsr CORE.ArgV.DupNextY bra .1 @@ -408,14 +404,9 @@ CORE.ArgV.Dup >STYA ZPPtr1 .9 rts *-------------------------------------- CORE.ArgV.DupNextY + jsr AddYp1Ptr1 + tya - sec - adc ZPPtr1 - sta ZPPtr1 - bcc .1 - inc ZPPtr1+1 - -.1 tya sec adc ZPPtr2 sta ZPPtr2 diff --git a/BIN/SH.S.HIS.txt b/BIN/SH.S.HIS.txt index 3774f556..0e5e9903 100644 --- a/BIN/SH.S.HIS.txt +++ b/BIN/SH.S.HIS.txt @@ -35,11 +35,7 @@ HIS.Add >LDA.G HIS.hBuf pla bcc .2 enough room - ldy #$ff we must remove oldest - -.12 iny - lda (ZPPTR1),y get len of oldest string - bne .12 + jsr GetPtr1Len get len of oldest string tya * sec diff --git a/BIN/SH.S.IO.txt b/BIN/SH.S.IO.txt index 83cd5421..02fa4afa 100644 --- a/BIN/SH.S.IO.txt +++ b/BIN/SH.S.IO.txt @@ -23,8 +23,8 @@ IO.Pipe.In >LDA.G IO.hOut >STZ.G IO.hOut >PUSHWZ auxtype - >PUSHBI 0 type - >PUSHBI O.RDONLY + >PUSHBI S.FI.T.TXT + >PUSHBI O.RDONLY+O.TEXT >LEA.G IO.FIFO >SYSCALL fopen @@ -64,7 +64,7 @@ IO.Pipe.Out >PUSHWZ mode bcs IO.Reset.In.RTS >PUSHWZ auxtype - >PUSHBI 0 type + >PUSHBI S.FI.T.TXT >PUSHBI O.WRONLY >LEA.G IO.FIFO >SYSCALL fopen diff --git a/BIN/SH.S.txt b/BIN/SH.S.txt index 0d19c003..bd1f964b 100644 --- a/BIN/SH.S.txt +++ b/BIN/SH.S.txt @@ -7,7 +7,7 @@ NEW *-------------------------------------- HISTORY.MAX .EQ 256 CORE.STACK.MAX .EQ 128 -PUSHD.STACK.MAX .EQ 8 +PUSHD.STACK.MAX .EQ 4 *-------------------------------------- C... .EQ 0 C.. .EQ 1 @@ -527,25 +527,17 @@ RemoveStrFromArgV >STYA ZPPtr1 >STYA ZPPtr2 + jsr GetPtr1Len + +.2 jsr AddYp1Ptr1 + ldy #$ff -.1 iny Compute ArgX len - lda (ZPPtr1),y - bne .1 - -.2 tya - sec - adc ZPPtr1 - sta ZPPtr1 - bcc .3 - inc ZPPtr1+1 - -.3 ldy #$ff - .4 iny lda (ZPPtr1),y sta (ZPPtr2),y bne .4 + tya beq .8 @@ -558,6 +550,28 @@ RemoveStrFromArgV .8 rts *-------------------------------------- +GetPtr1Next lda (ZPPtr1) + beq .8 + inc ZPPtr1 + bne .8 + inc ZPPtr1+1 +.8 rts +*-------------------------------------- +GetPtr1Len ldy #$ff + +.1 iny + lda (ZPPtr1),y + bne .1 + rts +*-------------------------------------- +AddYp1Ptr1 tya + sec + adc ZPPtr1 + sta ZPPtr1 + bcc .8 + inc ZPPtr1+1 +.8 rts +*-------------------------------------- ToUpperCase cmp #'a' bcc .8 cmp #'z'+1