How to make DOS programs printing faster in WindowsIntroduction:
This article explains how to speed up printing from DOS to a DOS
compatible printer on Windows. The Problem: If you run a DOS application on a 32-bit NT-based Windows system (Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10, Windows Server 2000, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows Server 2016, Windows Server 2019), you may find that your print jobs are spooled after many seconds, sometimes minutes, especially when printing to a network printer. It may even happen on Windows 95/98/ME machines. The problem has two main causes: Managing the DOS printing deviceIn the age of DOS, most of the printers were dot-matrix and connected to a parallel port (LPT1:, LPT2: or LPT3:) or a serial port (COM1:, COM2:, COM3: or COM4:)A typical DOS program sends binary data (characters) to one of these ports (most often LPT1:). A dot matrix printer can start printing that data as soon as it's sent to the port and before all the data has been sent by the program. A DOS programmer did not need to close the printing device (port) when the print job ended, because the printer had already finished its job. Under Windows things are different. Laser and other graphical printers need to receive an entire page before rendering it on paper. Additionally, multiple applications running/printing on the same machine introduced the need for a printing queue, especially with network printers. So, if the DOS program does not close the LPT printer port at the print job end, then Windows does not know the job is really finished. It waits for a timeout value to expire before deciding to finally spool the next job. If you're in this situation, you can close the DOS program as soon as it finishes printing. You'll see your print job start immediately because all the DOS handles will be closed by the Operating System itself, including the printer port. The best solution for this problem should be to fix the DOS program, if you are the original programmer. In further articles I'll show you how to do this with popular DOS programming languages, like Basic and Clipper. If you're not a programmer, you can change the Windows timer above, to make the delay shorter. Do not set the value too low or the printer could start printing before the DOS program has really finished creating the job.
If you're using Printfil 5.5 (released in 2008) or previous ...... the LPT_Timeout button above is not present, but you can change the Windows timer manually, as follows.
1)
If you're running a 32 bit NT based Windows system (2000, XP, Vista, 2003, 2008, Windows 7, 8, 10)
DOS CPU usageUnlike Windows, MS-DOS was a single-user operating system. You could only run a single program at a time, which could even keep the entire CPU for itself, to work as fast as possible.This causes a common problem for DOS programs running on recent Windows machines: the CPU hogging. Typically, when polling the keyboard (during a wait state), the DOS program performs an infinite loop, to check it as fast as possible. In DOS this did not cause any troubles at all, but on Windows, the system might be so "busy" that no other tasks can be performed (including the print spooling process, which usually starts when the DOS program has finished printing and is waiting for user input, typically on a menu). To check if your own DOS program is actually hogging the CPU, please try to leave the Task Manager opened while it's on execution. Press CTRL+ALT+DEL Click the "Performance" tab If the CPU usage often go to 100% while using your DOS program, then you're experiencing this problem. A DOS programmer cannot do much for this problem because the keyboard polling routine is usually implemented in a low level routine inside the DOS compiler itself. Fortunately some patches has been released for popular DOS compilers to include a "release CPU" command inside that loop. You can find some of the DOS 100% CPU patches at the Citrix website. If the solution above does not apply to you, you may want to try TameDOS or DOSBox as replacements for the Windows Command Prompt, which are supposed to solve this problem. Other articles and videos about DOS printing in Windows |
|||||
31 May 2024 |