aboutsummaryrefslogtreecommitdiff
path: root/tests/fallthrough.s
blob: f24bf1a79c59dcb552c2cc592aef5f38e0e35aad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.segment "HEADER"
    .byte 'N', 'E', 'S', $1A
    .byte $02, $01
    .byte $00
    .byte $00

.segment "CODE"

__fallthrough__ foo

.proc foo
    lda #0
    __fallthrough__ bar
.endproc

__fallthrough__ bar

.proc bar
    lda #0
    __fallthrough__ other
.endproc

.proc other
    rts
    __fallthrough__ Scope::foo
.endproc

.scope Scope
    .proc foo
        __fallthrough__ Scope::bar
    .endproc

    .proc bar
        rts
    .endproc
.endscope

;;; asan:stack full