mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
46
test/asm/macro-#.asm
Normal file
46
test/asm/macro-#.asm
Normal file
@@ -0,0 +1,46 @@
|
||||
SECTION "Test", ROM0
|
||||
|
||||
list: MACRO
|
||||
db _NARG
|
||||
if _NARG > 0
|
||||
db \#
|
||||
endc
|
||||
db -1
|
||||
ENDM
|
||||
|
||||
list
|
||||
list 42
|
||||
list $aa, $bb, $cc, $dd, $ee
|
||||
|
||||
person: MACRO
|
||||
db \1, \2, \3, \4, \5
|
||||
ENDM
|
||||
|
||||
object: MACRO
|
||||
x = \1
|
||||
y = \2
|
||||
shift 2
|
||||
person y, x, \#
|
||||
ENDM
|
||||
|
||||
person 5, 10, $33, $44, $55
|
||||
object 12, 6, $66, $77, $88
|
||||
|
||||
echo: MACRO
|
||||
printt "\#\n"
|
||||
ENDM
|
||||
|
||||
R EQUS "S"
|
||||
|
||||
echo P
|
||||
echo Q,R, {R}, T
|
||||
echo 42,$2a
|
||||
|
||||
print: MACRO
|
||||
printt STRCAT(\#)
|
||||
printt "\n"
|
||||
ENDM
|
||||
|
||||
print
|
||||
print "A"
|
||||
print "B", "C", "D"
|
||||
0
test/asm/macro-#.err
Normal file
0
test/asm/macro-#.err
Normal file
6
test/asm/macro-#.out
Normal file
6
test/asm/macro-#.out
Normal file
@@ -0,0 +1,6 @@
|
||||
P
|
||||
Q,R,S,T
|
||||
42,$2a
|
||||
|
||||
A
|
||||
BCD
|
||||
BIN
test/asm/macro-#.out.bin
Normal file
BIN
test/asm/macro-#.out.bin
Normal file
Binary file not shown.
Reference in New Issue
Block a user