A2osX/BIN/CC.S.DECL.txt
2022-08-20 16:37:37 +02:00

83 lines
1.4 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
*--------------------------------------
* X = type qual
*--------------------------------------
CC.DECL jsr CC.TYPE.Decl
bcs .9
ldx #SYM.SC.STATIC Y,A = Type/Qual
bit bLocalScope
bpl .25
bit #SYM.Q.FUNC someone wants to add a local f() ?
sec
bne .29
ldx #SYM.SC.AUTO
.25 jsr CC.SYM.New Y,A=T/Q, add with undef value...
bcs .29 OOM or DUP
.22 jsr CC.GetCharNB
bcs .99
cmp #';'
beq .28
cmp #'{'
bne .26
jsr CC.GetNextCharNB skip '{'
bcs .99
jmp CC.SYM.StoreF
*--------------------------------------
* Initializer
*--------------------------------------
.26 cmp #'=' type var = value ?
bne .99
jsr CC.GetNextCharNB skip '='
bcs .99
jsr CC.SYM.GetTypeInYA expected T/Q
jsr CC.EXP.Eval
bcs .9
jsr CC.SYM.GetAddr1
bcs .9
jsr CC.SYM.SetValue Y,A = T/Q, Set value to this var
.29 bcs .9
.28 jsr CC.SYM.Store
bcs .9
jsr CC.GetCharNB
cmp #';'
bne .99
clc
rts
*--------------------------------------
.99 lda #E.CSYN
sec
.9 rts
*--------------------------------------
CC.SCSPEC.AUTO
CC.SCSPEC.REGISTER
CC.SCSPEC.STATIC
CC.SCSPEC.EXTERN
CC.SCSPEC.TYPEDEF
.98 lda #E.CSYN
sec
.99 rts
*--------------------------------------
MAN
SAVE usr/src/bin/cc.s.decl
LOAD usr/src/bin/cc.s
ASM