commit 202ca788009978a204dbb0d6892eea89315828d5
parent de4a534bf4ba7841e00ff524db6d21ab1af7bbb5
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Sun, 25 Feb 2024 16:06:54 -0800
(uxnasm) Added support for partial label jsi
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/projects/examples/gui/timer.tal b/projects/examples/gui/timer.tal
@@ -32,9 +32,9 @@
BRK
&on-second ( -> )
[ LIT2 00 _&frame ] STR
- [ LIT2 ff &time $1 ] ADD DUP ?{ Timer/end }
+ [ LIT2 ff &time $1 ] ADD DUP ?{ /end }
,&time STR
- Timer/<draw> BRK
+ /<draw> BRK
&start ( -- )
[ LIT2 0f _&time ] STR
[ LIT2 00 _&paused ] STR
diff --git a/src/uxnasm.c b/src/uxnasm.c
@@ -195,7 +195,7 @@ makereference(char *scope, char *label, char rune, Uint16 addr)
if(label[0] == '{') {
p.lambda_stack[p.lambda_ptr++] = p.lambda_count;
scpy(makelambda(p.lambda_count++), r->name, 0x40);
- } else if(label[0] == '&') {
+ } else if(label[0] == '&' || label[0] == '/') {
if(!sublabel(subw, scope, label + 1))
return error("Invalid sublabel", label);
scpy(subw, r->name, 0x40);
@@ -502,7 +502,7 @@ 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, 24 Feb 2024.\n");
+ return !fprintf(stdout, "Uxnasm - Uxntal Assembler, 25 Feb 2024.\n");
if(!(src = fopen(argv[1], "r")))
return !error("Invalid input", argv[1]);
if(!assemble(src))