Added version to uxnasm

This commit is contained in:
neauoire 2023-08-08 16:34:30 -07:00
parent 1355d7813e
commit 8e3676f007
3 changed files with 9 additions and 7 deletions

View File

@ -36,8 +36,7 @@ fi
if [ "${1}" = '--install' ];
then
cp bin/uxn11 bin/uxn11
cp bin/uxnemu bin/uxnasm bin/uxncli $HOME/bin/
cp bin/uxn11 bin/uxnasm bin/uxncli $HOME/bin/
fi
# bin/uxnasm etc/polycat.tal bin/polycat.rom
@ -48,11 +47,13 @@ if [ "${1}" = '--norun' ]; then exit; fi
# Test usage
./bin/uxnasm
./bin/uxncli
./bin/uxn11
# Test version
./bin/uxnasm -v
./bin/uxncli -v
./bin/uxn11 -v

View File

@ -207,7 +207,7 @@ main(int argc, char **argv)
struct pollfd fds[3];
static const struct itimerspec screen_tspec = {{0, 16666666}, {0, 16666666}};
if(i == argc)
return system_error("usage", "uxn11 [-v][-2x][-3x] file.rom [args...]");
return system_error("usage", "uxn11 [-v] file.rom [args...]");
/* Connect Varvara */
system_connect(0x0, SYSTEM_VERSION, SYSTEM_DEIMASK, SYSTEM_DEOMASK);
system_connect(0x1, CONSOLE_VERSION, CONSOLE_DEIMASK, CONSOLE_DEOMASK);
@ -221,8 +221,6 @@ main(int argc, char **argv)
if(argv[i][0] == '-' && argv[i][1] == 'v')
return system_version("Uxn11 - Graphical Varvara Emulator", "8 Aug 2023");
rom_path = argv[1];
if(!uxn_boot(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8))))
return system_error("boot", "Failed");

View File

@ -498,9 +498,12 @@ writesym(char *filename)
int
main(int argc, char *argv[])
{
int i = 1;
FILE *src, *dst;
if(argc < 3)
return !error("usage", "uxnasm input.tal output.rom");
if(i == argc)
return error("usage", "uxnasm [-v] input.tal output.rom");
if(argv[i][0] == '-' && argv[i][1] == 'v')
return !fprintf(stdout, "Uxnasm - Uxntal Assembler, 8 Aug 2023\n");
if(!(src = fopen(argv[1], "r")))
return !error("Invalid input", argv[1]);
if(!assemble(src))