mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Merge pull request #390 from ISSOtm/print_types
Add "print types" to bracketed symbols
This commit is contained in:
20
test/asm/bracketed-symbols.asm
Normal file
20
test/asm/bracketed-symbols.asm
Normal file
@@ -0,0 +1,20 @@
|
||||
X = 42
|
||||
PRINTT "{X}\n"
|
||||
PRINTT "{x:X}\n"
|
||||
PRINTT "{X:X}\n"
|
||||
PRINTT "{d:X}\n"
|
||||
PRINTT "{b:X}\n"
|
||||
|
||||
Y equ 1337
|
||||
PRINTT "{b:Y}\n"
|
||||
|
||||
rsreset
|
||||
R rb 0
|
||||
PRINTT "{d:R}\n"
|
||||
|
||||
S equs "You can't format me!"
|
||||
PRINTT "{X:S}\n"
|
||||
|
||||
SECTION "Test", ROM0
|
||||
Label:
|
||||
PRINTT "{x:Label}\n"
|
||||
12
test/asm/bracketed-symbols.out
Normal file
12
test/asm/bracketed-symbols.out
Normal file
@@ -0,0 +1,12 @@
|
||||
ERROR: bracketed-symbols.asm(16):
|
||||
Print types are only allowed for numbers
|
||||
ERROR: bracketed-symbols.asm(20):
|
||||
Expression must have a constant value
|
||||
$2A
|
||||
2a
|
||||
2A
|
||||
42
|
||||
101010
|
||||
10100111001
|
||||
0
|
||||
You can't format me!
|
||||
12
test/asm/bracketed-symbols.out.pipe
Normal file
12
test/asm/bracketed-symbols.out.pipe
Normal file
@@ -0,0 +1,12 @@
|
||||
ERROR: -(16):
|
||||
Print types are only allowed for numbers
|
||||
ERROR: -(20):
|
||||
Expression must have a constant value
|
||||
$2A
|
||||
2a
|
||||
2A
|
||||
42
|
||||
101010
|
||||
10100111001
|
||||
0
|
||||
You can't format me!
|
||||
Reference in New Issue
Block a user