CC:fix for #ifndef..., \ in string literals

This commit is contained in:
burniouf 2023-01-27 14:32:13 +01:00
parent 90dfba3e88
commit c0b3872e26
5 changed files with 27 additions and 14 deletions

Binary file not shown.

View File

@ -128,9 +128,13 @@ CORE.CompileLine
jmp DIR
.1 >LDA.G CC.DirState FALSE state
.1 tax
>LDA.G CC.DirState FALSE state
bmi .8
txa
cmp #'/'
bne .2 comments ...
@ -247,8 +251,6 @@ CORE.SkipLine jsr CC.GetNextChar
cmp #C.CR
bne CORE.SkipLine
jsr CC.GetNextChar
clc
.9 rts

View File

@ -120,9 +120,9 @@ DIR.INCLUDE lda #0 >STZ.G PathBuf
>LDYA pData
jmp FIO.FOpen
*--------------------------------------
DIR.IFDEF sec
.HS 90 BCC
DIR.IFNDEF clc
DIR.IFDEF clc
.HS B0 BCS
DIR.IFNDEF sec
ror ZPPtr1
@ -136,17 +136,24 @@ DIR.IFNDEF clc
>PUSHW ZPLineBufPtr
>PUSHWI 0 ScopeID
>SYSCALL SListLookup
ror
eor ZPPtr1
asl
>LDA.G CC.DirState
rol
ora #1
ror
sta (pData),y
>DEC.G CC.DirDepth
clc
cmp #$F8
bcs .8
lda #E.OOB
sec
rts
.8 clc
rts
*--------------------------------------
DIR.ELSE >LDA.G CC.DirDepth
@ -161,7 +168,7 @@ DIR.ELSE >LDA.G CC.DirDepth
DIR.ENDIF >LDA.G CC.DirDepth
beq DIR.ESYN
dec
inc
sta (pData),y
>LDA.G CC.DirState

View File

@ -409,7 +409,7 @@ EXP.GetChar ldy ZPPtr2+1
EXP.AddConstCharP
lda ZPCCConst
ldx ZPCCConst+1
>DEBUG
jsr CODE.LDAXI
bcs .99
@ -424,7 +424,6 @@ EXP.AddConstCharP
bcs .9
bvs .2 ESCaped
* TODO : add support for \ to next line
cmp #C.CR
beq .9
@ -440,6 +439,9 @@ EXP.AddConstCharP
.3 jsr CORE.GetNCharNBNL Skip "
bcs .8
cmp #'\'
beq .3
cmp #'"'
beq .1

View File

@ -5,7 +5,9 @@ NEW
int main(int argc, char *argv[]) {
float f1 = 99;
printf("one " \
"two\n");
float f1 = 99;
float SQR=sqr(f1);
printf("f1=%e, sqr(f1)=%e\r\n", f1, SQR);
getchar();