mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-16 08:04:35 +00:00
123 lines
1.8 KiB
Plaintext
123 lines
1.8 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
SCOPE.New >INCW.G CC.ScopeID
|
||
|
||
lda ScopePtr
|
||
clc
|
||
adc #SCOPE
|
||
bcs .9
|
||
|
||
sta ScopePtr
|
||
|
||
ldy #CC.ScopeID+3
|
||
|
||
.1 lda (pData),y
|
||
pha
|
||
dey
|
||
bpl .1
|
||
|
||
|
||
|
||
|
||
dec bLocalScope
|
||
|
||
lda #'F'
|
||
jsr SYM.LookupLabelA
|
||
bcs .99
|
||
|
||
txa
|
||
|
||
jsr CODE.AddLocal
|
||
bcs .99
|
||
|
||
.DO _DBG_SCOPE=1
|
||
>PUSHW L.MSG.DEBUG.SCIN
|
||
jsr SCOPE.Push
|
||
|
||
lda ScopePtr
|
||
lsr
|
||
lsr
|
||
>PUSHA
|
||
|
||
>PUSHB.G CC.LocalPtr
|
||
>PUSHB.G CC.FrameSize
|
||
>PUSHBI 5
|
||
>SYSCALL PrintF
|
||
>DEBUG
|
||
.FIN
|
||
|
||
clc
|
||
rts
|
||
|
||
.9 lda #E.OOH
|
||
sec
|
||
.99
|
||
SCOPE.New.RTS rts
|
||
*--------------------------------------
|
||
SCOPE.Close lda #'F' define FRAME SIZE
|
||
jsr SYM.NewLabelA
|
||
bcs SCOPE.New.RTS
|
||
|
||
>LDA.G CC.FrameSize
|
||
jsr CODE.RemLocal
|
||
bcs SCOPE.New.RTS
|
||
|
||
.DO _DBG_SCOPE=1
|
||
>PUSHW L.MSG.DEBUG.SCOUT
|
||
jsr SCOPE.Push
|
||
lda ScopePtr
|
||
lsr
|
||
lsr
|
||
>PUSHA
|
||
|
||
>PUSHB.G CC.LocalPtr
|
||
>PUSHB.G CC.FrameSize
|
||
>PUSHBI 5
|
||
>SYSCALL PrintF
|
||
.FIN
|
||
|
||
lda ScopePtr
|
||
beq *
|
||
|
||
sec
|
||
sbc #SCOPE
|
||
sta ScopePtr
|
||
|
||
inc bLocalScope
|
||
|
||
.DO _DBG_SCOPE=1
|
||
>PUSHW L.MSG.DEBUG.SC
|
||
jsr SCOPE.Push
|
||
|
||
lda ScopePtr
|
||
lsr
|
||
lsr
|
||
>PUSHA
|
||
|
||
>PUSHB.G CC.LocalPtr
|
||
>PUSHB.G CC.FrameSize
|
||
>PUSHBI 5
|
||
>SYSCALL PrintF
|
||
>DEBUG
|
||
.FIN
|
||
|
||
clc
|
||
|
||
.99 rts
|
||
*--------------------------------------
|
||
SCOPE.Push ldy ScopePtr
|
||
|
||
SCOPE.PushY iny #SCOPE.ID+1
|
||
lda (ScopeStk),y
|
||
>PUSHA
|
||
dey #SCOPE.ID
|
||
lda (ScopeStk),y
|
||
>PUSHA
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/bin/cc.s.scope
|
||
LOAD usr/src/bin/cc.s
|
||
ASM
|