Browse code

Fixed issue with raw bytes in macros

neauoire authored on 11/10/2021 20:27:20
Showing 1 changed files
... ...
@@ -235,6 +235,10 @@ walktoken(char *w)
235 235
 			res += walktoken(m->items[i]);
236 236
 		return res;
237 237
 	}
238
+	if(sihx(w) && slen(w) == 2)
239
+		return 1;
240
+	else if(sihx(w) && slen(w) == 4)
241
+		return 1;
238 242
 	return error("Invalid token", w);
239 243
 }
240 244
 
... ...
@@ -392,12 +396,7 @@ cleanup(char *filename)
392 396
 			continue; /* Ignore capitalized labels(devices) */
393 397
 		else if(!p.labels[i].refs)
394 398
 			fprintf(stderr, "--- Unused label: %s\n", p.labels[i].name);
395
-	fprintf(stderr, "Assembled %s in %.2fkb(%.2f%% used), %d labels, %d macros.\n",
396
-		filename,
397
-		(p.length - TRIM) / 1024.0,
398
-		p.length / 652.80,
399
-		p.llen,
400
-		p.mlen);
399
+	fprintf(stderr, "Assembled %s in %.2fkb(%.2f%% used), %d labels, %d macros.\n", filename, (p.length - TRIM) / 1024.0, p.length / 652.80, p.llen, p.mlen);
401 400
 }
402 401
 
403 402
 int