update debug

This commit is contained in:
Elias Bennour 2023-12-09 22:43:53 +01:00
parent c0a5e694c0
commit a8999f4ec2

1
njvm.c
View File

@ -169,6 +169,7 @@ void execute(struct program program) {
case CALL:
if (debug == 1) printf("call: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
push(stack, i + 1);
if (debug == 1) printf("push: %i\n", i + 1);
i = SIGN_EXTEND(IMMEDIATE(program.program[i])) - 1;
if (debug == 1) printf("new i: %i\n", i);
break;