MS-DOS 6.22 CONFIG.SYS System Clock Parameter
In MS-DOS 6.22, clock tick handling and timer drift are controlled
through the /CPUCLOCK parameter supplied to the
HIMEM.SYS device driver in CONFIG.SYS. This
article explains how the /CPUCLOCK:ON switch functions, why
hardware timer ticks can become desynchronized during memory switching,
and how to implement the setting to maintain accurate system time.
The /CPUCLOCK
Parameter
MS-DOS does not have a standalone native CONFIG.SYS
directive exclusively named for the system timer. Instead, system clock
tick stability is governed by the memory driver via the following
parameter:
/CPUCLOCK:ON
This switch is appended to the HIMEM.SYS device line
inside your CONFIG.SYS file:
DEVICE=C:\DOS\HIMEM.SYS /CPUCLOCK:ON
Why Clock Ticks Drop in MS-DOS
MS-DOS tracks time using the standard BIOS timer interrupt (Interrupt
08h / Interrupt 1Ch), which fires approximately 18.2 times per second.
When MS-DOS accesses High Memory Area (HMA) and Extended Memory (XMS),
HIMEM.SYS must dynamically toggle the microprocessor's A20
gate.
On certain motherboards, chipsets, and bus architectures, toggling the A20 address line alters the CPU or bus clock frequency momentarily. This hardware behavior causes the system to drop hardware timer ticks, making the real-time clock run significantly slower than actual wall-clock time while DOS programs are active.
How /CPUCLOCK:ON
Resolves the Issue
/CPUCLOCK:OFF(Default):HIMEM.SYSprioritizes memory access speed. It executes A20 switching as quickly as possible without compensating for hardware clock fluctuations./CPUCLOCK:ON: InstructsHIMEM.SYSto handle the processor clock state deliberately during A20 line operations. This prevents the hardware timer from losing ticks, ensuring that system time remains accurate. Note that enabling this option slightly increases the time required to switch memory states.
Implementation Example
To apply the fix, open CONFIG.SYS in a text editor (such
as EDIT C:\CONFIG.SYS) and adjust the
HIMEM.SYS entry:
DEVICE=C:\DOS\HIMEM.SYS /CPUCLOCK:ON
DOS=HIGH,UMB
DEVICE=C:\DOS\EMM386.EXE NOEMS
Save the file and reboot the system for the updated clock handling behavior to take effect.