mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Test the RGBASM state file output (#1472)
This commit is contained in:
26
test/asm/state-file/a.asm
Normal file
26
test/asm/state-file/a.asm
Normal file
@@ -0,0 +1,26 @@
|
||||
OPT Wno-unmapped-char
|
||||
|
||||
DEF constant EQU 1
|
||||
DEF variable = 2
|
||||
DEF string EQUS "hello!"
|
||||
CHARMAP "c", 4
|
||||
MACRO polo
|
||||
db 5
|
||||
ENDM
|
||||
|
||||
def variable += 1
|
||||
|
||||
def con2 equ -1
|
||||
def var2 = variable**2
|
||||
def str2 equs strcat("{string}", "\0\n\t\r")
|
||||
charmap "c2", 10, -11, 987654321
|
||||
|
||||
PURGE polo
|
||||
MACRO mac2
|
||||
!?@#;^&
|
||||
ENDM
|
||||
|
||||
newcharmap map2, main
|
||||
charmap "\0\n\t\r", "\t", "\r", "\0", "\n"
|
||||
|
||||
REDEF string EQUS "goodbye~"
|
||||
27
test/asm/state-file/a.dump.asm
Normal file
27
test/asm/state-file/a.dump.asm
Normal file
@@ -0,0 +1,27 @@
|
||||
; File generated by rgbasm
|
||||
|
||||
; Numeric constants
|
||||
def constant equ $1
|
||||
def con2 equ $ffffffff
|
||||
|
||||
; Variables
|
||||
def variable = $3
|
||||
def var2 = $9
|
||||
|
||||
; String constants
|
||||
def string equs "goodbye~"
|
||||
def str2 equs "hello!\0\n\t\r"
|
||||
|
||||
; Character maps
|
||||
newcharmap main
|
||||
charmap "c", $4
|
||||
charmap "c2", $a, $fffffff5, $3ade68b1
|
||||
newcharmap map2
|
||||
charmap "c", $4
|
||||
charmap "c2", $a, $fffffff5, $3ade68b1
|
||||
charmap "\0\n\t\r", $9, $d, $0, $a
|
||||
|
||||
; Macros
|
||||
macro mac2
|
||||
!?@#;^&
|
||||
endm
|
||||
Reference in New Issue
Block a user