0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-04 21:35:04 +00:00

(uxnasm) Date

This commit is contained in:
neauoire 2023-10-27 08:43:48 -07:00
parent cff5746e03
commit 85d22bbb90

View file

@ -501,19 +501,19 @@ main(int argc, char *argv[])
if(argc == 1)
return error("usage", "uxnasm [-v] input.tal output.rom");
if(argv[1][0] == '-' && argv[1][1] == 'v')
return !fprintf(stdout, "Uxnasm - Uxntal Assembler, 8 Aug 2023.\n");
return !fprintf(stdout, "Uxnasm - Uxntal Assembler, 27 Oct 2023.\n");
if(!(src = fopen(argv[1], "r")))
return !error("Invalid input", argv[1]);
if(!assemble(src))
return !error("Assembly", "Failed to assemble rom.");
if (scmp(argv[2], "-", 2))
if(scmp(argv[2], "-", 2))
dst = stdout;
else if(!(dst = fopen(argv[2], "wb")))
return !error("Invalid Output", argv[2]);
if(p.length <= TRIM)
return !error("Assembly", "Output rom is empty.");
fwrite(p.data + TRIM, p.length - TRIM, 1, dst);
if (!scmp(argv[2], "-", 2)) {
if(!scmp(argv[2], "-", 2)) {
review(argv[2]);
writesym(argv[2]);
}