DOS BASED APPLICATION SUPPORTS FOR A CONTROLLERLESS MODEM

Abstract: DOS application programs are accommodated when using a controllerless modem by providing a virtual device driver. The virtual device driver emulates UART to UART communications and handles interrupts by the DOS applications and by a hardware port managed by the controllerless modem. In one implementation, the virtual device driver shares a communications interface in common with 32-bit applications. In a communication system environment, DOS applications can participate in modem to modem communications with remote DTEs and with other devices using the services of the virtual device driver.

Description: DOS BASED APPLICATION SUPPORTS FOR A CONTROLLERLESS MODEM TECHNICAL FIELD OF THE INVENTION The invention relates to communications systems, and, more particularly to DOS-based application support for a controllerless modem. CROSS REFERENCE TO RELATED APPLICATIONS This application is related to Application Serial No. 08/774,648, filed December 30, 1996, in the name of Richard P. Tarquini and entitled REAL TIME SERVICES IN BACK ARDLY COMPATIBLE OPERATING SYSTEMS, which is hereby incorporated by reference in its entirety. This application is also related to Application Serial No. 08/832,622 filed March 31, 1997 in the names Jim Bader, Scott Deans, Rob Miller, Richard P. Tarquini, Bankim ani and Jack Waters and entitled CONTROLLERLESS MODEM, which is hereby incorporated by reference in its entirety. BACKGROUND OF THE INVENTION Computers which use a modem for communications are well-known in the art. Communications between a computer and a modem typically occurs over a universal asynchronous receiver transmitter (UART) link. Modems can be connected to computers by inserting a modem card into a bus connector for connecting to the computer bus directly (an internal modem) or can be connected over a communications port (an external modem) . Internal and external modems of the prior art typically have an onboard processor or controller for managing data protocols and transfers. The existence of an onboard processor is necessary, in the prior art, in order to ensure that modem functions get adequate processing time. The need for a dedicated processor is particularly acute in a multi-tasking computer system in which a plurality of tasks may be running simultaneously. If those tasks fail to relinquish the processor to a modem application in a timely fashion, data characters will be lost and a data transfer can be aborted. The provision of a separate processor or controller to run a modem, merely to ensure adequate processing power for modem tasks, is expensive and provides redundant capabilities to those which already exist on a computer hosting the modem. The host has its own processor, bus and system clock. Providing these redundantly in a modem provides additional costs which would be obviated if a modem could utilize the host processor capabilities in a controllerless modem implementation. Such an implementation would ideally handle legacy DOS applications as well as 16 bit and 32 bit applications. SUMMARY OF THE INVENTION In accordance with the invention, methods, apparatus systems and computer program products are provided which enable a virtual device driver to control communications from a DOS application over a controllerless modem. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1A is an illustration of a computer suitable for use in carrying out the invention. Figure IB is a block diagram of an exemplary bus architecture suitable for carrying out the invention. Figure 1C is an illustration of an exemplary memory medium suitable for storing program information and data. Figure ID is a block diagram of computer-to-computer communications . Figure 2 is a block diagram showing exemplary software and hardware relationships between a computer (DTE) and a modem (DCE) of the prior art. Figure 3 is a block diagram showing the transition from a traditional modem with external controller to a controllerless modem. Figure 4 is a block diagram of one way of implementing support for DOS applications in a controllerless modem environment in accordance with one aspect of the invention. Figure 5 is a block diagram of the preferred way implementing support for DOS applications in a controllerless modem environment, using a controllerless modem DOS box support (CLM DBS) virtual device driver (VxD) in accordance with another aspect of the invention. Figure 6 is a block diagram of registers used in implementing a CLM DBS VxD. Figure 7 is a table showing addressing of the registers shown in Figure 6. Figure 8 is an illustration of the contents of an Interrupt Enable Register. Figure 9 is an illustration of the contents of an Interrupt Identification Register. Figure 10 is a table of the bit maps and priorities of the five possible interrupt sources . Figure 11 is an illustration of the contents of a FIFO Control Register. Figure 12 is an illustration of the contents of a Line Control Register. Figure 13 is an illustration of the contents of a Modem Control Register. Figure 14 is an illustration of the contents of a Line Status Register. Figure 15 is an illustration of the contents of a Modem Status Register. Figure 16 is a flow chart of a process used to handle sending interrupts to the DOS virtual machine (VM) . Figure 17 is a flow chart of a process used to load the CLM DBS VxD and to load the port driver VxD. DETAILED DESCRIPTION OF THE INVENTION Figure 1A is an illustration of an exemplary computer of a type suitable for use in carrying out the invention. Figure 1A illustrates a computer system having a processor unit 100, a display unit 120, a keyboard 130, and an input/output device, such as a mouse 140. One or more disk drives 110A and HOB may be provided in the processor unit 100 to facilitate the storage and retrieval of information. One of these may be a hard drive (not shown) or drives utilizing removable media such as floppy drives or CD ROM drives . Figure IB is a block diagram of an exemplary computer bus architecture of a type suitable for carrying out the invention. A bus 150 connects a central processing unit 155 to other elements of a computer processor system 100. An interface 145 connects external input/output devices such as keyboard 130 and mouse 140. A display interface 125 is also connected to the bus and interfaces the computer display 120 to the central processing unit and to other devices. In this exemplary embodiment, read only memory (ROM) 160 and random access memory (RAM) 165 provides storage of program and data information utilized by the CPU 155. A disk controller 170 permits information to be read from and written to mass storage such as optical memory 171, hard drive 172 and floppy drive 173. A communications port 185 provides a communications interface between external devices and the computer bus 150. An internal modem 180 connects directly to the bus 150 of the computer. The communications port may optionally be utilized to connect to an external modem 190 if an external modem is utilized either in lieu of or as supplemental to internal modem 180. Figure 1C is an illustration of an exemplary memory medium suitable for storing program and data information in accordance with the invention. In the example shown, program and data information are stored on a floppy disk 195. Figure ID is a block diagram of computer-to-computer communications. Historically, a terminal or computer driving a modem is referred to as data terminal equipment (DTE) such as DTE 195 shown in Figure ID. The data terminal equipment interfaces with data communications equipment (DCE) 196 and DCE 196 connects with DCE 196' across a communications link. The DCE at the other end (196') connects with its own receiving host DTE 195'. DCEs are typically modems and the interface specifications which describe how a computer interacts with a modem are standardized and well-known. Similarly, the way that two DCEs interact when passing data is also standardized and known. The communications may occur by direct connection or over a network. Figure 2 is a block diagram showing exemplary software and hardware relationships between a computer (DTE) and a modem (DCE) of the prior art. On the computer side, an application program 200, such as terminal software used for controlling communications, runs over an operating system layer 210. The operating system provides a consistent interface to certain lower level services as is known in the art. In this case, the application system layer 200 interfaces a port driver 215 which controls a universal asynchronous receiver transmitter (UART) 220. When the computer is connected to a modem, either an internal or an external modem, the UART from the computer 220 connects to a UART 230 in the modem. That way, data and instructions are sent from the computer to the modem. Data and instructions from the UART are processed by a block of modem code 235 which may vary from manufacturer to manufacturer of modems. The modem code controls the modem hardware 245 via a hardware driver 240 to send and receive data to and from the modem communications line. Although not expressly shown in Figure 2, modems, be they internal or external, typically have their own processor, bus and supporting hardware for running the modem code 235 and for carrying out the other functions required in the modem. Figure 3 is a block diagram showing the transition from a traditional modem with external controller to a controllerless modem. A communications application 300 and port driver 315 operate as shown in corresponding blocks in Figure 2. However, the hardware UARTs of Figure 2 are replaced with a software emulation of a UART to UART link shown at block 320. The modem code and hardware driver shown at 340 and the hardware 345 operate as shown before. By replacing UART to UART communications with a UART emulation layer, minimal change is required to the other software layers. Specifically, minimal changes are required to the existing modem code as well as to the host suite of software. CPU timing is preferably guaranteed by using a virtual device driver as described in the aforesaid U.S. Patent Application Serial No. 08/774,648. Figure 4 is a block diagram of an implementation providing support for DOS applications in a controllerless modem environment in accordance with one aspect of the invention. 16-bit Windows applications 400 and 32-bit Windows applications 410 connect to a virtual device driver 420 such as VCOMM.VxD. A controllerless modem 430 such as the controllerless modem VxD of the aforesaid application includes port driver and serial port emulation layers operating between virtual device driver 420 and hardware 435. In this approach to managing DOS application communications, DOS applications 440 are connected to a virtual communications device 445, which operates as an interface between the DOS application and serial port emulation. Thus, data passes from DOS application 440 through the VCD 445 to the serial port emulation layer of the controllerless modem 430. Since interrupts need to be handled as well as data, a virtual programmable interrupt device 450 receives interrupts intercepted by the virtual communications device 445 and passes them to the serial port emulation layer of controllerless modem 430. Since there may be contention for the controllerless modem, the virtual communications device 445, the virtual device driver 420 and the controllerless modem 430 manage competing requests for services. Interrupts from hardware 435 are passed over the serial port emulation layer of the controllerless modem to the virtual programmable interrupt device 450 and, if needed, through VCD 445 to the DOS application 440. Using a traditional controller based modem in a modem operating system such as Windows 95, a DOS application hooks the standard serial port hardware interrupts and issues reads and writes to the standard I/O ports. In a controllerless modem, such as shown in Figure 5, the standard serial port interface is replaced with a non- standard hardware interface. Controllerless modem virtual device driver 530 is supplied to interface to the non- standard hardware. To support DOS applications, a port virtualization virtual device driver 550 will be put in place of VCD 445. From here on this virtual device driver 530 will be referenced to as CLM DBS. As shown in Figure 5, CLM DBS will redirect I/O accesses to a communications interface 520 such as VCOMM and generate hardware interrupts to the DOS application. VCOMM in turn interfaces with the controllerless modem. The CLM DBS will emulate the critical functionality of a UART allowing a DOS application to read and write to standard I/O port addresses and to install interrupt handlers for standard serial port interrupts. The Windows 16-bit and 32-bit applications 500 and 510 interface the controllerless modem VxD 530 through VCOMM 520 as shown in Figure 5. Similarly, hardware 535 interfaces the controllerless modem 530 and exchanges data and interrupts with it. DOS applications, such as DOS application 540 interface the virtual device driver 520 over a virtual device driver entitled controllerless modem DOS box support (CLM DBS) 550. CLM DBS 550 is the preferred form of the invention and it is described in considerable detail hereinafter. The registers of the CLM DBS are accessible by VCOMM and the controllerless modem. CLM DBS 550 lets DOS applications think it is talking directly to a UART. Although one embodiment is described in detail hereinafter, various implementations may differ in which functionality is allocated to the CLM VxD, VCOMM.VxD and CLM DBS without departing from the spirit of the invention. In addition to sending to a controllerless modem 530 over VCOMM, the CLM DBS can equally well control a real mode output or control arbitrary port device drivers. The preferred arrangement is shown. Figure 6 is a block diagram of registers used in implementing a CLM DBS 550. Starting with the base address of the emulated UART, eight addresses are available allowing access to a total of twelve registers. Some registers share a common address and are differentiated by the state of the divisor latch access bit (DLAB) and whether the I/O access is a read or write operation. Figure 7 lists the twelve UART registers that are to be emulated. Figure 7 shows the internal data flow of the emulated UART registers in the CLM DBS. Because of the lack of a real UART, certain registers will not necessarily have any functionality beyond that of storing a value set by the DOS application. The following sections summarize the function of each register. The Receive Buffer Register 665 is a read only register that DOS applications will read to retrieve data received by CLM DBS from VCOMM 680. CLM DBS is responsible for buffering data when FIFO mode is enabled. The size of the data buffer is determined for each particular implementation. The Transmitter Holding Register 615 is a write only register that DOS applications will write to in order to send a byte of data to the modem. CLM DBS is responsible for buffering data when FIFO mode is enabled. The size of the data buffer is also determined for each particular implementation. As shown in Figure 8, bits 0 - 3 of the Interrupt Enable Register 625 are used to enable the four types of interrupts supported by the UART. An interrupt is enabled by setting the corresponding bit to 1. As shown in Figure 9, the Interrupt Identification Register (IIR) 635 is a read only register that identifies the source of the UART interrupt. Multiple interrupt sources can be active simultaneously, thus the highest priority pending interrupt is reported at the time the DOS application reads the IIR. Note that the interrupt pending bit (bit 0) is active low. Figure 10 shows the bit-maps and priorities of the five possible interrupt sources. Priorities range from 0 to 3 with 0 being the highest . The CLM DBS emulates how a real UART with a hardware interrupt line would appear to a DOS application. As shown in Figure 11, the FIFO Control Register 640 is a write only register used to enable the FIFOs, clear the FIFOs, set the RCVR FIFO trigger level, and select the type of DMA signaling. As in a traditional UART, transmit and receive buffers of 16 bytes each will be supported. Receive character time-outs will be supported with timer values appropriate to a particular implementation. As shown in Figure 12, the Line Control Register 645 (LCR) is used to configure the asynchronous data communications exchange and set the Divisor Latch Access Bit (DLAB) . In the CLM DBS only bits 6 and 7 are meaningful. When bit 7 is set to 1, registers 0 and 1 become Divisor Latch LSB and MSB respectively. Bit 6 is used to send breaks to VCOMM. The other six bits in the LCR need only be saved during a write to LCR and reported during a read from the LCR. As shown in Figure 13, the Modem Control Register 650 is used to control the interface with the modem. Bits 0 and 1 control DTR and RTS respectively and when changed the appropriate information should be passed along to VCOMM. Bits 2 and 3 should be saved but can be ignored. Bit 4 is used to provide a local loopback diagnostic test. Local loopback can be optionally implemented in CLM DBS. As shown in Figure 14, the Line Status Register 655 is used to report status of the data transfer to the DOS application. Because of the parallel interface with VCOMM, bits 2 and 3 will always be set to 0. As shown in Figure 15, the Modem Status Register 660 provides the current state of the control lines as reported by VCOMM. Bits 0 - 3 are used to indicate that bits 4 - 7, respectively, have changed since the last read operation. The Scratch Register 665 does not affect the UART and is only necessary for compatibility. Any value written to this register should be saved and returned upon a read to this register. The two Divisor Latch registers 670 and 675 are normally used to program the baud rate. Since the CLM DBS communicates directly with VCOMM, baud rate is meaningless. However, it is necessary to save values written to these registers to be reported during read operations. These values will also be used to set any necessary timers for simulating transmit and receive propagation delays. To calculate baud rates, it will be assumed that the input crystal is 1.84322 MHz. Figure 16 is a flow chart of a process used to handle sending interrupts to the DOS VM. As shown in Figure 10, five possible events can occur that would generate an interrupt to the DOS VM. The CLM DBS must emulate a hardware interrupt line to the DOS VM. Since multiple UART interrupt events can be cleared with one Interrupt Service Request (ISR) in the DOS VM, CLM DBS must be careful not to send unneeded interrupts to the DOS VM. To do this CLM DBS must track the state of this emulated interrupt line to ensure that no more interrupts than necessary are sent to the DOS VM. Figure 16 shows the logic used to handle sending interrupts to the DOS VM. As shown in Figure 16, at block 1600, the process is idle. The process periodically checks for an interrupt (1610) and if one occurs, the virtual machine is interrupted (1620) . Otherwise, the monitoring continues. If an interrupt is pending (1630) when an interrupt event occurs (1635) it is added to the scheduled pending list. If an interrupt event is cleared (1640) and there are no other interrupts pending (1645-NO) the process reverts to idle status. Otherwise, the interrupt is cleared and the next interrupt on the pending list is handled. It is also important to ensure that no interrupt events are missed. As in a real UART, when the IIR register is accessed, CLM DBS will freeze all interrupts by holding off any VCOMM interrupt event updates until the IIR access is complete. In a hardware UART, a certain amount of time is required to transmit each byte of data. This normally limits the frequency of UART interrupts a DOS application receives. The table below lists transfer times for selected DTE speeds. UART Byte Transfer Times DTE Speed (bps) Time required to Time required to transfer 1 byte transfer 14 bytes 9600 1.04 ms 14.53ms 14400 694 μs 9.716 ms 38400 260 μs 3.640 ms 57600 173 μs 2.422 ms 115200 86.8 μs 1.215 ms The times required to transmit were calculated using the following equations, assuming 10 bits per byte. Time to transmit 1 byte 10 byte Speed Time to transmit 14 bytes T ■ " ■ 14 bytes = T • '-byte x 14 With the CLM, bytes are no longer transferred serially. Therefore, the transfer times are significantly reduced to the amount of time needed to copy a byte. This can cause problems if a DOS application were to get interrupted much more often than would normally would be expected if a hardware UART were being used. To prevent problems, the CLM DBS will be implemented so as to simulate the transfer times shown in the above table. This will be done by buffering the data and using timers to determine when to interrupt the DOS VM. The timing mechanisms are set up to simulate the same timing whether the application is running in interrupt or polled mode. Specifically, not only must the interrupts to the VM be delayed by a timed amount, events such as updating the transmitter holding register empty bit must also be delayed by the same timed amount. The following data structures are used in the CLM DBS and are internal to the CLM DBS VxD. A block of twelve bytes will be used to emulate the twelve registers of the UART. FIFOs will be used to store bytes temporarily during transfers between CLM DBS and VCOMM. The size of the FIFO is set for a particular implementation by allocating a large amount of FIFO and then monitoring the statistics of the level of fill. Flags are used to store the state of the following interrupt events : Virtual interrupt line active (interrupt line to DOS VM) Line Status interrupt pending • Receive data interrupt pending Transmit Holding Register empty interrupt pending Modem Status interrupt pending The interfaces in and out of CLM DBS will be in the exemplary embodiment described herein standard Windows 95 system interfaces. These interfaces are broken down into the following categories: The IRQ of the emulated UART are virtualized through the Virtual Programmable Interrupt Controller Device (VPICD) . VPICD is given pointers to interrupt handlers inside the CLM DBS. I/O trapping routines are installed into VM to handle all accesses to the emulated UART. VCOMM interface routines are used to pass data between CLM DBS and VCOMM and are also used to handle system interfaces. Figure 17 is a flow chart of a process used to load the CLM DBS VxD and to load the port driver CLM VxD. The CLM DBS will be loaded by Windows 95 at start up as a static VxD (virtual device driver) (1700, 1705) . CLM DBS will read the system registry to determine which com port and IRQ are to be emulated and the com port of the CLM (1710) . Also during initialization, CLM DBS will need to write the address of the first register of the emulated com port to the appropriate entry in the BIOS com port address table starting at physical address 400h (1715) . This is due to the fact that some DOS applications look up the address of the com port before accessing it. Only one virtual machine (VM) should be accessing the emulated serial port at one time. In the event that more than one VM attempts to access the serial port by executing a read/write to one of the registers of the emulated serial port (1735) , the user will be prompted (1720) to select which VM should be given ownership of the port. A list 1725 will be displayed and a user selection 1730 entered. CLM DBS will load a port driver, CLM VxD (1745) , when a VM executes a read or write to one of the registers of the emulated serial port. The port driver will remain loaded until that VM is closed. An alternative to this would be to set up timers to determine that the VM has stopped using the serial port and free the port driver to be used by another application. This method is not preferred in order to reduce the complexity of CLM DBS as well as keep the code more efficient by removing the overhead of checking and updating the timers. With this design, if a user runs an application in a DOS VM (that uses the emulated serial port) , the user must close the DOS VM before CLM VxD is available to any other applications (Windows or DOS) . Also, if a Windows application that directly accesses the serial port runs, CLM DBS will load the CLM VxD port driver to be used by the system VM and the port driver will not be unloaded until Windows is restarted. There has been disclosed a virtual device driver for permitting DOS-based applications to communicate with a controllerless modem in a particularly advantageous manner.

