6 // initialization function
7 void producer_init(DOLProcess *p) {
10 sprintf(p->local->str, "abcdefghijklmnopqrstuvwxyz");
14 int producer_fire(DOLProcess *p) {
16 if (p->local->index < p->local->len) {
17 if (DOL_wtest((void*)PORT_OUTA, 1, p)) {
18 DOL_write((void*)PORT_OUTA, &(p->local->str[p->local->index]),
20 printf("p write to port A %c\n",
21 p->local->str[p->local->index]);
24 DOL_write((void*)PORT_OUTB, &(p->local->str[p->local->index]),
26 printf("p write to port B %c\n",
27 p->local->str[p->local->index]);