Specifications

CHAPTER 4
Software Support
72 Passing Messages
Passing Messages 4
Applications running on the Mac OS and the PC system can send messages to each other
by calling the interface driver. Applications can also install a receive procedure for
receiving messages. When the interface driver receives a message that is intended for
your application, the driver calls your receive procedure. Your procedure then decides
whether or not to accept the data in the message and, if it accepts the data, where to
store it.
The registers referenced in the following sections are registers in the Pentium and 5x86
processors on the 12” and 7” PC Compatibility Cards. Registers AX, BX, CX, DX, DI, SI,
ES, and DS are to x86 processors what the D0-7 and A0-7 registers are to 68K processors.
Message Conventions 4
Before communication can take place, an application running on the Mac OS and an
application running on the PC system must have the same definitions of the messages
they transfer. A message consists of a message parameter block containing up to 64 KB of
data. The parameters and the data can consist of any data in any format. The command
must be a unique value recognized by the applications on the Mac OS and the PC system
that are sending and receiving messages. These applications must request command
numbers from the interface driver before sending messages.
Macintosh Interface 4
Applications running on the Mac OS communicate with the interface driver through
driver calls. Your application should first open the driver using the open call and then
use the control routines described in the following sections to register, send, and receive
messages.
PC System Interface 4
Applications running on the PC system communicate with the interface driver through a
software interrupt interface. The application loads registers with appropriate values,
including a function selector in register AH, and then calls the interface driver with an
INT 5Fh call. PC system applications can determine whether the interface driver is
available by calling INT 5Fh with register AH = 0. If the interface driver is installed, it
returns 0A5h in register AH and the highest implement function code (currently 4) in
register AL.
Registering Messages 4
For an application on the Mac OS to send messages to an application on the PC system,
both applications must register their messages with the interface driver. This is done by