mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-17 22:29:44 +00:00
CC:wip
This commit is contained in:
parent
9a7d20a7e1
commit
6a46b55ff8
Binary file not shown.
|
@ -91,9 +91,10 @@ F.Decl ldy #SYM.Q
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.7 cmp #'{'
|
.7 cmp #'{'
|
||||||
bne .9
|
bne .9
|
||||||
|
>DEBUG
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
F.Def bit bInitCode
|
F.Def bit bInitCode
|
||||||
bmi .8
|
bmi .1
|
||||||
|
|
||||||
dec bInitCode
|
dec bInitCode
|
||||||
|
|
||||||
|
@ -101,13 +102,18 @@ F.Def bit bInitCode
|
||||||
jsr CODE.EmitByte Close INIT code
|
jsr CODE.EmitByte Close INIT code
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
|
.1 >LDYA ZPCCCode f() Code starts HERE
|
||||||
.8 >LDYA ZPCCCode f() Code starts HERE
|
|
||||||
jsr SYM.SetAddrYA
|
jsr SYM.SetAddrYA
|
||||||
|
|
||||||
jsr SYM.Update
|
jsr SYM.Update
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
|
lda #$ff
|
||||||
|
>STA.G CC.CmdSave
|
||||||
|
|
||||||
|
jsr STMT.NewCPS00
|
||||||
|
bcs .99
|
||||||
|
|
||||||
lda LocalPtr
|
lda LocalPtr
|
||||||
jsr CODE.LDAI A = f() ARGS size
|
jsr CODE.LDAI A = f() ARGS size
|
||||||
bcs .99
|
bcs .99
|
||||||
|
@ -212,7 +218,7 @@ F.Def.END >LDYA L.PCC.LEAVE
|
||||||
jsr SCOPE.Close
|
jsr SCOPE.Close
|
||||||
|
|
||||||
stz LocalPtr back to global
|
stz LocalPtr back to global
|
||||||
>DEBUG
|
* >DEBUG
|
||||||
clv pop context
|
clv pop context
|
||||||
clc
|
clc
|
||||||
.9 rts
|
.9 rts
|
||||||
|
|
|
@ -94,7 +94,7 @@ KW.ELSE.END lda #'X' define EXIT Label
|
||||||
clv pop context
|
clv pop context
|
||||||
.99 rts
|
.99 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
KW.WHILE jsr STMT.NewCPS00
|
KW.WHILE jsr SCOPE.New
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
lda #'C' define CONT Label
|
lda #'C' define CONT Label
|
||||||
|
@ -128,8 +128,11 @@ KW.WHILE jsr STMT.NewCPS00
|
||||||
|
|
||||||
cmp #')'
|
cmp #')'
|
||||||
bne .9
|
bne .9
|
||||||
|
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
jmp STMT.SetCPSType
|
* jmp STMT.SetCPSType
|
||||||
|
|
||||||
.9 lda #E.CSYN
|
.9 lda #E.CSYN
|
||||||
sec
|
sec
|
||||||
|
@ -151,7 +154,9 @@ KW.WHILE.END >LDYA L.PCC.SLEEP
|
||||||
jsr SYM.NewLabelA
|
jsr SYM.NewLabelA
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
clv pop context
|
* clv pop context
|
||||||
|
|
||||||
|
bit .99
|
||||||
|
|
||||||
.99 rts
|
.99 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
|
@ -123,38 +123,22 @@ STMT.SetVar stz ExpState
|
||||||
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
STMT.Stmt.END ldy CStackPtr
|
STMT.Stmt.END ldy CStackPtr
|
||||||
beq .8
|
beq STMT.POP.8
|
||||||
|
|
||||||
iny CPS.TERM
|
iny CPS.TERM
|
||||||
lda (ZPCCStack),y
|
lda (ZPCCStack),y
|
||||||
cmp #'}'
|
cmp #'}'
|
||||||
beq .8
|
beq STMT.POP.8
|
||||||
|
|
||||||
cmp #';' must be ';' on stack....
|
cmp #';' must be ';' on stack....
|
||||||
bra STMT.POP
|
beq STMT.POP
|
||||||
|
|
||||||
.8 clc
|
|
||||||
|
|
||||||
|
STMT.POP.9 lda #E.STACKERROR
|
||||||
|
sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
|
||||||
* X = KW.ID
|
|
||||||
*--------------------------------------
|
|
||||||
STMT.CPStmt.NEW lda LocalPtr Locals
|
|
||||||
jsr CC.Push
|
|
||||||
bcs .99
|
|
||||||
|
|
||||||
lda #0 bState
|
STMT.POP.8 clc
|
||||||
jsr CC.Push
|
rts
|
||||||
bcs .99
|
|
||||||
|
|
||||||
lda #'}'
|
|
||||||
jsr CC.Push
|
|
||||||
bcs .99
|
|
||||||
|
|
||||||
txa
|
|
||||||
jmp CC.Push
|
|
||||||
|
|
||||||
.99 rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
STMT.CPStmt.END ldy CStackPtr
|
STMT.CPStmt.END ldy CStackPtr
|
||||||
beq STMT.POP.9
|
beq STMT.POP.9
|
||||||
|
@ -163,15 +147,14 @@ STMT.CPStmt.END ldy CStackPtr
|
||||||
lda (ZPCCStack),y
|
lda (ZPCCStack),y
|
||||||
|
|
||||||
cmp #'}' must be '}' on stack....
|
cmp #'}' must be '}' on stack....
|
||||||
|
bne STMT.POP.9
|
||||||
|
|
||||||
STMT.POP bne .9
|
STMT.POP dey CPS.KW
|
||||||
|
|
||||||
dey CPS.KW
|
|
||||||
lda (ZPCCStack),y
|
lda (ZPCCStack),y
|
||||||
jsr STMT.CLOSE
|
jsr STMT.End
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
bvs .1 DONT POP reused context (ELSE....)
|
bvs .8 DONT POP reused context (ELSE....)
|
||||||
|
|
||||||
ldy #CPS.LOCAL
|
ldy #CPS.LOCAL
|
||||||
lda (ZPCCStack),y
|
lda (ZPCCStack),y
|
||||||
|
@ -182,24 +165,15 @@ STMT.POP bne .9
|
||||||
adc #CPS
|
adc #CPS
|
||||||
sta CStackPtr
|
sta CStackPtr
|
||||||
|
|
||||||
.1 clc
|
.8 clc
|
||||||
.99 rts
|
.99 rts
|
||||||
|
|
||||||
.9
|
|
||||||
STMT.POP.9 lda #E.STACKERROR
|
|
||||||
sec
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
STMT.CLOSE tax
|
STMT.End tax
|
||||||
bmi .8
|
bmi .8
|
||||||
|
|
||||||
jmp (J.CC.KW.END,x)
|
jmp (J.CC.KW.END,x)
|
||||||
|
|
||||||
.8 jmp F.Def.END
|
.8 jmp F.Def.END
|
||||||
|
|
||||||
.98 lda #E.CSYN
|
|
||||||
sec
|
|
||||||
.99 rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
STMT.NewCPS00 lda #0
|
STMT.NewCPS00 lda #0
|
||||||
jsr CC.Push no T/Q
|
jsr CC.Push no T/Q
|
||||||
|
@ -237,6 +211,9 @@ STMT.SetCPSType jsr CORE.GetNCharNBNL
|
||||||
jsr CORE.GetNCharNB skip '{'
|
jsr CORE.GetNCharNB skip '{'
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
|
jsr SCOPE.New
|
||||||
|
bcs .99
|
||||||
|
|
||||||
ldx #'}'
|
ldx #'}'
|
||||||
|
|
||||||
.1 txa
|
.1 txa
|
||||||
|
|
|
@ -10,7 +10,7 @@ NEW
|
||||||
.INB inc/mli.i
|
.INB inc/mli.i
|
||||||
.INB inc/mli.e.i
|
.INB inc/mli.e.i
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DBG_SYM .EQ 0
|
DBG_SYM .EQ 1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
FILES.MAX .EQ 4
|
FILES.MAX .EQ 4
|
||||||
LIBS.MAX .EQ 4
|
LIBS.MAX .EQ 4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user