APPENDIX G
OS/2 CONFIGURATION

Under OS/2 2.x and OS/2 Warp operating system, the PCCOM device driver provides total 96 ports and baud rate up to 115200. PCCOM also supports device driver for high speed card, and the baud rate can be up to 460800. The device driver works for  8250, 16450, 16550 (FIFO), 16650 etc. User can set up any address to PCCOM 8 port card, and the address must be set to consecutive.

G.1 Installation

The installation procedures are shown in the following.

1.
Add command into CONFIG.SYS file then reboot.

DEVICE=C:\PCCOM8.SYS/Axxx,www /Iyy/Czz /4

ĦExxx     The first I/O port address
ĦEwww  The interrupt vector address
ĦEyy       IRQ3 to IRQ15
ĦEzz       Assign the first port name (1 to 92)
ĦE4        High speed card used only

if "/C" is not use, the first port is COM3.
if option /C1 or /C2 is use, the port COM1 or COM2 is a logical port but not compatible to COM1 or COM2 on a PC machine.
I/O Vector address value has to shift 2 from the original value (ex. 2C0H is replaced by 2C2H).

2.
To set up communication parameters, please use the MODE.COM command from OS/2, or use PCCOM.EXE command. We highly recommend to use PCCOM.EXE command, because MODE.COM can be used only for COM1 to COM9 and for maximum baud rate to 57600.
 
The PCCOM.EXE can be used to set COM1 to COM96. The syntax of PCCOM.EXE is the same as MODE.COM.

ĦEFor example :
1.
Set two cards from COM3 to COM10 and COM11 to COM18.

DEVICE=C:\PCCOM8.SYS /A240 ,2C2/I5 /C3
DEVICE=C:\PCCOM8.SYS /A1A0,1C2 /I7 /C11

2.
Set up communication parameters.

C:\PCCOM  COMx:38400,N,8,1,TO=OFF,XON=OFF,
IDSR=ON, ODSR=ON, OCTS=ON, RTS=OFF,DTR=OFF
C:\PCCOM COMx:115200,N,1


G.2 Utilities

COMTEST.EXE is a general testing program for COM port. It will create the threads associated with each communication port that will be test. The testing function includes Open/Close/Read/Write/Non-Destructive Read/Non-Destructive WRITE/Get Status/Device IOCTL. Due to lack of OS/2 API, Non-Destructive I/O is not support for OS/2 even this device driver has implemented this feature.

In the COMTEST program, you can use up-right arrow to choice the option, and use enter/escape to start/stop the program.

The ComSent/ComRecv are a pair of communication programs for testing the performance of communication port. You have to connect the test ports with a null modem before you test communication port. You can use PCCOM.EXE to change the parameters of communication port. Then use this program to test heavy (transmission) duty on communication port.Ħ@


G.3  API Communication Functions

In the following, there are API communication functions, for more detail information, please refer to Control Program Programming Ref. of OS/2, and programming Guide Vol. I-III of OS/2.

ĦE DosClose - Close a Handle to a File, Pipe, or Devices

#define INCL_DOSFILEMGR APIRET DosClose(HFILE FileHandle);

ĦE DosDevConfig - Get Information about Attached Devices 

#define INCL_DOSPROCESS APIRET DosDevConfig(PVOID pDeviceInfo, ULONG ulDeviceType);

ĦE DosDevIOCtl -Perform Control Function on a Device Specified by an Opened Device Handle

#define INCL_DOSPROCESS APIRET DosDevIOCtl(HFILE DevHandle, ULONG ulCategory, ULONG ulFunction, PVOID pParmList, ULONG ulParmLengthMax, PULONG pParmLengthInOut, PVOID pDataArea, ULONG ulDataLengthMax, PULONG pDataLengthInOut);

ĦE DosOpen - Open a File

#define INCL_DOSFILEMGR APIRET DosOpen(PSZ pszFileName, PHFILE ppFileHandle,  PULONG pActionTaken, ULONG ulFileSize, ULONG ulFileAttribute,ULONG ulOpenFlag, ULONG ulOpenMode,  PEAOP2  ppEABuf);

ĦE DosRead - Read from a File, Pipe, or Device to a Buffer

#define INCL_DOSFILEMGR APIRET DosRead(HFILE FileHandle, PVOID pBufferAre, ULONG ulBufferLength, PULONG pByteRead);

ĦE DosWrite - Write to a File from a Buffer

#define INCL_DOSFILEMGR APIRET DosWrite(HFILE FileHandle, PVOID pBufferArea, ULONG ulBufferLength, PULONG pByteWritte);