Added version to uxnasm
This commit is contained in:
parent
1355d7813e
commit
8e3676f007
5
build.sh
5
build.sh
|
@ -36,8 +36,7 @@ fi
|
||||||
|
|
||||||
if [ "${1}" = '--install' ];
|
if [ "${1}" = '--install' ];
|
||||||
then
|
then
|
||||||
cp bin/uxn11 bin/uxn11
|
cp bin/uxn11 bin/uxnasm bin/uxncli $HOME/bin/
|
||||||
cp bin/uxnemu bin/uxnasm bin/uxncli $HOME/bin/
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# bin/uxnasm etc/polycat.tal bin/polycat.rom
|
# bin/uxnasm etc/polycat.tal bin/polycat.rom
|
||||||
|
@ -48,11 +47,13 @@ if [ "${1}" = '--norun' ]; then exit; fi
|
||||||
|
|
||||||
# Test usage
|
# Test usage
|
||||||
|
|
||||||
|
./bin/uxnasm
|
||||||
./bin/uxncli
|
./bin/uxncli
|
||||||
./bin/uxn11
|
./bin/uxn11
|
||||||
|
|
||||||
# Test version
|
# Test version
|
||||||
|
|
||||||
|
./bin/uxnasm -v
|
||||||
./bin/uxncli -v
|
./bin/uxncli -v
|
||||||
./bin/uxn11 -v
|
./bin/uxn11 -v
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ main(int argc, char **argv)
|
||||||
struct pollfd fds[3];
|
struct pollfd fds[3];
|
||||||
static const struct itimerspec screen_tspec = {{0, 16666666}, {0, 16666666}};
|
static const struct itimerspec screen_tspec = {{0, 16666666}, {0, 16666666}};
|
||||||
if(i == argc)
|
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 */
|
/* Connect Varvara */
|
||||||
system_connect(0x0, SYSTEM_VERSION, SYSTEM_DEIMASK, SYSTEM_DEOMASK);
|
system_connect(0x0, SYSTEM_VERSION, SYSTEM_DEIMASK, SYSTEM_DEOMASK);
|
||||||
system_connect(0x1, CONSOLE_VERSION, CONSOLE_DEIMASK, CONSOLE_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')
|
if(argv[i][0] == '-' && argv[i][1] == 'v')
|
||||||
return system_version("Uxn11 - Graphical Varvara Emulator", "8 Aug 2023");
|
return system_version("Uxn11 - Graphical Varvara Emulator", "8 Aug 2023");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rom_path = argv[1];
|
rom_path = argv[1];
|
||||||
if(!uxn_boot(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8))))
|
if(!uxn_boot(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8))))
|
||||||
return system_error("boot", "Failed");
|
return system_error("boot", "Failed");
|
||||||
|
|
|
@ -498,9 +498,12 @@ writesym(char *filename)
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
int i = 1;
|
||||||
FILE *src, *dst;
|
FILE *src, *dst;
|
||||||
if(argc < 3)
|
if(i == argc)
|
||||||
return !error("usage", "uxnasm input.tal output.rom");
|
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")))
|
if(!(src = fopen(argv[1], "r")))
|
||||||
return !error("Invalid input", argv[1]);
|
return !error("Invalid input", argv[1]);
|
||||||
if(!assemble(src))
|
if(!assemble(src))
|
||||||
|
|
Loading…
Reference in New Issue