From cc01942b5b157b96b9ec52f3c4c6b2165a63b44c Mon Sep 17 00:00:00 2001 From: mrbobbyguy <84521318+somerandomviolinkid@users.noreply.github.com> Date: Sat, 5 Sep 2026 21:10:17 -0500 Subject: [PATCH] make output work on linux hopefully --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 37a8c56..1392ff2 100644 --- a/main.c +++ b/main.c @@ -294,6 +294,8 @@ void execute() { putchar(cpu.regFile[0] & 0xFF); cpu.pc++; } + + putchar('\n'); cpu.pc = cpu.regFile[7]; break; @@ -407,7 +409,7 @@ int assemble() { return -4; } - if (sscanf(tokens[1], "%x", &instruction) != 1) { + if (sscanf(tokens[1], "%hX", &instruction) != 1) { printf("Wrong token on line %d!\n", lineCount); return -3; } @@ -884,4 +886,4 @@ int main(int argc, char** argv) { } return 0; -} \ No newline at end of file +}