You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure of the usefullness of these words, but it was fun trying to figure them out.
stop-task will stop a running task. It's actually a suspend, as you can restart the task and then the stopped task will continue where it left off. It just takes the task out of the circular task list. ie: mytask stop-task
: stop-task ( t -- ) task-list @ begin 2dup @ = if swap @ swap ! exit then @ dup task-list @ = until ;
.ts works like .s but for a task. If your task has a pause in it to allow the webui to stay responsive, then .ts will show the stack at the pause and print the name of the next word after the pause. If I have multiple pauses, then I usually define empty marker words like : mark1 ; and place this after each pause so that .ts will indicate at which mark it is at, using a different mark word for each pause. ie: mytask .ts
: tdepth ( t -- n ) dup 4 + @ swap 8 + - cell/ ; ( current stack depth for a task )
: .ts ( t -- ) dup dup ." <" tdepth 1 - n. ." > " tdepth 0 max for aft dup 4 + @ r@ cells - @ r@ 0= if ." -> " @ @ >name type else . then then next drop ;
Output example: <4> 2 66 7 1 -> mark1
The text was updated successfully, but these errors were encountered:
I'm not sure of the usefullness of these words, but it was fun trying to figure them out.
stop-task will stop a running task. It's actually a suspend, as you can restart the task and then the stopped task will continue where it left off. It just takes the task out of the circular task list. ie:
mytask stop-task
: stop-task ( t -- ) task-list @ begin 2dup @ = if swap @ swap ! exit then @ dup task-list @ = until ;
.ts works like .s but for a task. If your task has a pause in it to allow the webui to stay responsive, then .ts will show the stack at the pause and print the name of the next word after the pause. If I have multiple pauses, then I usually define empty marker words like : mark1 ; and place this after each pause so that .ts will indicate at which mark it is at, using a different mark word for each pause. ie:
mytask .ts
Output example:
<4> 2 66 7 1 -> mark1
The text was updated successfully, but these errors were encountered: