mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-22 13:55:11 +00:00
(uxnasm) Date
This commit is contained in:
parent
cff5746e03
commit
85d22bbb90
1 changed files with 3 additions and 3 deletions
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue