switch (next_code_byte(code,pc)) {
case ' ':
/* Jump to a label if TOS == 0 */
- /* TODO: Does WS pop or peek the TOS? */
- if (stack_peek(sp,0) == 0) *pc = labels[parse_label(code, pc)];
+ if (stack_pop(sp) == 0) *pc = labels[parse_label(code, pc)];
break;
case '\t':
/* Jump to a label if TOS < 0. */
- /* TODO: Does WS pop or peek the TOS? */
- if (stack_peek(sp,0) < 0) *pc = labels[parse_label(code, pc)];
+ if (stack_pop(sp) < 0) *pc = labels[parse_label(code, pc)];
break;
case '\n':
/* Return from subroutine. */
exit(EXIT_FAILURE);
unset_terminal_mode();
}
-// TODO: Have the SIGTERM signal handler and normal term point return the value
-// on TOS so I can do rudimentary automated tests.
/* Decode the IMPs */
switch (ws_code_space[pc++]) {