Author: jquelin Date: Wed Jan 7 10:31:00 2009 New Revision: 35163 Modified: trunk/languages/befunge/befunge.pir trunk/languages/befunge/flow.pir Log: handling trampoline mode Modified: trunk/languages/befunge/befunge.pir ============================================================================== --- trunk/languages/befunge/befunge.pir (original) +++ trunk/languages/befunge/befunge.pir Wed Jan 7 10:31:00 2009 @@ -151,19 +151,17 @@ FLOW_TOGGLE_STRING_MODE: flow__toggle_string_mode() goto MOVE_PC + FLOW_TRAMPOLINE: + flow__trampoline() + goto MOVE_PC # io instructions IO_PUSH_CHAR: io__push_char() goto MOVE_PC - -=pod - -MAIN_TRAMPOLINE: - set I4, 0 # no more trampoline - -=cut + # instruction executed, now move the pc + MOVE_PC: # reload status & associated vars, that may have # changed in the subs Modified: trunk/languages/befunge/flow.pir ============================================================================== --- trunk/languages/befunge/flow.pir (original) +++ trunk/languages/befunge/flow.pir Wed Jan 7 10:31:00 2009 @@ -45,7 +45,7 @@ .end -# ** string mode +# ** flag handling # # toggle string mode. @@ -67,6 +67,16 @@ .end +# +# remove trampoline flag. +# befunge stack unchanged. +# +.sub "flow__trampoline" + $P0 = get_global "status" + $P0["flag"] = 0 + set_global "status", $P0 +.end + =pod FLOW_GO_AWAY: