Kernel 0.92+

This commit is contained in:
Rémy GIBERT 2019-02-21 11:34:28 +00:00
parent 44d0f9ff9b
commit 0e18e6bd9f
8 changed files with 55 additions and 17 deletions

Binary file not shown.

View File

@ -373,7 +373,7 @@ CMD.ECHO stz ZPPtr1 echo -N
bit ZPPtr1
bmi .8
\
>PUSHBI 0
>LDYA L.MSG.ECHOCRLF
>SYSCALL printf

View File

@ -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

View File

@ -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
*--------------------------------------

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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