From 4f846beb26d9852c19f4e445e612ab5c6e3d0021 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 10 May 2024 08:15:53 -0700 Subject: [PATCH 1/3] Fixed issue with comments in macros, fixed by jjbliss --- src/uxnasm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uxnasm.c b/src/uxnasm.c index 762b9a9..b467b64 100644 --- a/src/uxnasm.c +++ b/src/uxnasm.c @@ -184,9 +184,9 @@ makemacro(char *name, FILE *f, Context *ctx) if(c == '%') return error_asm("Macro nested"); if(c == '{') depth++; if(c == '}' && --depth) break; - if(c == '(' && !walkcomment(f, ctx)) - return 0; - else + if(c == '(') { + if(!walkcomment(f, ctx)) return 0; + } else *dictnext++ = c; } *dictnext++ = 0; @@ -409,7 +409,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, 13 Apr 2024.\n"); + if(argc == 2 && scmp(argv[1], "-v", 2)) return !printf("Uxnasm - Uxntal Assembler, 10 May 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; From f44c43b8011b362270437fd00233b2d0c6316ff5 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 30 May 2024 18:37:05 -0700 Subject: [PATCH 2/3] Fixed issue with invalid hexadecimal values --- src/uxnasm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/uxnasm.c b/src/uxnasm.c index b467b64..8ddc63a 100644 --- a/src/uxnasm.c +++ b/src/uxnasm.c @@ -266,12 +266,13 @@ writehex(char *w, Context *ctx) { if(*w == '#') writebyte(findopcode("LIT") | !!(++w)[2] << 5, ctx); - if(w[1] && !w[2]) - return writebyte(shex(w), ctx); - else if(w[3] && !w[4]) - return writeshort(shex(w)); - else - return error_asm("Hexadecimal invalid"); + if(ishex(w)) { + if(w[1] && !w[2]) + return writebyte(shex(w), ctx); + else if(w[3] && !w[4]) + return writeshort(shex(w)); + } + return error_asm("Hexadecimal invalid"); } static int @@ -409,7 +410,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, 10 May 2024.\n"); + if(argc == 2 && scmp(argv[1], "-v", 2)) return !printf("Uxnasm - Uxntal Assembler, 30 May 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; From 01c983bfb73174dd519e204106e1f5b2f91369f8 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 5 Jun 2024 13:38:44 -0800 Subject: [PATCH 3/3] Fixed issue with blank 1px line --- src/devices/screen.c | 2 +- src/uxn11.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/screen.c b/src/devices/screen.c index a9e98bb..cb35342 100644 --- a/src/devices/screen.c +++ b/src/devices/screen.c @@ -289,7 +289,7 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port) /* pixel mode */ else { Uint16 w = uxn_screen.width; - if(rX > 0 && rY > 0 && rX < w && rY < uxn_screen.height) + if(rX >= 0 && rY >= 0 && rX < w && rY < uxn_screen.height) layer[rX + rY * w] = color; screen_change(rX, rY, rX + 1, rY + 1); if(rMX) rX++; diff --git a/src/uxn11.c b/src/uxn11.c index 4ccb8b7..633072a 100644 --- a/src/uxn11.c +++ b/src/uxn11.c @@ -271,7 +271,7 @@ main(int argc, char **argv) int i = 1; char *rom; if(i != argc && argv[i][0] == '-' && argv[i][1] == 'v') { - fprintf(stdout, "Uxn11 - Varvara Emulator, 19 Mar 2024.\n"); + fprintf(stdout, "Uxn11 - Varvara Emulator, 5 Jun 2024.\n"); i++; } rom = i == argc ? "boot.rom" : argv[i++];