Allow ds to take multiple values to repeat for a count (#725)

Fixes #722
This commit is contained in:
Rangi
2021-02-16 19:01:23 -08:00
committed by GitHub
parent 76d6ef8695
commit 8c0275480c
9 changed files with 74 additions and 14 deletions

View File

@@ -1239,10 +1239,13 @@ DW "H", "e", "l", "l", "o", "!"
If you do not want this special handling, enclose the string in parentheses.
.Pp
.Ic DS
can also be used to fill a region of memory with some value.
The following produces 42 times the byte $FF:
can also be used to fill a region of memory with some repeated values.
For example:
.Bd -literal -offset indent
DS 42, $FF
; outputs 3 bytes: $AA, $AA, $AA
DS 3, $AA
; outputs 7 bytes: $BB, $CC, $BB, $CC, $BB, $CC, $BB
DS 7, $BB, $CC
.Ed
.Pp
You can also use