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:
ISSOtm
2020-02-23 22:43:50 +01:00
parent cfe21876e5
commit 4cc24f4369
11 changed files with 52 additions and 5 deletions
+4
View File
@@ -0,0 +1,4 @@
SECTION "test", ROM0[0]
ds unknown, 0
ds 1, $100
+5
View 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)!
View File
+8
View 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
View File
View File
+1
View File
@@ -0,0 +1 @@
****EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE