summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lisc/emit.c3
-rw-r--r--lisc/lisc.h3
-rw-r--r--lisc/parse.c3
3 files changed, 8 insertions, 1 deletions
diff --git a/lisc/emit.c b/lisc/emit.c
index 4bf2c63..180f468 100644
--- a/lisc/emit.c
+++ b/lisc/emit.c
@@ -549,6 +549,9 @@ emitdat(Dat *d, FILE *f)
 			d->u.str, d->u.str, d->u.str
 		);
 		break;
+	case DZ:
+		fprintf(f, "\t.fill %"PRId64",1,0\n", d->u.num);
+		break;
 	case DB:
 		if (d->isstr) {
 			fprintf(f, "\t.ascii \"%s\"\n", d->u.str);
diff --git a/lisc/lisc.h b/lisc/lisc.h
index 57ce9be..8a65887 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -432,7 +432,8 @@ struct Dat {
 		DB,
 		DH,
 		DW,
-		DL
+		DL,
+		DZ
 	} type;
 	union {
 		int64_t num;
diff --git a/lisc/parse.c b/lisc/parse.c
index 99af770..be93ca3 100644
--- a/lisc/parse.c
+++ b/lisc/parse.c
@@ -87,6 +87,7 @@ enum {
 	TB,
 	TD,
 	TS,
+	TZ,
 
 	TPlus,
 
@@ -175,6 +176,7 @@ lex()
 		{ "b", TB },
 		{ "d", TD },
 		{ "s", TS },
+		{ "z", TZ },
 		{ "loadw", OLoad }, /* for convenience */
 		{ "loadl", OLoad },
 		{ "loads", OLoad },
@@ -827,6 +829,7 @@ parsedat(void cb(Dat *))
 		case TB: d.type = DB; break;
 		case TS: d.type = DW; break;
 		case TD: d.type = DL; break;
+		case TZ: d.type = DZ; break;
 		}
 		t = nextnl();
 		do {