A2osX/BIN/CC.S.DECL.txt

83 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-01-30 21:47:08 +00:00
NEW
AUTO 3,1
.LIST OFF
*--------------------------------------
2022-02-04 14:57:17 +00:00
CC.DECL jsr CC.IsLetter
bcs .80
2022-02-04 14:57:17 +00:00
.10 >LDYA L.CC.SCSPEC
jsr CC.LookupID
bcs .20
* TODO: typedef ....
bcs .90
2022-02-04 14:57:17 +00:00
.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
2022-02-04 14:57:17 +00:00
* TODO: AOPS
2022-02-04 14:57:17 +00:00
cmp #'='
bne .90
jsr CC.GetNextCharNB skip '='
bcs .99
jsr CC.SYM.GetTypeInYA expected T/Q
jsr CC.EXP.Eval
bcs .99
2022-02-04 14:57:17 +00:00
jsr CC.SYM.PopValue Y,A = T/Q, Set value to this var
.29 bcs .99
jsr CC.SYM.FreeBuf
clv
clc
rts
2022-02-04 14:57:17 +00:00
.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
2022-01-30 21:47:08 +00:00
*--------------------------------------
MAN
SAVE usr/src/bin/cc.s.decl
LOAD usr/src/bin/cc.s
ASM