make output work on linux hopefully

This commit is contained in:
mrbobbyguy authored and GitHub committed 2026-09-05 21:10:17 -05:00
1 parent f71f008aee
commit cc01942b5b
1 file changed
+3 -1
+3 -1
View File
@@ -295,6 +295,8 @@ void execute() {
cpu.pc++; cpu.pc++;
} }
putchar('\n');
cpu.pc = cpu.regFile[7]; cpu.pc = cpu.regFile[7];
break; break;
case GETS: case GETS:
@@ -407,7 +409,7 @@ int assemble() {
return -4; return -4;
} }
if (sscanf(tokens[1], "%x", &instruction) != 1) { if (sscanf(tokens[1], "%hX", &instruction) != 1) {
printf("Wrong token on line %d!\n", lineCount); printf("Wrong token on line %d!\n", lineCount);
return -3; return -3;
} }