ref: e7a8bb1140a6949b2dce92e613a54e7a40ebf8c8
parent: f1c13af703b8ab43a72626df69aba2ae7b73a5e1
author: Antonio Niño Díaz <[email protected]>
date: Thu Dec 7 17:35:03 EST 2017
Fix and document DL keyword This keyword acts like DB or DW but for 32-bit values. Signed-off-by: Antonio Niño Díaz <[email protected]>
--- a/include/asm/localasm.h
+++ b/include/asm/localasm.h
@@ -82,6 +82,7 @@
#define NAME_DB "db"
#define NAME_DW "dw"
+#define NAME_DL "dl"
#define NAME_RB "rb"
#define NAME_RW "rw"
--- a/src/asm/globlex.c
+++ b/src/asm/globlex.c
@@ -305,6 +305,7 @@
{"ds", T_POP_DS},
{NAME_DB, T_POP_DB},
{NAME_DW, T_POP_DW},
+ {NAME_DL, T_POP_DL},
{"section", T_POP_SECTION},
{"purge", T_POP_PURGE},
--- a/src/asm/rgbasm.5
+++ b/src/asm/rgbasm.5
@@ -558,30 +558,37 @@
.Ss Defining constant data
.Ic DB
defines a list of bytes that will be stored in the final image.
-Ideal for tables and text.
+Ideal for tables and text (which is not zero-terminated).
.Pp
.Dl DB 1,2,3,4,\[dq]This is a string\[dq]
.Pp
Alternatively, you can use
.Ic DW
-to store a list of words.
+to store a list of words (16-bits) or
+.Ic DL
+to store a list of doublewords/longs (32-bits).
Strings are not allowed as arguments to
-.Ic DW .
+.Ic DW
+and
+.Ic DL .
.Pp
You can also use
-.Ic DB
-and
+.Ic DB ,
.Ic DW
-without arguments.
-This works exactly like
-.Sy DS 1
and
+.Ic DL
+without arguments, or leaving empty elements at any point in the list.
+This works exactly like
+.Sy DS 1 ,
.Sy DS 2
+and
+.Sy DS 4
respectively.
Consequently,
-.Ic DB
-and
+.Ic DB ,
.Ic DW
+and
+.Ic DL
can be used in a
.Sy WRAM0 No / Sy WRAMX No / Sy HRAM No / Sy VRAM No / Sy SRAM
section.
@@ -591,9 +598,10 @@
The content is undefined.
This is the preferred method of allocationg space in a RAM section.
You can, however, use
-.Ic DB
-and
+.Ic DB ,
.Ic DW
+and
+.Ic DL
without any arguments instead.
.Pp
.Dl DS str_SIZEOF ;allocate str_SIZEOF bytes
@@ -1036,6 +1044,7 @@
.It Sx DB
.It Sx DEF
.It Sx DIV
+.It Sx DL
.It Sx DS
.It Sx DW
.It Sx ELIF