Specifications
CHAPTER 4
Software Support
56 Initializing the Interface Driver
The interface driver for the 12” and 7” PC Compatibility Cards controls communication
between them and the Mac OS (Macintosh Operating System). Applications running on
the Mac OS can use the driver to configure and control the cards. Applications running
in both environments can use the driver to exchange messages.
This chapter describes the routines that allow you to initialize the driver, configure the
PC system, make control and status calls, and pass messages between the Mac OS and
the PC driver. You should also refer to Inside Macintosh: Devices for information about
opening and closing the interface driver.
Note
When installed in a Macintosh computer, the 12” and 7” cards
implement PC functions, that is, the functions of a Pentium-based or
5x86-based computer. For the sake of brevity, these functions are
referred to in this chapter as the PC system. Figure 1-1 on page 3
summarizes the PC system functions implemented by the cards.
◆
Initializing the Interface Driver 4
Before you can use the interface driver, your application must initialize it by calling an
open routine. When initialization is complete, the application calls a close routine. You
can open and close the driver only from the Mac OS. The name of the driver is
"\p.Symbiosis".
Opening the Driver 4
The driver must be open before your application can communicate with it. As described
in Inside Macintosh: Devices, there are various ways of opening drivers. The two principal
ways are OpenDriver and PBOpen. In this case, PBOpen is the preferred way.
When you call the PBOpen routine, it opens the driver specified by the name parameter,
"\p.Symbiosis". The routine allocates and initializes the driver’s memory, installs the
interrupt handler, and makes patches to the system as needed by the driver. The PBOpen
routine initializes all devices to the null device and puts the PC system into a reset state.
The PBOpen routine fails if the driver cannot allocate enough memory or if it cannot find
the 12” or the 7” card.
Closing the Driver 4
When you have finished communicating with the driver, you can close it using either the
CloseDriver or PBClose routine. It is preferable to use PBClose. When you call the
PBClose routine, it releases all memory allocated to the interface driver, removes the
driver’s interrupt handler, removes any patches installed by the open routine, and puts
the PC system into a reset state.