mirror of https://github.com/A2osX/A2osX.git
88 lines
1.3 KiB
Plaintext
88 lines
1.3 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
SCOPE.New ldy ScopeIdx
|
||
cpy #CC.ScopeIDs+SCOPE.MAX*2
|
||
bcs .9
|
||
|
||
iny
|
||
iny
|
||
sty ScopeIdx
|
||
|
||
>INCW.G CC.ScopeID
|
||
|
||
>LDA.G CC.ScopeID
|
||
|
||
ldy ScopeIdx
|
||
sta (pData),y
|
||
|
||
>LDA.G CC.ScopeID+1
|
||
|
||
ldy ScopeIdx
|
||
iny
|
||
sta (pData),y
|
||
|
||
dec bLocalScope
|
||
|
||
stz LocalFrame
|
||
|
||
.DO _DBG_SCOPE=1
|
||
>PUSHW L.MSG.DEBUG.SCIN
|
||
jsr SCOPE.Push
|
||
>PUSHB LocalPtr
|
||
>PUSHB LocalFrame
|
||
>PUSHBI 4
|
||
>SYSCALL PrintF
|
||
.FIN
|
||
|
||
clc
|
||
rts
|
||
|
||
.9 lda #E.OOH
|
||
sec
|
||
.99 rts
|
||
*--------------------------------------
|
||
SCOPE.Close .DO _DBG_SCOPE=1
|
||
>PUSHW L.MSG.DEBUG.SCOUT
|
||
jsr SCOPE.Push
|
||
.FIN
|
||
|
||
ldy ScopeIdx
|
||
cpy #CC.ScopeIDs
|
||
beq *
|
||
|
||
dey
|
||
dey
|
||
sty ScopeIdx
|
||
|
||
inc bLocalScope
|
||
|
||
.DO _DBG_SCOPE=1
|
||
|
||
>PUSHB LocalPtr
|
||
>PUSHB LocalFrame
|
||
jsr SCOPE.Push
|
||
>PUSHBI 6
|
||
>SYSCALL PrintF
|
||
>DEBUG
|
||
.FIN
|
||
|
||
clc
|
||
|
||
.99 rts
|
||
*--------------------------------------
|
||
SCOPE.Push ldy ScopeIdx
|
||
|
||
SCOPE.PushY iny
|
||
lda (pData),y
|
||
>PUSHA
|
||
dey
|
||
lda (pData),y
|
||
>PUSHA
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/bin/cc.s.scope
|
||
LOAD usr/src/bin/cc.s
|
||
ASM
|