A2osX/BIN/CC.S.DECL.txt
2022-06-12 22:42:22 +02:00

82 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
*--------------------------------------
CC.DECL jsr CC.IsLetter
bcs .80
.10 >LDYA L.CC.SCSPEC
jsr CC.LookupID
bcs .20
* TODO: typedef ....
bcs .90
.20 >LDYA L.CC.TYPEQUAL
jsr CC.LookupID
bcs .80
jsr CC.TYPE.Decl
bcs .99
ldx #SYM.SC.STATIC Y,A = Type/Qual
bit ScopenCnt
bpl .21
bit #SYM.Q.FUNC someone wants to add a local f() ?
bne .90
ldx #SYM.SC.AUTO
.21 jsr CC.SYM.New Y,A=T/Q, add with undef value...
bcs .99
jsr CC.SYM.Store
bcs .99
* TODO: AOPS
cmp #'='
bne .90
jsr CC.GetNextCharNB skip '='
bcs .99
jsr CC.SYM.GetTypeInYA expected T/Q
jsr CC.EXP.Eval
bcs .99
jsr CC.SYM.PopValue Y,A = T/Q, Set value to this var
.29 bcs .99
jsr CC.SYM.Free
clv
clc
rts
.80 bit #$60
clc
rts
.90 lda #E.CSYN
sec
.99 rts
*--------------------------------------
CC.SCSPEC.AUTO
CC.SCSPEC.REGISTER
CC.SCSPEC.STATIC
CC.SCSPEC.EXTERN
CC.SCSPEC.TYPEDEF
.99 lda #E.CSYN
sec
.9 rts
*--------------------------------------
MAN
SAVE usr/src/bin/cc.s.decl
LOAD usr/src/bin/cc.s
ASM