Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-11-10 18:43:20 +01:00
parent 51c45b2074
commit 9c8764a6ae
5 changed files with 83 additions and 15 deletions

Binary file not shown.

Binary file not shown.

View File

@ -273,6 +273,9 @@ CL.GetLine lda (ZPFileBufPtr)
cmp #C.CR
beq .6
* cmp #';'
* beq .6
sta (ZPCMDBuf),y
iny
cpy #CmdLine.MAX
@ -282,7 +285,7 @@ CL.GetLine lda (ZPFileBufPtr)
* sec
rts
.6 sec skip CR
.6 sec skip CR or ;
.HS 90 BCC
.7 clc

View File

@ -295,12 +295,6 @@ Cmd.INT.ECHO ldx #1
.8 clc
.9 rts
*--------------------------------------
Cmd.INT.ELSE clc
rts
*--------------------------------------
Cmd.INT.FI clc
rts
*--------------------------------------
Cmd.INT.READ ldx #1
jsr Cmd.GetArgX
beq .9
@ -456,7 +450,13 @@ Cmd.INT.RD ldx #1
.9 jmp Cmd.Exec.ERRSYN
*--------------------------------------
Cmd.INT.IF ldx #1
Cmd.INT.IF >LDA.G CMD.IF.PTR
cmp #CMD.IF.PTR+CMD.IF.STACK.MAX
beq .90
inc
sta (pData),y
ldx #1
jsr Cmd.GetArgX
beq .9
@ -470,8 +470,11 @@ Cmd.INT.IF ldx #1
bcs .9
dex
dex 1 or $ff
>LDA.G CMD.IF.PTR
tay
txa
>STA.G CMD.IF.NOT
sta (pData),y true or false
ldx #2
jsr Cmd.GetArgX
@ -480,22 +483,78 @@ Cmd.INT.IF ldx #1
>PUSHYA
>LDYA L.CMD.IF.TOKEN2 -d -e -f ?
jsr Lookup
bcs .1
jsr CMD.IF.UNARY
bcs .99
jmp (J.CMD.IF.TOKEN2,x)
>LDA.G CMD.IF.PTR
tay
txa
eor #$ff
eor (pData),y
sta (pData),y
ldx #4
jsr Cmd.GetArgX
beq .9
>STYA ZPPTR1
lda (ZPPTR1)
cmp #']'
bne .9
ldy #1
lda (ZPPTR1),y
bne .9
.1
clc
.99 rts
.9 >LDA.G CMD.IF.PTR
.90 jmp Cmd.Exec.ERRSYN
*--------------------------------------
CMD.IF.UNARY jmp (J.CMD.IF.TOKEN2,x)
CMD.IF.D
CMD.IF.E
CMD.IF.F
ldx #1 true
clc
rts
*--------------------------------------
Cmd.INT.ELSE >LDA.G CMD.IF.PTR
cmp #CMD.IF.PTR
beq .9
tay
lda (pData),y
eor #$ff
sta (pData),y
clc
rts
.9 jmp Cmd.Exec.ERRSYN
.9 lda #E.SYN
sec
rts
*--------------------------------------
CMD.IF.D
CMD.IF.E
CMD.IF.F
Cmd.INT.FI >LDA.G CMD.IF.PTR
cmp #CMD.IF.PTR
beq .9
dec
>STA.G CMD.IF.PTR
clc
rts
.9 lda #E.SYN
sec
rts
*--------------------------------------
Cmd.GetArgX >LDYA ZPArgVBuf

View File

@ -42,7 +42,10 @@ CS.START cld
.DA CS.END-CS.START CS
.DA DS.END-DS.START DS
.DA #64 SS
.DO CSH=1
.DA #20 ZP
.ELSE
.DA #12 ZP
.DA 0
*--------------------------------------
* Relocation Table
@ -127,6 +130,10 @@ CS.RUN jsr SetPWD
>STA.G hFileBuf
>SYSCALL GetMemPtr
>STYA ZPFileBufPtr
lda #CMD.IF.PTR
tay
sta (pData),y
.DO CSH=1
jsr CSH.Init
@ -494,7 +501,6 @@ CMD.VarName .BS VarLen.MAX+1
CMD.Stat .BS S.STAT
CMD.Time .BS S.TIME
CMD.IF.NOT .BS 1
CMD.IF.PTR .BS 1
CMD.IF.STACK .BS CMD.IF.STACK.MAX