diff --git a/njvm.c b/njvm.c index 4d9e0ed..1f81d06 100644 --- a/njvm.c +++ b/njvm.c @@ -105,10 +105,8 @@ void execute(struct program program) { *stack.current = *stack.current + SIGN_EXTEND(IMMEDIATE(program.program[i])); break; case RSF: - if (debug == 1) printf("rsf\n"); - if (debug == 1) printf("pop: %i\n", peek(stack, 1)); - *stack.current = fp + 2; - if (debug == 1) printf("pop: %i\n", peek(stack, 1)); + if (debug == 1) printf("rsf: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i]))); + *stack.current = fp; fp = pop(stack); break; case POPL: