mirror of
https://github.com/Alvin-Zilverstand/bob16.git
synced 2026-11-21 12:52:59 +01:00
make output work on linux hopefully
This commit is contained in:
1 parent
f71f008aee
commit
cc01942b5b
1 file changed
+4
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user