Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-11-22 12:25:27 +01:00
parent e1cdb6f089
commit c5a6a86afc
4 changed files with 80 additions and 58 deletions

Binary file not shown.

View File

@ -25,7 +25,7 @@ CMD.NOHUP lda #S.PS.F.NOHUP
CMD.SHIFT lda (ZPArgVBufPtr)
beq CMD.SHIFT.1
jsr CMD.GetInt8Arg
jsr EXP.GetInt8Exp
bcs CMD.SHIFTA.RTS
.HS B0 BCS
@ -395,8 +395,7 @@ CMD.READ lda (ZPArgVBufPtr)
jsr CORE.ArgV.Next
beq .9
>LDYA ZPArgVBufPtr
jsr CMD.GetInt8ArgYA
jsr EXP.GetInt8Arg
bcs CMD.ECHO.RTS
>STA.G READ.N
@ -432,12 +431,11 @@ CMD.READ.VAR jsr CL.Reset
CMD.SLEEP lda (ZPArgVBufPtr)
beq CMD.REN.CSYN
>LDYA ZPArgVBufPtr
>SYSCALL AToL
bcs CMD.REN.CSYN
jsr EXP.GetInt32Arg
bcs CMD.SLEEP.RTS
>PULLL.G Sleep
clc
CMD.SLEEP.RTS rts
*--------------------------------------
CMD.PAUSE lda #$FF
@ -627,17 +625,8 @@ CMD.FUNCTION lda (ZPArgVBufPtr)
>SYSCALL SListAddData
rts
*--------------------------------------
CMD.CALL.UNDEF lda #E.FUNDEF
sec
CMD.CALL.RTS rts
*--------------------------------------
CMD.CALL >LDA.G hFuncList
beq CMD.CALL.UNDEF
>PUSHW ZPArgVBufPtr
>LDA.G hFuncList
>SYSCALL SListLookup
bcs CMD.CALL.UNDEF
CMD.CALL jsr CMD.CALL.GETFUNC
bcs CMD.CALL.RTS
>STYA ZPTmpW KeyID
@ -655,10 +644,23 @@ CMD.CALL >LDA.G hFuncList
lda #$C0+C.CALL
jmp CORE.StkPush
*--------------------------------------
CMD.CALL.GETFUNC
>LDA.G hFuncList
beq CMD.CALL.UNDEF
>PUSHW ZPArgVBufPtr
>LDA.G hFuncList
>SYSCALL SListLookup
bcc CMD.CALL.RTS
CMD.CALL.UNDEF lda #E.FUNDEF
sec
CMD.CALL.RTS rts
*--------------------------------------
CMD.EXIT lda (ZPArgVBufPtr)
beq .1 no arg, exit 0
jsr CMD.GetInt8Arg
jsr EXP.GetInt8Exp
bcs .9
.1 sta M32.ACC
@ -1244,26 +1246,6 @@ CMD.IsSwitch lda (ZPArgVBufPtr)
CMD.IsSwitch.RTS
rts
*--------------------------------------
CMD.GetInt8Arg >LDYA ZPArgVBufPtr
jsr EXP.GET
bcs CMD.IsSwitch.RTS
CMD.GetInt8ArgYA
>SYSCALL AToL
bcs .99
>PULLA
inc pStack
inc pStack
inc pStack
* clc
rts
.99 lda #E.ESYN
* sec
rts
*--------------------------------------
MAN
SAVE USR/SRC/BIN/SH.S.CMD
LOAD USR/SRC/BIN/SH.S

View File

