+ uint8_t c = read16();
+ struct task *t = NULL;
+ while(t != NULL){
+ if(t->taskid == c){
+ break;
+ }
+ t = task_next(t);
+ }
+ if(t != NULL){
+ //We found the task, now we move everything from the end of the task up
+ //to the spacepointer right
+ uint8_t *start = (uint8_t *)t;
+ uint8_t *end = start + sizeof(struct task) + t->tasklength;
+ debug("Moving %lu bytes\n", spacepointer-end);
+ for(int i = 0; i<spacepointer-end; i++){
+ start[i] = end[i];
+ }
+
+ //Decrement the spacepointer
+ spacepointer -= end-start;
+
+ if(t == head){
+ head = task_next(t);
+ }
+
+ //Write acknowledgement
+ write_byte('d');
+ write16(c);
+ write_byte('\n');
+ }