Technical information

CHAPTER 3
The PC Interface Driver
34
Initializing the Driver
The PC Interface driver provides communication and control between the Macintosh
Operating System (Mac OS) and the DOS Compatibility Card. Programs running on
the Mac OS can use the driver to configure and control the card. Programs in both
environments can use the driver to exchange messages; see the section “Passing
Messages” beginning on page 45.
Initializing the Driver 3
Before you can use the PC Interface driver, your application must initialize it by calling
the
open
routine. Both opening and closing the driver are performed only from the
Mac OS.
Open 3
When you call the
open
routine, it allocates and initializes the driver’s memory, installs
the interrupt handler, and makes patches to the system needed by the driver. The
open
routine initializes all devices to the null device and puts the PC into a reset state.
The
open
routine fails if the driver cannot allocate enough memory or if it cannot find
the DOS Compatibility Card.
Close 3
When you call the
close
routine, it releases all memory allocated to the PC Interface
driver, removes the driver’s interrupt handler, removes any patches installed by the
open
routine, and puts the PC into the reset state.
Configuring the PC 3
A program running on the Mac OS can use the PC Interface driver to configure the PC
on the DOS Compatibility Card. You can use calls to the driver to perform the following
operations:
setting the memory available to the PC
configuring the disk drives available to the PC
setting and reading the status of the network driver
configuring the communications port
configuring the parallel port
defining the key combination that deactivates the PC
The routines that perform those configuration tasks are defined here.