named sds's
[mTask.git] / client / interpret.c
index 92e58d1..08a20df 100644 (file)
@@ -16,7 +16,7 @@
 
 #define f16(p) program[pc]*265+program[pc+1]
 
-uint8_t stack[STACKSIZE] = {0};
+uint16_t stack[STACKSIZE] = {0};
 
 void run_task(struct task *t)
 {
@@ -162,6 +162,10 @@ void run_task(struct task *t)
                        sp--;
                        break;
 #endif
+               case BCRETURN: trace("Return");
+                       debug("Task returned");
+                       task_delete(t->taskid);
+                       return;
                default:
                        trace("unrecognized");
                        die("Unrecognized command: %d", program[pc-1]);