Article View: comp.sys.atari.st
Article #1756Problems with appl_write AES function
From: Jean-Paul Bodeveix
Date: Tue, 13 Jun 1989 08:30
Date: Tue, 13 Jun 1989 08:30
72 lines
1977 bytes
1977 bytes
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
Technical Details
Message-ID:
<502@lri.lri.fr>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!inria!crcge1!lri!jpbShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!inria!crcge1!lri!jpb From: jpb@lri.lri.fr (Jean-Paul Bodeveix) Newsgroups: comp.sys.atari.st Subject: Problems with appl_write AES function Message-ID: <502@lri.lri.fr> Date: 13 Jun 89 08:30:44 GMT Sender: jpb@lri.lri.fr Lines: 72