Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-09-06 14:50:27 +02:00
parent 5cd7a80c78
commit 237ba85627
3 changed files with 44 additions and 25 deletions

Binary file not shown.

View File

@ -104,7 +104,7 @@ CSH.Run.1 cmp #'#'
jsr CSH.GetCharNB
bcs .9
cmp #'='
cmp #'=' TODO: all AOPS
bne .99
jsr CSH.GetNextChar Skip =
@ -113,7 +113,7 @@ CSH.Run.1 cmp #'#'
lda #0 Any Type
jsr CSH.ExpEval
bcs .9
>LDYA ZPVarID X = Exp Type
jsr CSH.SetVarValueFromStack
bcs .9
@ -166,7 +166,7 @@ CSH.IF jsr CSH.GetCharNB
cmp #')'
bne .9
jsr CSH.GetNextCharNB
jsr CSH.GetNextCharNB skip ')'
bcs .99
cmp #'{'
bne .9
@ -391,7 +391,7 @@ CSH.fCall ldx ZPPtr1
bcs .10
cmp #'('
bne .90
bne .52
jsr CSH.GetNextCharNB skip '('
.10 bcs .90
@ -447,7 +447,7 @@ CSH.fCall ldx ZPPtr1
lda (ZPPtr1)
bne .3 Another ARG....
bra .90 extra args....error
.52 bra .90 extra args....error
.6 cmp #')'
bne .90
@ -471,7 +471,7 @@ CSH.fCall ldx ZPPtr1
.8 jsr CSH.GetNextCharNB Skip )
plx restore X = function index
ldy ZPPtr2 get type in Y
pla
sta ZPPtr2+1
pla
@ -480,9 +480,12 @@ CSH.fCall ldx ZPPtr1
sta ZPPtr1+1
pla
sta ZPPtr1
jmp (J.CSH.EXEC,x)
phy
jsr .80
plx
rts
.90 lda #CSH.E.SYNTAX
.HS 2C BIT ABS
@ -501,6 +504,9 @@ CSH.fCall ldx ZPPtr1
stx ZPPtr1
.99 rts
.80 jmp (J.CSH.EXEC,x)
*--------------------------------------
* Input:
* ZPFileBufPtr, A = Expected type
@ -533,7 +539,7 @@ CSH.ExpEval ldx ZPPtr1
ldx ZPPtr2 var type (could be 0=any)
jsr CSH.GetVarValueOnStack Y,A = VarID, Get value on stack
bcs .99
bcs .29
stx ZPPtr2 store real var type
bra .11
@ -541,15 +547,20 @@ CSH.ExpEval ldx ZPPtr1
.1 lda ZPPtr2 var type
jsr CSH.fCall X = function index
bcs .99
* stx ZPPtr2 store real var type
stx ZPPtr2 store real var type
bra .11
.2 jsr CSH.IsDigit10 number ?
bcs .3
ldx ZPPtr2
jsr CSH.GetNumOnStack
bcs .99
bne .22
ldx #CSH.T.INT
stx ZPPtr2
.22 jsr CSH.GetNumOnStack
.29 bcs .99
.11 jsr CSH.GetCharNB
bcs .90
@ -760,9 +771,13 @@ CSH.ZPPtr1AddAp1
.1 rts
*--------------------------------------
CSH.GetNumOnStack
cpx #CSH.T.FLOAT
bcc .1
txa
beq .99
.10 cpx #CSH.T.FLOAT
bcc .1
bne .99
>PUSHWI ZPFileBufPtr
>LDYA ZPFileBufPtr
>SYSCALL StrToF
@ -806,7 +821,11 @@ CSH.GetNumOnStack
inc pStack
sta (pStack)
.8 clc
.9 rts
.9 rts
.99 lda #CSH.E.TMISMATCH
sec
rts
*--------------------------------------
* Input : ZPFileBufPtr
* Output : Y,A = ZPVarID
@ -1192,6 +1211,8 @@ CSH.SkipBlock ldy #0 not in "", TOTO:skip comments
dex
bne .1
clc
rts
.3 cmp #'"'
bne .1

View File

@ -438,15 +438,13 @@ Ctrl.W jsr BUF.ComputeCOffset Y=line len
lda BUF.LOffset+1
iny
sta (pData),y
ply
ply Get back line len
clc
lda (BufPtr),y
bne .1
beq .1 last line \0 ending
tya
beq .8 previoyus line\CR\0
iny
sec delete CR
.1 tya
@ -533,10 +531,10 @@ Ctrl.Z jsr BUF.ComputeCOffset
*--------------------------------------
Prompt.Help >STZ.G PromptMode
Prompt.Help.Upd jsr SCRN.UpdateMain
Prompt.Help.Upd jsr SCRN.UpdateStatusBar
bcs .9
jmp SCRN.UpdateStatusBar
jmp SCRN.UpdateMain
.9
Prompt.Help.RTS rts
*--------------------------------------