16
test/asm/listing/300-scopes-basic.s
Normal file
16
test/asm/listing/300-scopes-basic.s
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
.org $800
|
||||
|
||||
symbol1 := * ; ::symbol1
|
||||
.addr symbol1 ; ::symbol1
|
||||
|
||||
|
||||
.scope scope1
|
||||
symbol1 := * ; ::scope1::symbol1
|
||||
|
||||
.addr symbol1 ; ::scope1::symbol1
|
||||
.addr ::symbol1 ; ::symbol1
|
||||
.endscope
|
||||
|
||||
.addr symbol1 ; ::symbol1
|
||||
.addr scope1::symbol1 ; ::scope1::symbol
|
||||
7
test/asm/listing/301-nested-scopes.s
Normal file
7
test/asm/listing/301-nested-scopes.s
Normal file
@@ -0,0 +1,7 @@
|
||||
.scope outer
|
||||
foo = 2
|
||||
.scope inner
|
||||
lda #foo
|
||||
foo = 3
|
||||
.endscope
|
||||
.endscope
|
||||
7
test/asm/listing/302-scope-redefined.s
Normal file
7
test/asm/listing/302-scope-redefined.s
Normal file
@@ -0,0 +1,7 @@
|
||||
.scope outer
|
||||
foo = $1234
|
||||
.scope inner
|
||||
lda foo,x
|
||||
foo = $12
|
||||
.endscope
|
||||
.endscope
|
||||
7
test/asm/listing/303-change-addressing-mode-error.s
Normal file
7
test/asm/listing/303-change-addressing-mode-error.s
Normal file
@@ -0,0 +1,7 @@
|
||||
.scope outer
|
||||
foo = $12
|
||||
.scope inner
|
||||
lda foo,x
|
||||
foo = $1234
|
||||
.endscope
|
||||
.endscope
|
||||
7
test/asm/listing/304-fix-addressing-mode-error.s
Normal file
7
test/asm/listing/304-fix-addressing-mode-error.s
Normal file
@@ -0,0 +1,7 @@
|
||||
.scope outer
|
||||
foo = $12
|
||||
.scope inner
|
||||
lda a:foo,x
|
||||
foo = $1234
|
||||
.endscope
|
||||
.endscope
|
||||
6
test/asm/listing/305-explicit-scope-reference.s
Normal file
6
test/asm/listing/305-explicit-scope-reference.s
Normal file
@@ -0,0 +1,6 @@
|
||||
bar = 3
|
||||
|
||||
.scope foo
|
||||
bar = 2
|
||||
lda #::bar ; Access the global bar (which is 3)
|
||||
.endscope
|
||||
10
test/asm/listing/306-scope-use-before-definition.s
Normal file
10
test/asm/listing/306-scope-use-before-definition.s
Normal file
@@ -0,0 +1,10 @@
|
||||
.scope foo
|
||||
bar = 3
|
||||
.endscope
|
||||
|
||||
.scope outer
|
||||
lda #foo::bar ; Will load 3, not 2!
|
||||
.scope foo
|
||||
bar = 2
|
||||
.endscope
|
||||
.endscope
|
||||
18
test/asm/listing/307-scope-chains.s
Normal file
18
test/asm/listing/307-scope-chains.s
Normal file
@@ -0,0 +1,18 @@
|
||||
.scope foo
|
||||
.scope outer
|
||||
.scope inner
|
||||
bar = 1
|
||||
.endscope
|
||||
.endscope
|
||||
.scope another
|
||||
.scope nested
|
||||
lda #outer::inner::bar ; 1
|
||||
.endscope
|
||||
.endscope
|
||||
.endscope
|
||||
|
||||
.scope outer
|
||||
.scope inner
|
||||
bar = 2
|
||||
.endscope
|
||||
.endscope
|
||||
18
test/asm/listing/308-global-scope-anchoring.s
Normal file
18
test/asm/listing/308-global-scope-anchoring.s
Normal file
@@ -0,0 +1,18 @@
|
||||
.scope foo
|
||||
.scope outer
|
||||
.scope inner
|
||||
bar = 1
|
||||
.endscope
|
||||
.endscope
|
||||
.scope another
|
||||
.scope nested
|
||||
lda #::outer::inner::bar ; 2
|
||||
.endscope
|
||||
.endscope
|
||||
.endscope
|
||||
|
||||
.scope outer
|
||||
.scope inner
|
||||
bar = 2
|
||||
.endscope
|
||||
.endscope
|
||||
16
test/asm/listing/309-namespace-path-vs-addressing-mode.s
Normal file
16
test/asm/listing/309-namespace-path-vs-addressing-mode.s
Normal file
@@ -0,0 +1,16 @@
|
||||
.org $2000
|
||||
|
||||
.proc s1
|
||||
|
||||
symbol := $1
|
||||
|
||||
stx s1::s2::symbol
|
||||
stx s2_symbol
|
||||
|
||||
.scope s2
|
||||
symbol: .byte 0
|
||||
.endscope
|
||||
|
||||
s2_symbol := s2::symbol
|
||||
|
||||
.endproc
|
||||
15
test/asm/listing/310-create-in-current-scope.s
Normal file
15
test/asm/listing/310-create-in-current-scope.s
Normal file
@@ -0,0 +1,15 @@
|
||||
.scope main
|
||||
.proc foo
|
||||
|
||||
;; should all be the same
|
||||
lda params__bar
|
||||
lda params::bar
|
||||
lda foo::params::bar
|
||||
|
||||
.proc params
|
||||
bar: .byte 0
|
||||
.endproc
|
||||
params__bar := params::bar
|
||||
|
||||
.endproc
|
||||
.endscope
|
||||
9
test/asm/listing/311-close-new-scopes-error.s
Normal file
9
test/asm/listing/311-close-new-scopes-error.s
Normal file
@@ -0,0 +1,9 @@
|
||||
.scope foo
|
||||
start:
|
||||
jmp bar::start
|
||||
.endscope
|
||||
|
||||
.scope bar
|
||||
start:
|
||||
rts
|
||||
.endscope
|
||||
BIN
test/asm/listing/ref/300-scopes-basic.bin-ref
Normal file
BIN
test/asm/listing/ref/300-scopes-basic.bin-ref
Normal file
Binary file not shown.
21
test/asm/listing/ref/300-scopes-basic.list-ref
Normal file
21
test/asm/listing/ref/300-scopes-basic.list-ref
Normal file
@@ -0,0 +1,21 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 300-scopes-basic.s
|
||||
Current file: 300-scopes-basic.s
|
||||
|
||||
000000r 1
|
||||
000000r 1 .org $800
|
||||
000800 1
|
||||
000800 1 symbol1 := * ; ::symbol1
|
||||
000800 1 00 08 .addr symbol1 ; ::symbol1
|
||||
000802 1
|
||||
000802 1
|
||||
000802 1 .scope scope1
|
||||
000802 1 symbol1 := * ; ::scope1::symbol1
|
||||
000802 1
|
||||
000802 1 02 08 .addr symbol1 ; ::scope1::symbol1
|
||||
000804 1 00 08 .addr ::symbol1 ; ::symbol1
|
||||
000806 1 .endscope
|
||||
000806 1
|
||||
000806 1 00 08 .addr symbol1 ; ::symbol1
|
||||
000808 1 02 08 .addr scope1::symbol1 ; ::scope1::symbol
|
||||
000808 1
|
||||
1
test/asm/listing/ref/301-nested-scopes.bin-ref
Normal file
1
test/asm/listing/ref/301-nested-scopes.bin-ref
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD>
|
||||
12
test/asm/listing/ref/301-nested-scopes.list-ref
Normal file
12
test/asm/listing/ref/301-nested-scopes.list-ref
Normal file
@@ -0,0 +1,12 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 301-nested-scopes.s
|
||||
Current file: 301-nested-scopes.s
|
||||
|
||||
000000r 1 .scope outer
|
||||
000000r 1 foo = 2
|
||||
000000r 1 .scope inner
|
||||
000000r 1 A9 03 lda #foo
|
||||
000002r 1 foo = 3
|
||||
000002r 1 .endscope
|
||||
000002r 1 .endscope
|
||||
000002r 1
|
||||
BIN
test/asm/listing/ref/302-scope-redefined.bin-ref
Normal file
BIN
test/asm/listing/ref/302-scope-redefined.bin-ref
Normal file
Binary file not shown.
12
test/asm/listing/ref/302-scope-redefined.list-ref
Normal file
12
test/asm/listing/ref/302-scope-redefined.list-ref
Normal file
@@ -0,0 +1,12 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 302-scope-redefined.s
|
||||
Current file: 302-scope-redefined.s
|
||||
|
||||
000000r 1 .scope outer
|
||||
000000r 1 foo = $1234
|
||||
000000r 1 .scope inner
|
||||
000000r 1 BD 12 00 lda foo,x
|
||||
000003r 1 foo = $12
|
||||
000003r 1 .endscope
|
||||
000003r 1 .endscope
|
||||
000003r 1
|
||||
12
test/asm/listing/ref/302-scope-redefined.list-ref-bak
Normal file
12
test/asm/listing/ref/302-scope-redefined.list-ref-bak
Normal file
@@ -0,0 +1,12 @@
|
||||
ca65 V2.19 - Git 7f1dd09bc
|
||||
Main file : 302-scope-redefined.s
|
||||
Current file: 302-scope-redefined.s
|
||||
|
||||
000000r 1 .scope outer
|
||||
000000r 1 foo = $1234
|
||||
000000r 1 .scope inner
|
||||
000000r 1 BD 12 00 lda foo,x
|
||||
000003r 1 foo = $12
|
||||
000003r 1 .endscope
|
||||
000003r 1 .endscope
|
||||
000003r 1
|
||||
@@ -0,0 +1 @@
|
||||
303-change-addressing-mode-error.s:4: Error: Range error (4660 not in [0..255])
|
||||
@@ -0,0 +1 @@
|
||||
<EFBFBD>4
|
||||
12
test/asm/listing/ref/304-fix-addressing-mode-error.list-ref
Normal file
12
test/asm/listing/ref/304-fix-addressing-mode-error.list-ref
Normal file
@@ -0,0 +1,12 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 304-fix-addressing-mode-error.s
|
||||
Current file: 304-fix-addressing-mode-error.s
|
||||
|
||||
000000r 1 .scope outer
|
||||
000000r 1 foo = $12
|
||||
000000r 1 .scope inner
|
||||
000000r 1 BD 34 12 lda a:foo,x
|
||||
000003r 1 foo = $1234
|
||||
000003r 1 .endscope
|
||||
000003r 1 .endscope
|
||||
000003r 1
|
||||
@@ -0,0 +1 @@
|
||||
<EFBFBD>
|
||||
11
test/asm/listing/ref/305-explicit-scope-reference.list-ref
Normal file
11
test/asm/listing/ref/305-explicit-scope-reference.list-ref
Normal file
@@ -0,0 +1,11 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 305-explicit-scope-reference.s
|
||||
Current file: 305-explicit-scope-reference.s
|
||||
|
||||
000000r 1 bar = 3
|
||||
000000r 1
|
||||
000000r 1 .scope foo
|
||||
000000r 1 bar = 2
|
||||
000000r 1 A9 03 lda #::bar ; Access the global bar (which is 3)
|
||||
000002r 1 .endscope
|
||||
000002r 1
|
||||
@@ -0,0 +1 @@
|
||||
<EFBFBD>
|
||||
@@ -0,0 +1,15 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 306-scope-use-before-definition.s
|
||||
Current file: 306-scope-use-before-definition.s
|
||||
|
||||
000000r 1 .scope foo
|
||||
000000r 1 bar = 3
|
||||
000000r 1 .endscope
|
||||
000000r 1
|
||||
000000r 1 .scope outer
|
||||
000000r 1 A9 03 lda #foo::bar ; Will load 3, not 2!
|
||||
000002r 1 .scope foo
|
||||
000002r 1 bar = 2
|
||||
000002r 1 .endscope
|
||||
000002r 1 .endscope
|
||||
000002r 1
|
||||
1
test/asm/listing/ref/307-scope-chains.bin-ref
Normal file
1
test/asm/listing/ref/307-scope-chains.bin-ref
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD>
|
||||
23
test/asm/listing/ref/307-scope-chains.list-ref
Normal file
23
test/asm/listing/ref/307-scope-chains.list-ref
Normal file
@@ -0,0 +1,23 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 307-scope-chains.s
|
||||
Current file: 307-scope-chains.s
|
||||
|
||||
000000r 1 .scope foo
|
||||
000000r 1 .scope outer
|
||||
000000r 1 .scope inner
|
||||
000000r 1 bar = 1
|
||||
000000r 1 .endscope
|
||||
000000r 1 .endscope
|
||||
000000r 1 .scope another
|
||||
000000r 1 .scope nested
|
||||
000000r 1 A9 01 lda #outer::inner::bar ; 1
|
||||
000002r 1 .endscope
|
||||
000002r 1 .endscope
|
||||
000002r 1 .endscope
|
||||
000002r 1
|
||||
000002r 1 .scope outer
|
||||
000002r 1 .scope inner
|
||||
000002r 1 bar = 2
|
||||
000002r 1 .endscope
|
||||
000002r 1 .endscope
|
||||
000002r 1
|
||||
1
test/asm/listing/ref/308-global-scope-anchoring.bin-ref
Normal file
1
test/asm/listing/ref/308-global-scope-anchoring.bin-ref
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD>
|
||||
23
test/asm/listing/ref/308-global-scope-anchoring.list-ref
Normal file
23
test/asm/listing/ref/308-global-scope-anchoring.list-ref
Normal file
@@ -0,0 +1,23 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 308-global-scope-anchoring.s
|
||||
Current file: 308-global-scope-anchoring.s
|
||||
|
||||
000000r 1 .scope foo
|
||||
000000r 1 .scope outer
|
||||
000000r 1 .scope inner
|
||||
000000r 1 bar = 1
|
||||
000000r 1 .endscope
|
||||
000000r 1 .endscope
|
||||
000000r 1 .scope another
|
||||
000000r 1 .scope nested
|
||||
000000r 1 A9 02 lda #::outer::inner::bar ; 2
|
||||
000002r 1 .endscope
|
||||
000002r 1 .endscope
|
||||
000002r 1 .endscope
|
||||
000002r 1
|
||||
000002r 1 .scope outer
|
||||
000002r 1 .scope inner
|
||||
000002r 1 bar = 2
|
||||
000002r 1 .endscope
|
||||
000002r 1 .endscope
|
||||
000002r 1
|
||||
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 309-namespace-path-vs-addressing-mode.s
|
||||
Current file: 309-namespace-path-vs-addressing-mode.s
|
||||
|
||||
000000r 1 .org $2000
|
||||
002000 1
|
||||
002000 1 .proc s1
|
||||
002000 1
|
||||
002000 1 symbol := $1
|
||||
002000 1
|
||||
002000 1 8E 06 20 stx s1::s2::symbol
|
||||
002003 1 8E 06 20 stx s2_symbol
|
||||
002006 1
|
||||
002006 1 .scope s2
|
||||
002006 1 00 symbol: .byte 0
|
||||
002007 1 .endscope
|
||||
002007 1
|
||||
002007 1 s2_symbol := s2::symbol
|
||||
002007 1
|
||||
002007 1 .endproc
|
||||
002007 1
|
||||
BIN
test/asm/listing/ref/310-create-in-current-scope.bin-ref
Normal file
BIN
test/asm/listing/ref/310-create-in-current-scope.bin-ref
Normal file
Binary file not shown.
20
test/asm/listing/ref/310-create-in-current-scope.list-ref
Normal file
20
test/asm/listing/ref/310-create-in-current-scope.list-ref
Normal file
@@ -0,0 +1,20 @@
|
||||
ca65 Vx.xx - Git XXXXXXXXX
|
||||
Main file : 310-create-in-current-scope.s
|
||||
Current file: 310-create-in-current-scope.s
|
||||
|
||||
000000r 1 .scope main
|
||||
000000r 1 .proc foo
|
||||
000000r 1
|
||||
000000r 1 ;; should all be the same
|
||||
000000r 1 AD rr rr lda params__bar
|
||||
000003r 1 AD rr rr lda params::bar
|
||||
000006r 1 AD rr rr lda foo::params::bar
|
||||
000009r 1
|
||||
000009r 1 .proc params
|
||||
000009r 1 00 bar: .byte 0
|
||||
00000Ar 1 .endproc
|
||||
00000Ar 1 params__bar := params::bar
|
||||
00000Ar 1
|
||||
00000Ar 1 .endproc
|
||||
00000Ar 1 .endscope
|
||||
00000Ar 1
|
||||
1
test/asm/listing/ref/311-close-new-scopes-error.err2-ref
Normal file
1
test/asm/listing/ref/311-close-new-scopes-error.err2-ref
Normal file
@@ -0,0 +1 @@
|
||||
311-close-new-scopes-error.s:3: Error: Symbol 'start' is undefined
|
||||
Reference in New Issue
Block a user