@ -9,7 +9,7 @@ EXP.GET jsr CORE.ArgV.Next
rts
.1 >LDYA ZPArgVBufPrev
>SYSCALL AToL To Int32 on stack
jsr EXP.GetInt32YA To Int32 on stack
bcs .9
.2 >LDYA L.EXP.OP.MATH + - .... ?
@ -19,8 +19,8 @@ EXP.GET jsr CORE.ArgV.Next
stx CORE.Operator
jsr CORE.ArgV.Next get next argument
beq .94
>LDYA ZPArgVBufPtr
>SYSCALL AToL To Int32 on stack
jsr EXP.GetInt32Arg To Int32 on stack
bcs .94
jsr EXP.FPU.EXEC
@ -151,6 +151,7 @@ EXP.OP.UNARY.D jsr EXP.OP.UNARY.STAT
EXP.OP.UNARY.E jsr EXP.OP.UNARY.STAT
bcs EXP.OP.UNARY.DEF.9
bra EXP.OP.UNARY.DEF.8 DIR or FILE exist
EXP.OP.UNARY.F jsr EXP.OP.UNARY.STAT
bcs EXP.OP.UNARY.DEF.9
@ -176,12 +177,10 @@ EXP.OP.UNARY.DEF.8
EXP.OP.UNARY.DEF.9
lda #0 false
clc
EXP.OP.UNARY.DEF.RTS
rts
*--------------------------------------
EXP.OP.UNARY.I >PUSHBI 10
>PUSHWI ZPPtr1
>LDYA ZPArgVBufPtr
>SYSCALL strtol
EXP.OP.UNARY.I jsr EXP.GetInt32Arg
php
jsr CORE.ArgV.Next
plp
@ -192,16 +191,13 @@ EXP.OP.UNARY.I >PUSHBI 10
inc pStack
inc pStack
lda (ZPPtr1)
beq EXP.OP.UNARY.DEF.8
bne EXP.OP.UNARY.DEF.9
bra EXP.OP.UNARY.DEF.8
*--------------------------------------
EXP.OP.UNARY.N lda (ZPArgVBufPtr) [ -N ] ?
cmp #']'
beq EXP.OP.UNARY.DEF.9 FALSE
jsr CORE.ArgV.Next
beq EXP.OP.UNARY.ESYN
bra EXP.OP.UNARY.DEF.8 arg is not empty TRUE
EXP.OP.UNARY.N jsr EXP.OP.UNARY.Z
bcs EXP.OP.UNARY.DEF.RTS
eor #$80
* clc
rts
EXP.OP.UNARY.Z lda (ZPArgVBufPtr) [ -Z ] ?
@ -211,6 +207,13 @@ EXP.OP.UNARY.Z lda (ZPArgVBufPtr) [ -Z ] ?
beq EXP.TEST.BINARY.ESYN
bra EXP.OP.UNARY.DEF.9 FALSE
*--------------------------------------
EXP.OP.UNARY.X jsr CMD.CALL.GETFUNC
php
jsr CORE.ArgV.Next
plp
bcs EXP.OP.UNARY.DEF.9 FALSE
bra EXP.OP.UNARY.DEF.8 TRUE
*--------------------------------------
EXP.TEST.BINARY lda CORE.Operator
cmp #6 =, !=, <= <, >=, >
bcs EXP.TEST.BINARY.NUM
@ -245,13 +248,13 @@ EXP.TEST.BINARY.ESYN
*--------------------------------------
EXP.TEST.BINARY.NUM
>LDYA ZPArgVBufPrev
>SYSCALL AToL
jsr EXP.GetInt32YA
bcs EXP.TEST.BINARY.ESYN
jsr CORE.ArgV.Next
beq EXP.TEST.BINARY.ESYN4
>LDYA ZPArgVBufPtr
>SYSCALL AToL
jsr EXP.GetInt32Arg
bcs EXP.TEST.BINARY.ESYN4
>FPU CMP32
@ -275,6 +278,41 @@ EXP.TEST.BINARY.END
.8 rts
*--------------------------------------
EXP.GetInt8Exp jsr EXP.GET
bcc EXP.GetInt8YA
rts
EXP.GetInt8Arg >LDYA ZPArgVBufPtr
EXP.GetInt8YA jsr EXP.GetInt32YA
bcs .9
>PULLA
inc pStack
inc pStack
inc pStack
* clc
.9 rts
*--------------------------------------
EXP.GetInt32Arg >LDYA ZPArgVBufPtr
EXP.GetInt32YA pha
>PUSHBI 10
>PUSHWI ZPPtr1
pla
>SYSCALL strtol
bcs EXP.GetInt32YA.9
lda (ZPPtr1)
beq EXP.GetInt32YA.RTS
sec
EXP.GetInt32YA.9
lda #E.ESYN
EXP.GetInt32YA.RTS
rts
*--------------------------------------
MAN
SAVE USR/SRC/BIN/SH.S.EXP
LOAD USR/SRC/BIN/SH.S

View File

@ -179,6 +179,7 @@ J.EXP.OP.UNARY .DA EXP.OP.UNARY.D
.DA EXP.OP.UNARY.F
.DA EXP.OP.UNARY.I
.DA EXP.OP.UNARY.N
.DA EXP.OP.UNARY.X
.DA EXP.OP.UNARY.Z
L.EXP.OP.BINARY .DA EXP.OP.BINARY
L.EXP.OP.MATH .DA EXP.OP.MATH
@ -593,6 +594,7 @@ EXP.OP.UNARY .AT "-D"
.AT "-F"
.AT "-I"
.AT "-N"
.AT "-X"
.AT "-Z"
.HS 00
EXP.OP.BINARY .AT "="