diff --git a/src/asm/parser.y b/src/asm/parser.y index a14a59c1..3bf26af9 100644 --- a/src/asm/parser.y +++ b/src/asm/parser.y @@ -888,7 +888,7 @@ capture_macro: ; rsset: - POP_RSSET uconst { + POP_RSSET iconst { sym_SetRSValue($2); } ; diff --git a/test/asm/rs.asm b/test/asm/rs.asm index 4e747f28..5c70031e 100644 --- a/test/asm/rs.asm +++ b/test/asm/rs.asm @@ -3,20 +3,20 @@ def a1 rb 1 def a2 rw 1 def a3 rl 1 -PRINTLN "a1 = ", a1 -PRINTLN "a2 = ", a2 -PRINTLN "a3 = ", a3 -PRINTLN "_RS = ", _RS +PRINTLN "a1 = {d:a1}" +PRINTLN "a2 = {d:a2}" +PRINTLN "a3 = {d:a3}" +PRINTLN "_RS = {d:_RS}" def b1 rb 1 def b2 rw 1 def b3 rl 1 -PRINTLN "b1 = ", b1 -PRINTLN "b2 = ", b2 -PRINTLN "b3 = ", b3 -PRINTLN "_RS = ", _RS +PRINTLN "b1 = {d:b1}" +PRINTLN "b2 = {d:b2}" +PRINTLN "b3 = {d:b3}" +PRINTLN "_RS = {d:_RS}" rsset 42 @@ -24,10 +24,10 @@ def c1 rb 1 def c2 rw 1 def c3 rl 1 -PRINTLN "c1 = ", c1 -PRINTLN "c2 = ", c2 -PRINTLN "c3 = ", c3 -PRINTLN "_RS = ", _RS +PRINTLN "c1 = {d:c1}" +PRINTLN "c2 = {d:c2}" +PRINTLN "c3 = {d:c3}" +PRINTLN "_RS = {d:_RS}" rsreset @@ -35,7 +35,18 @@ def d1 rb 1 def d2 rw 1 def d3 rl 1 -PRINTLN "d1 = ", d1 -PRINTLN "d2 = ", d2 -PRINTLN "d3 = ", d3 -PRINTLN "_RS = ", _RS +PRINTLN "d1 = {d:d1}" +PRINTLN "d2 = {d:d2}" +PRINTLN "d3 = {d:d3}" +PRINTLN "_RS = {d:_RS}" + + +rsset -10 +def e1 rb 1 +def e2 rw 1 +def e3 rl 1 + +PRINTLN "e1 = {d:e1}" +PRINTLN "e2 = {d:e2}" +PRINTLN "e3 = {d:e3}" +PRINTLN "_RS = {d:_RS}" diff --git a/test/asm/rs.out b/test/asm/rs.out index db465b28..1699ae04 100644 --- a/test/asm/rs.out +++ b/test/asm/rs.out @@ -1,16 +1,20 @@ -a1 = $0 -a2 = $1 -a3 = $3 -_RS = $7 -b1 = $7 -b2 = $8 -b3 = $A -_RS = $E -c1 = $2A -c2 = $2B -c3 = $2D -_RS = $31 -d1 = $0 -d2 = $1 -d3 = $3 -_RS = $7 +a1 = 0 +a2 = 1 +a3 = 3 +_RS = 7 +b1 = 7 +b2 = 8 +b3 = 10 +_RS = 14 +c1 = 42 +c2 = 43 +c3 = 45 +_RS = 49 +d1 = 0 +d2 = 1 +d3 = 3 +_RS = 7 +e1 = -10 +e2 = -9 +e3 = -7 +_RS = -3