jpb@lri.lri.fr (Jean-Paul Bodeveix) (06/13/89)
I try to write two AES programs communicating via messages, one of them being a desk accessory. I have compiled the two programs with different C compilers and run them with different ROM versions, but i always obtain three bombs during the context switch. /******* The desk accessory ***********/ extern int16 gl_apid; int16 buffer[8]; main() { int event, menu_acc; appl_init(); menu_acc = menu_register (gl_apid, " My accessory "); for (;;) { event = evnt_mesag (buffer); switch (buffer[0]) { case AC_OPEN: if (buffer[4] == menu_acc) form_alert (...); break; case AC_CLOSE: break; case default: form_alert (1, "[1][Message received][ok]"); /**** I never get this message ****/ break; } } } /****** The user program *****/ char buf[100]; int16 mess[] = {100, 0}; main() { int sid; appl_init(); sid = appl_find ("ACC "); /* The name of the accessory */ sprintf (buf, "[1][Id = %d][ok]", sid); form_alert (1, buf); /* I get this message and the good ID */ appl_write (sid, 4, mess); form_alert (1, "[1][Message sent][ok]"); evnt_timer(0,0); /* context switch */ /** ==> three bombs: the process list has been damaged */ } /*********************************************************/ Is it a bug in the program or a (known?) AES bug? Is there another mean to send such a message? More generally, is there a (simple) mean to wake up a task after an interrupt (for example from the AUX port)? Thanks in advance for any response. Jean-Paul Bodeveix LRI- bat 490 91405 ORSAY FRANCE email: jpb@lri.lri.fr