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
+4 -2
+4 -2
View File
@@ -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;
}
}