value on TOS, matching the behavior of Whitespace.
NTSTSTSTSN | FC: BRZ -> '42'
NNN | FC: Terminate program
NSSVTSTSTSN | FC: Mark label '42'
NTSTSTSTSN | FC: BRZ -> '42'
NNN | FC: Terminate program
NSSVTSTSTSN | FC: Mark label '42'
TNSS | IO: Output character
NNN | FC: Terminate program
TNSS | IO: Output character
NNN | FC: Terminate program
NTTTSTSTSN | FC: BLZ -> '42'
NNN | FC: Terminate program
NSSVTSTSTSN | FC: Mark label '42'
NTTTSTSTSN | FC: BLZ -> '42'
NNN | FC: Terminate program
NSSVTSTSTSN | FC: Mark label '42'
TNSS | IO: Output character
NNN | FC: Terminate program
TNSS | IO: Output character
NNN | FC: Terminate program
switch (next_code_byte(code,pc)) {
case ' ':
/* Jump to a label if TOS == 0 */
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. */
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. */
break;
case '\n':
/* Return from subroutine. */