update debug
This commit is contained in:
parent
c0d25212af
commit
27400289f5
9
njvm.c
9
njvm.c
@ -149,17 +149,22 @@ void execute(struct program program) {
|
||||
case BRF:
|
||||
if (debug == 1) printf("brf: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
|
||||
if (debug == 1) printf("pop: %i\n", peek(stack, 1));
|
||||
if (pop(stack) == 0)
|
||||
if (pop(stack) == 0) {
|
||||
i = SIGN_EXTEND(IMMEDIATE(program.program[i]));
|
||||
if (debug == 1) printf("new i: %i\n", i);
|
||||
}
|
||||
break;
|
||||
case BRT:
|
||||
if (debug == 1) printf("brt: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
|
||||
if (debug == 1) printf("pop: %i\n", peek(stack, 1));
|
||||
if (pop(stack) == 1)
|
||||
if (pop(stack) == 1) {
|
||||
i = SIGN_EXTEND(IMMEDIATE(program.program[i]));
|
||||
if (debug == 1) printf("new i: %i\n", i);
|
||||
}
|
||||
case JMP:
|
||||
if (debug == 1) printf("jmp: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
|
||||
i = SIGN_EXTEND(IMMEDIATE(program.program[i]));
|
||||
if (debug == 1) printf("new i: %i\n", i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user