mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-26 04:52:08 +00:00
Add ds cnt, byte syntax
As suggested by https://github.com/rednex/rgbds/issues/350#issuecomment-498030458 The order `count` then `byte` was decided after some discussion: - First argument consistent with single-arg syntax - Intuitive at least to some people other than myself - Consistent with other assemblers, at least ca65
This commit is contained in:
4
test/asm/ds-bad.asm
Normal file
4
test/asm/ds-bad.asm
Normal file
@@ -0,0 +1,4 @@
|
||||
SECTION "test", ROM0[0]
|
||||
|
||||
ds unknown, 0
|
||||
ds 1, $100
|
||||
5
test/asm/ds-bad.err
Normal file
5
test/asm/ds-bad.err
Normal file
@@ -0,0 +1,5 @@
|
||||
ERROR: ds-bad.asm(3):
|
||||
Expected constant expression: 'unknown' is not constant at assembly time
|
||||
warning: ds-bad.asm(4): [-Wtruncation]
|
||||
Expression must be 8-bit
|
||||
error: Assembly aborted (1 errors)!
|
||||
0
test/asm/ds-bad.out
Normal file
0
test/asm/ds-bad.out
Normal file
8
test/asm/ds-byte.asm
Normal file
8
test/asm/ds-byte.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
SECTION "test", ROM0[0]
|
||||
|
||||
Label:
|
||||
ds 4, 42
|
||||
.other
|
||||
ds 5, .other - Label - 5 ; Expressions should work...
|
||||
ds 60, .last - Label ; ...even if not constant
|
||||
.last
|
||||
0
test/asm/ds-byte.err
Normal file
0
test/asm/ds-byte.err
Normal file
0
test/asm/ds-byte.out
Normal file
0
test/asm/ds-byte.out
Normal file
1
test/asm/ds-byte.out.bin
Normal file
1
test/asm/ds-byte.out.bin
Normal file
@@ -0,0 +1 @@
|
||||
****<2A><><EFBFBD><EFBFBD><EFBFBD>EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
|
||||
Reference in New Issue
Block a user