milne@ICS.UCI.EDU (Alastair Milne) (04/14/91)
Dear Pascal and Multimedia followers: I have been developing a Turbo Pascal (5.0, 6.0) unit to drive IBM's M-Motion multimedia board through the M-Control program. For the most part, after a rocky beginning, it has been going well, and I have two or three small applications running using this unit. To catch replies coming back from M-Control in response to commands my unit sends, I am keeping a queue of outstanding commands sent, and polling all the destinations every time I go looking for a reply. This has cured a number of communications problems I had toward the beginning, but it's still insufficient, as one might expect. So now I am trying to use M-Control's attachable "Wake Up" routine feature. I am most of the way there: I have the routine (complete with special stack handling to respect M-Control's requirements), and it hooks in properly, and gets called directly by M-Control just as it should. And like magic, lost replies and other synchronisation problems have vanished. But I can't get rid of the WakeUp routine when the application ends!! The M-Control documentation says it gets "deactivated" either with a STOP, a SOFT STOP, or by a SET WAKEUP without parameters. But this seems to last only until the next M-Control application issues a START, at which point M-Control tries to use the Wake Up routine it was given by the previous application. Since that location in memory now has something quite different in it, mayhem ensues, most often in the form of freezing. I have verified that the START *is* trying to call the previously- deactivated WakeUp routine, because in the Turbo Pascal environment (where the code didn't shift and therefore addresses got re-used safely) as soon as the START is issued, a breakpoint I set in the WakeUp routine gets used. So I need to know how to tell M-Control not just to deactivate the WakeUp routine, but to unhook it and forget all about it. As I am getting no response from IBM's Multimedia help line on this, I am turning to the net. Please mail to me (milne@ics.uci.edu or AMILNE@UCI for BINnet), and if there is general interest, I will summarise for the net. Alastair Milne