Claims: What is claimed is: 1. Computer apparatus for providing communications comprising : a. a computer having a bus; b. a DOS application process running on said computer; c. a hardware communications port connected to said bus ; and d. at least one virtual device driver running on said computer and controlling communications from said DOS application over said hardware port, said virtual device driver emulating UART to UART communications and providing modem functionality using said computer. 2. The computer apparatus of claim 1, further comprising at least one 32 -bit application process; a communications interface process running on said computer; a controllerless modem virtual device driver controlling communications from said 32 -bit application over said communications interface to and from said hardware interface. 3. The computer apparatus of claim 2 in which said at least one virtual device driver provides modem functionality using said controllerless modem virtual device driver. 4. The computer apparatus of claim 3 in which said at least one virtual device driver comprises a virtual communications device interface and a virtual programmable interrupt handler. 5. The computer apparatus of claim 2 in which said at least one virtual device driver controls communications from said DOS application using said communications interface process . 6. The computer apparatus of claim 5 in which said at least one virtual device driver allocates registers of a register set corresponding at least in part to registers used in UART to UART communications. 7. A computer system comprising: a. a network; b. a plurality of computers connected to said network; c . at least one of said computers comprising a main bus and at least one virtual device driver running on said computer and controlling communications from a DOS application running on said computer over a hardware port, said virtual device driver emulating UART to UART communications and providing modem functionality using a processor controlling said main bus. 8. A method of providing communications to and from a DOS application over a communications port of a computer having a main bus, comprising the steps of: a. providing a virtual device driver emulating UART to UART communications; b. providing a controllerless modem process using a processor controlling said main bus and c. directing communications from said DOS application to said controllerless modem over said virtual device driver. 9. The method of claim 8 further comprising the step of directing communications from at least one 32 -bit application to said controllerless modem process. 10. The method of claim 9 further comprising the step of arbitrating demands for usage of said controllerless modem by 32-bit applications and a DOS application. 11. The method of claim 8 in which the step of providing a virtual device driver includes allocating registers of a register set corresponding at least in part to registers used in UART to UART communications. 12. A method of providing communications over a network having a plurality of computers connected thereto, comprising the steps of: providing at least one computer connected to said network having a main bus; and providing at least one virtual device driver running on said at least one computer, said computer controlling communications from a DOS application running on said computer over a hardware port, said virtual device driver emulating UART to UART communications and providing modem functionality using a processor controlling said main bus. 13. A method of providing communications to and from a DOS application over a communications port of a computer having a main bus, comprising the steps of: a. loading a virtual device driver emulating UART to UART communication as a static virtual device driver; b. reading a system registry to determine which com port and IRQ are to be emulated; c. writing an address of a first register of a com port to be emulated to a basis input output system (BIOS) com port address table starting at address 40Oh. 14. A computer program product, comprising: a. a memory medium; and b. a computer program, stored on said memory medium, said computer program comprising instructions implementing a virtual device driver emulating UART to UART communications and providing access by one or more DOS applications to a controllerless modem. 15. The computer program product of claim 14 in which said computer program also comprises instructions for directing communications from at least one 32 -bit application to said controllerless modem. 16. The computer program product of claim 14 in which said computer program is transmitted from said memory medium over a network interface . 17. A computer program product, comprising: a. a memory medium; and b. a computer program, stored on said memory medium, said computer program comprising instructions for implementing at least one virtual device driver for controlling network communications from a DOS application using a controllerless modem. 18. The computer program product of claim 17 in which said computer program is transmitted from said memory medium over a network interface . 19. A computer program product, comprising: a. a memory medium; and b. a computer program, stored on said memory medium, said computer program comprising instructions for loading a virtual device driver emulating UART to UART communication as a static virtual device driver, reading a system registry to determine which com port and IRQ are to be emulated, and writing an address of a first register of a com port to be emulated to a basis input output system (BIOS) com port address table starting at address 400h.

Inventors: BADER JAMES E, DEANS SCOTT, TARQUINI RICHARD P, BADER, JAMES, E., DEANS, SCOTT, TARQUINI, RICHARD, P.
Applicants: CIRRUS LOGIC INC, CIRRUS LOGIC, INC.
Application year: 1998
Main classification: G06F13
IPC codes: G06F13