0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-28 08:43:02 +00:00

Fixed issue with raw bytes in macros

This commit is contained in:
neauoire 2021-10-11 13:27:20 -07:00
parent e70041017d
commit 037ab10b6a

View file

@ -235,6 +235,10 @@ walktoken(char *w)
res += walktoken(m->items[i]); res += walktoken(m->items[i]);
return res; return res;
} }
if(sihx(w) && slen(w) == 2)
return 1;
else if(sihx(w) && slen(w) == 4)
return 1;
return error("Invalid token", w); return error("Invalid token", w);
} }
@ -392,12 +396,7 @@ cleanup(char *filename)
continue; /* Ignore capitalized labels(devices) */ continue; /* Ignore capitalized labels(devices) */
else if(!p.labels[i].refs) else if(!p.labels[i].refs)
fprintf(stderr, "--- Unused label: %s\n", p.labels[i].name); fprintf(stderr, "--- Unused label: %s\n", p.labels[i].name);
fprintf(stderr, "Assembled %s in %.2fkb(%.2f%% used), %d labels, %d macros.\n", 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);
filename,
(p.length - TRIM) / 1024.0,
p.length / 652.80,
p.llen,
p.mlen);
} }
int int