Three primary steps are required to open the parallel device: * Create a message port using createport(). reply messages from the device must be directed to a message port. * Create an extended I/O request structure of type ioextpar using createextio(). createextio() will initialize the i/o request to point to your reply port. * Open the parallel device. Call opendevice(),passing the i/o request. struct MsgPort *ParallelMP; /* Pointer to reply port */ struct IOExtPar *ParallelIO; /* Pointer to I/O request */ if (ParallelMP=CreatePort(0,0) ) if (ParallelIO=(struct IOExtPar *) CreateExtIO(ParallelMP,sizeof(struct IOExtPar)) ) if (OpenDevice(PARALLELNAME,0L,(struct IORequest *)ParallelIO,0) ) printf("%s did not open\n",PARALLELNAME); During the open, the parallel device pays attention to just one flag; PARF_SHARED. For consistency, the other flag bits should also be properly set. Full descriptions of all flags will be given later. When the parallel device is opened, it fills the latest default parameter settings into the ioextpar block.