diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 5c1926ff..45588610 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 f930ba5e..d0592cd6 100644 --- a/BIN/SH.S.CMD.txt +++ b/BIN/SH.S.CMD.txt @@ -373,7 +373,7 @@ CMD.ECHO stz ZPPtr1 echo -N bit ZPPtr1 bmi .8 - + \ >PUSHBI 0 >LDYA L.MSG.ECHOCRLF >SYSCALL printf diff --git a/BIN/SH.S.CORE.txt b/BIN/SH.S.CORE.txt index 7ebec4b7..69d938f4 100644 --- a/BIN/SH.S.CORE.txt +++ b/BIN/SH.S.CORE.txt @@ -313,14 +313,18 @@ CORE.ArgV.Add >LDYA ZPArgVBufPtr .1 jsr CORE.GetNextChar bcs .5 -.2 jsr CORE.IsEndCmd - bcc .5 - cmp TmpByte +.2 cmp TmpByte bne .3 jsr CORE.GetNextChar bra .5 -.3 jsr CORE.ArgV.PutChar +.3 ldy TmpByte + cpy #C.SPACE + bne .40 + jsr CORE.IsEndCmd + bcc .5 + +.40 jsr CORE.ArgV.PutChar .4 jsr CORE.GetNextChar bcc .2 @@ -430,9 +434,9 @@ CORE.IsSpaceOrEndCmd cmp #C.SPACE beq CORE.IsEndCmd.8 -CORE.IsEndCmd cmp #C.CR +CORE.IsEndCmd cmp #';' beq CORE.IsEndCmd.8 - cmp #';' + cmp #C.CR beq CORE.IsEndCmd.8 cmp #'|' beq CORE.IsEndCmd.8 diff --git a/INC/A2osX.I.txt b/INC/A2osX.I.txt index a909f515..201148f4 100644 --- a/INC/A2osX.I.txt +++ b/INC/A2osX.I.txt @@ -104,6 +104,7 @@ E.ENVF .EQ $F7 Env is Full E.IBIN .EQ $F6 Invalid BIN format E.FTB .EQ $F5 File Too Big Error E.OOB .EQ $F4 Out Of Bound +E.INUM .EQ $F3 Invalid Numerical *-------------------------------------- * A2osX.SYSCALL Constants *-------------------------------------- diff --git a/SBIN/GETTY.S.txt b/SBIN/GETTY.S.txt index ac986a98..54101a9f 100644 --- a/SBIN/GETTY.S.txt +++ b/SBIN/GETTY.S.txt @@ -131,7 +131,9 @@ CS.RUN.LOOP0 >LDYA L.ENV.TERM jsr Init.Timeout -CS.RUN.LOOP1 ldy #S.PS.hStdIn +CS.RUN.LOOP1 >SLEEP + + ldy #S.PS.hStdIn lda (pPS),y >SYSCALL feof diff --git a/SYS/KERNEL.S.STDLIB.txt b/SYS/KERNEL.S.STDLIB.txt index 878cc70b..fb7c3ee0 100644 --- a/SYS/KERNEL.S.STDLIB.txt +++ b/SYS/KERNEL.S.STDLIB.txt @@ -177,6 +177,16 @@ STDLIB.GetHex lda (ZPPtr2) * Convert Decimal int at ZPPtr2 to STDLIB.32 *-------------------------------------- STDLIB.GetDec jsr STDLIB.32.Clear + + clc + lda (ZPPtr2) + eor #'-' + bne .10 + + jsr MEM.NextCharPtr2 skip '-' + sec + +.10 ror .80+1 set pos/neg flag ldy #$ff @@ -206,16 +216,33 @@ STDLIB.GetDec jsr STDLIB.32.Clear inc STDLIB.32+2 bne .1 inc STDLIB.32+3 - bne .1 overflow!!! -* sec + bne .1 if 0, overflow!!! + +.9 lda #E.INUM + sec rts -.8 tya - sec +.8 tya no digit parsed...error beq .9 - clc -.9 rts +.80 lda #$FF SELF MODIFIED + bpl .88 + + ldx #4 + ldy #0 + + sec + +.81 lda STDLIB.32,y + eor #$ff + adc #0 + sta STDLIB.32,y + iny + dex + bne .81 + +.88 clc + rts *-------------------------------------- STDLIB.32.T10 ldx #3 diff --git a/SYS/KERNEL.S.txt b/SYS/KERNEL.S.txt index bdd16f9a..5d5a704c 100644 --- a/SYS/KERNEL.S.txt +++ b/SYS/KERNEL.S.txt @@ -47,7 +47,6 @@ A2osX.D1 .PH $D000 .INB USR/SRC/SYS/KERNEL.S.STDLIB .INB USR/SRC/SYS/KERNEL.S.DEV .INB USR/SRC/SYS/KERNEL.S.FIO - .INB USR/SRC/SYS/KERNEL.S.PFT .EP A2osX.D2 .PH $D000 .DA #RRAMWRAMBNK2 @@ -65,6 +64,7 @@ A2osX.E0 .PH $E000 .INB USR/SRC/SYS/KERNEL.S.MEM .INB USR/SRC/SYS/KERNEL.S.TERMLC ********* TMP ***** go to A2osX.D1 + .INB USR/SRC/SYS/KERNEL.S.PFT .INB USR/SRC/SYS/KERNEL.S.IO ********* TMP ***** go to A2osX.D2 .LIST ON diff --git a/X.M32.S.txt b/X.M32.S.txt index 08868446..3c75367b 100644 --- a/X.M32.S.txt +++ b/X.M32.S.txt @@ -31,7 +31,7 @@ M32.Add ldy #M32.ARG+4 ARG+ACC->ACC iny dex bne .2 - + clc rts if CS, Overflow *--------------------------------------- M32.Sub ldy #M32.ARG+4 ARG-ACC->ACC @@ -54,6 +54,10 @@ M32.Sub ldy #M32.ARG+4 ARG-ACC->ACC dex bne .2 + + clc + rts + bcs .8 if CC, Overflow sec @@ -139,5 +143,5 @@ M32.Cmp ldx #4 *-------------------------------------- MAN SAVE USR/SRC/X.M32.S -LOAD USR/SRC/BIN/SHELL.S +LOAD USR/SRC/BIN/SH.S ASM