Merge remote-tracking branch 'upstream/main' into d6/subprocess-jun2024
This commit is contained in:
commit
0c17487732
|
@ -289,7 +289,7 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
|
||||||
/* pixel mode */
|
/* pixel mode */
|
||||||
else {
|
else {
|
||||||
Uint16 w = uxn_screen.width;
|
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;
|
layer[rX + rY * w] = color;
|
||||||
screen_change(rX, rY, rX + 1, rY + 1);
|
screen_change(rX, rY, rX + 1, rY + 1);
|
||||||
if(rMX) rX++;
|
if(rMX) rX++;
|
||||||
|
|
|
@ -302,7 +302,7 @@ main(int argc, char **argv)
|
||||||
int i = 1;
|
int i = 1;
|
||||||
char *rom;
|
char *rom;
|
||||||
if(i != argc && argv[i][0] == '-' && argv[i][1] == 'v') {
|
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++;
|
i++;
|
||||||
}
|
}
|
||||||
rom = i == argc ? "boot.rom" : argv[i++];
|
rom = i == argc ? "boot.rom" : argv[i++];
|
||||||
|
|
21
src/uxnasm.c
21
src/uxnasm.c
|
@ -184,9 +184,9 @@ makemacro(char *name, FILE *f, Context *ctx)
|
||||||
if(c == '%') return error_asm("Macro nested");
|
if(c == '%') return error_asm("Macro nested");
|
||||||
if(c == '{') depth++;
|
if(c == '{') depth++;
|
||||||
if(c == '}' && --depth) break;
|
if(c == '}' && --depth) break;
|
||||||
if(c == '(' && !walkcomment(f, ctx))
|
if(c == '(') {
|
||||||
return 0;
|
if(!walkcomment(f, ctx)) return 0;
|
||||||
else
|
} else
|
||||||
*dictnext++ = c;
|
*dictnext++ = c;
|
||||||
}
|
}
|
||||||
*dictnext++ = 0;
|
*dictnext++ = 0;
|
||||||
|
@ -266,12 +266,13 @@ writehex(char *w, Context *ctx)
|
||||||
{
|
{
|
||||||
if(*w == '#')
|
if(*w == '#')
|
||||||
writebyte(findopcode("LIT") | !!(++w)[2] << 5, ctx);
|
writebyte(findopcode("LIT") | !!(++w)[2] << 5, ctx);
|
||||||
if(w[1] && !w[2])
|
if(ishex(w)) {
|
||||||
return writebyte(shex(w), ctx);
|
if(w[1] && !w[2])
|
||||||
else if(w[3] && !w[4])
|
return writebyte(shex(w), ctx);
|
||||||
return writeshort(shex(w));
|
else if(w[3] && !w[4])
|
||||||
else
|
return writeshort(shex(w));
|
||||||
return error_asm("Hexadecimal invalid");
|
}
|
||||||
|
return error_asm("Hexadecimal invalid");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -409,7 +410,7 @@ main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
ptr = PAGE;
|
ptr = PAGE;
|
||||||
copy("on-reset", scope, 0);
|
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, 30 May 2024.\n");
|
||||||
if(argc != 3) return error_top("usage", "uxnasm [-v] input.tal output.rom");
|
if(argc != 3) return error_top("usage", "uxnasm [-v] input.tal output.rom");
|
||||||
if(!assemble(argv[1])) return 1;
|
if(!assemble(argv[1])) return 1;
|
||||||
if(!resolve(argv[2])) return 1;
|
if(!resolve(argv[2])) return 1;
|
||||||
|
|
Loading…
Reference in New Issue