aboutsummaryrefslogtreecommitdiff
path: root/tests/global-labels.s
diff options
context:
space:
mode:
Diffstat (limited to 'tests/global-labels.s')
-rw-r--r--tests/global-labels.s26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/global-labels.s b/tests/global-labels.s
new file mode 100644
index 0000000..93b4d6d
--- /dev/null
+++ b/tests/global-labels.s
@@ -0,0 +1,26 @@
+.segment "HEADER"
+ .byte 'N', 'E', 'S', $1A
+ .byte $02, $01
+ .byte $00
+ .byte $00
+
+.segment "CODE"
+;; asan:stack full
+
+.scope Scope
+ .proc foo
+ lda #1 ; $8000
+ jmp Scope::bar ; $8002
+ #@known_address:
+ rts ; $8005
+ .endproc
+
+ .proc bar
+ jmp @label ; $8006
+ nop ; $8009
+ @label:
+ jmp @known_address ; $800A
+ .endproc
+.endscope
+
+jsr Scope::foo ; $800D