Important: The information in this document is obsolete and should not be used for new development.
MyCompletionRoutine
When you use theADBOpfunction to send a command to an ADB device, the ADB Manager calls your completion routine when the ADB device has completed the command.
PROCEDURE MyCompletionRoutine; {parameters passed in registers}DESCRIPTION
The ADB Manager passes parameters to a completion routine in registers A0, A1, A2, and D0, as described next.ASSEMBLY-LANGUAGE INFORMATION
On entry to your completion routine, the ADB Manager sets the following registers:
Register Value A0 A pointer to the data area specified by the bufferparameter to theADBOpfunction. This area contains data stored as a Pascal string (maximum 8 bytes of data preceded by one length byte). For example, data returned by an ADB device in response to a Talk command issued by a call to theADBOpfunction can be accessed through this pointer.A1 A pointer to the completion routine. A2 A pointer to the data area that was specified by the dataparameter to theADBOpfunction. Your completion routine can use this area to store information; for example, to set a flag indicating that the command has completed.D0 The ADB command number (byte) that resulted in the completion routine being called. SEE ALSO
See Listing 5-2 on page 5-25 for an example of a completion routine.