From 3038d5c40bff2a9be933cf00c17c1fc98f4b3060 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 17 Apr 2023 11:27:54 -0700 Subject: [PATCH] (console) Use 0x00 for no-queue --- projects/examples/devices/console.tal | 2 +- src/devices/system.h | 2 +- src/uxncli.c | 2 +- src/uxnemu.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/examples/devices/console.tal b/projects/examples/devices/console.tal index fa8a1f1..bfb195f 100644 --- a/projects/examples/devices/console.tal +++ b/projects/examples/devices/console.tal @@ -14,7 +14,7 @@ ( print hello ) ;hello-txt pstr ( when arguments are queued ) - .Console/type DEI #01 EQU ?&no-queue + .Console/type DEI #00 EQU ?&no-queue ;queue-txt pstr &no-queue diff --git a/src/devices/system.h b/src/devices/system.h index 449c4eb..9059736 100644 --- a/src/devices/system.h +++ b/src/devices/system.h @@ -11,7 +11,7 @@ WITH REGARD TO THIS SOFTWARE. #define RAM_PAGES 0x10 -#define CONSOLE_STD 0x0 +#define CONSOLE_STD 0x1 #define CONSOLE_ARG 0x2 #define CONSOLE_EOA 0x3 #define CONSOLE_END 0x4 diff --git a/src/uxncli.c b/src/uxncli.c index 2799b7f..56d0b8e 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -52,7 +52,7 @@ main(int argc, char **argv) return system_error("Boot", "Failed"); if(!system_load(&u, argv[i++])) return system_error("Load", "Failed"); - u.dev[0x17] = i == argc; + u.dev[0x17] = i != argc; if(!uxn_eval(&u, PAGE_PROGRAM)) return u.dev[0x0f] & 0x7f; for(; i < argc; i++) { diff --git a/src/uxnemu.c b/src/uxnemu.c index d83978e..85b13bf 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -495,7 +495,7 @@ main(int argc, char **argv) /* load rom */ if(i == argc) return system_error("usage", "uxnemu [-2x][-3x] file.rom"); - u.dev[0x17] = i == argc - 1; + u.dev[0x17] = i != argc - 1; if(!start(&u, argv[i])) return system_error("Start", "Failed"); rom_path = argv[i++];