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 bit ZPPtr1
bmi .8 bmi .8
\
>PUSHBI 0 >PUSHBI 0
>LDYA L.MSG.ECHOCRLF >LDYA L.MSG.ECHOCRLF
>SYSCALL printf >SYSCALL printf

View File

@ -313,14 +313,18 @@ CORE.ArgV.Add >LDYA ZPArgVBufPtr
.1 jsr CORE.GetNextChar .1 jsr CORE.GetNextChar
bcs .5 bcs .5
.2 jsr CORE.IsEndCmd .2 cmp TmpByte
bcc .5
cmp TmpByte
bne .3 bne .3
jsr CORE.GetNextChar jsr CORE.GetNextChar
bra .5 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 .4 jsr CORE.GetNextChar
bcc .2 bcc .2
@ -430,9 +434,9 @@ CORE.IsSpaceOrEndCmd
cmp #C.SPACE cmp #C.SPACE
beq CORE.IsEndCmd.8 beq CORE.IsEndCmd.8
CORE.IsEndCmd cmp #C.CR CORE.IsEndCmd cmp #';'
beq CORE.IsEndCmd.8 beq CORE.IsEndCmd.8
cmp #';' cmp #C.CR
beq CORE.IsEndCmd.8 beq CORE.IsEndCmd.8
cmp #'|' cmp #'|'
beq CORE.IsEndCmd.8 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.IBIN .EQ $F6 Invalid BIN format
E.FTB .EQ $F5 File Too Big Error E.FTB .EQ $F5 File Too Big Error
E.OOB .EQ $F4 Out Of Bound E.OOB .EQ $F4 Out Of Bound
E.INUM .EQ $F3 Invalid Numerical
*-------------------------------------- *--------------------------------------
* A2osX.SYSCALL Constants * A2osX.SYSCALL Constants
*-------------------------------------- *--------------------------------------

View File

@ -131,7 +131,9 @@ CS.RUN.LOOP0 >LDYA L.ENV.TERM
jsr Init.Timeout jsr Init.Timeout
CS.RUN.LOOP1 ldy #S.PS.hStdIn CS.RUN.LOOP1 >SLEEP
ldy #S.PS.hStdIn
lda (pPS),y lda (pPS),y
>SYSCALL feof >SYSCALL feof

View File

@ -177,6 +177,16 @@ STDLIB.GetHex lda (ZPPtr2)
* Convert Decimal int at ZPPtr2 to STDLIB.32 * Convert Decimal int at ZPPtr2 to STDLIB.32
*-------------------------------------- *--------------------------------------
STDLIB.GetDec jsr STDLIB.32.Clear 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 ldy #$ff
@ -206,16 +216,33 @@ STDLIB.GetDec jsr STDLIB.32.Clear
inc STDLIB.32+2 inc STDLIB.32+2
bne .1 bne .1
inc STDLIB.32+3 inc STDLIB.32+3
bne .1 overflow!!! bne .1 if 0, overflow!!!
* sec
.9 lda #E.INUM
sec
rts rts
.8 tya .8 tya no digit parsed...error
sec
beq .9 beq .9
clc .80 lda #$FF SELF MODIFIED
.9 rts 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 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.STDLIB
.INB USR/SRC/SYS/KERNEL.S.DEV .INB USR/SRC/SYS/KERNEL.S.DEV
.INB USR/SRC/SYS/KERNEL.S.FIO .INB USR/SRC/SYS/KERNEL.S.FIO
.INB USR/SRC/SYS/KERNEL.S.PFT
.EP .EP
A2osX.D2 .PH $D000 A2osX.D2 .PH $D000
.DA #RRAMWRAMBNK2 .DA #RRAMWRAMBNK2
@ -65,6 +64,7 @@ A2osX.E0 .PH $E000
.INB USR/SRC/SYS/KERNEL.S.MEM .INB USR/SRC/SYS/KERNEL.S.MEM
.INB USR/SRC/SYS/KERNEL.S.TERMLC .INB USR/SRC/SYS/KERNEL.S.TERMLC
********* TMP ***** go to A2osX.D1 ********* TMP ***** go to A2osX.D1
.INB USR/SRC/SYS/KERNEL.S.PFT
.INB USR/SRC/SYS/KERNEL.S.IO .INB USR/SRC/SYS/KERNEL.S.IO
********* TMP ***** go to A2osX.D2 ********* TMP ***** go to A2osX.D2
.LIST ON .LIST ON

View File

@ -31,7 +31,7 @@ M32.Add ldy #M32.ARG+4 ARG+ACC->ACC
iny iny
dex dex
bne .2 bne .2
clc
rts if CS, Overflow rts if CS, Overflow
*--------------------------------------- *---------------------------------------
M32.Sub ldy #M32.ARG+4 ARG-ACC->ACC M32.Sub ldy #M32.ARG+4 ARG-ACC->ACC
@ -54,6 +54,10 @@ M32.Sub ldy #M32.ARG+4 ARG-ACC->ACC
dex dex
bne .2 bne .2
clc
rts
bcs .8 if CC, Overflow bcs .8 if CC, Overflow
sec sec
@ -139,5 +143,5 @@ M32.Cmp ldx #4
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/X.M32.S SAVE USR/SRC/X.M32.S
LOAD USR/SRC/BIN/SHELL.S LOAD USR/SRC/BIN/SH.S
ASM ASM