~rabbits/uxn11

364172ff5b0b2be295917b111346ee885a1c46ab — Devine Lu Linvega 8 months ago 10bb933
(uxnasm) Fixed issue with long hex values
1 files changed, 2 insertions(+), 2 deletions(-)

M src/uxnasm.c
M src/uxnasm.c => src/uxnasm.c +2 -2
@@ 303,7 303,7 @@ parse(char *w, FILE *f, Context *ctx)
	case '@': return makelabel(w + 1, 1, ctx);
	case '&': return makelabel(w, 0, ctx);
	case '}': return makelabel(makelambda(lambda_stack[--lambda_ptr]), 0, ctx);
	case '#': return ishex(w + 1) && writehex(w, ctx);
	case '#': return writehex(w, ctx);
	case '_': return makeref(w + 1, w[0], ptr) && writebyte(0xff, ctx);
	case ',': return makeref(w + 1, w[0], ptr + 1) && writebyte(findopcode("LIT"), ctx) && writebyte(0xff, ctx);
	case '-': return makeref(w + 1, w[0], ptr) && writebyte(0xff, ctx);


@@ 403,7 403,7 @@ main(int argc, char *argv[])
{
	ptr = PAGE;
	copy("on-reset", scope, 0);
	if(argc == 2 && scmp(argv[1], "-v", 2)) return !printf("Uxnasm - Uxntal Assembler, 2 Apr 2024.\n");
	if(argc == 2 && scmp(argv[1], "-v", 2)) return !printf("Uxnasm - Uxntal Assembler, 3 Apr 2024.\n");
	if(argc != 3) return error_top("usage", "uxnasm [-v] input.tal output.rom");
	if(!assemble(argv[1])) return 1;
	if(!resolve(argv[2])) return 1;