MS-DOS 6.22 NLSFUNC Language Support Explained

In MS-DOS 6.22, the NLSFUNC (National Language Support Function) utility provides the system support required for internationalization and dynamic code page switching. This article explains the primary functions of NLSFUNC, how it enables the CHCP command, and its role alongside the COUNTRY.SYS file to support localized character sets and regional conventions.

The Primary Role of NLSFUNC

The primary purpose of NLSFUNC is to load extended country-specific information into memory and enable MS-DOS to switch character sets (code pages) on the fly.

While the basic MS-DOS kernel can handle standard input/output using default system fonts, users requiring localized date, time, currency formats, and non-English alphabets rely on National Language Support (NLS). While the COUNTRY command in CONFIG.SYS sets the initial regional parameters, NLSFUNC is the memory-resident tool (TSR) that unlocks dynamic runtime localization features across the operating system.

Enabling the CHCP Command

The most critical function of NLSFUNC is enabling the CHCP (Change Code Page) command.

If a user attempts to run CHCP to view or change the active code page without NLSFUNC loaded into memory, MS-DOS returns an error:

NLSFUNC not installed

Once NLSFUNC is executed, MS-DOS can dynamically switch the active code page for all supported devices—including the console screen (DISPLAY.SYS) and printers (PRINTER.SYS)—simultaneously, ensuring consistent character rendering across hardware.

Accessing COUNTRY.SYS

NLSFUNC acts as the software bridge between the operating system and the COUNTRY.SYS database. COUNTRY.SYS contains the actual lookup tables for:

  • Date and time delimiters and formatting
  • Currency symbols and placement
  • Case mapping (converting lowercase regional characters to uppercase)
  • Collating sequences (sorting rules specific to regional alphabets)

When invoked, NLSFUNC accepts the location of the COUNTRY.SYS file as an optional parameter. If no file path is specified, it uses the path defined by the COUNTRY directive in CONFIG.SYS, or looks for the file in the root directory.

Syntax and Implementation

NLSFUNC can be loaded either through the command line (or AUTOEXEC.BAT), or directly during startup via CONFIG.SYS.

From the Command Line or AUTOEXEC.BAT:

NLSFUNC [drive:][path]filename

Example:

C:\DOS\NLSFUNC.EXE C:\DOS\COUNTRY.SYS

From CONFIG.SYS: Using the INSTALL command, NLSFUNC can be loaded before the command interpreter starts:

INSTALL=C:\DOS\NLSFUNC.EXE C:\DOS\COUNTRY.SYS

Place in the Broader Internationalization Subsystem

NLSFUNC does not work in isolation; it is one component of the MS-DOS 6.22 internationalization stack:

  1. CONFIG.SYS Setup: Defines display hardware font buffers via DEVICE=DISPLAY.SYS and initial regional formatting via COUNTRY=.
  2. NLSFUNC Loading: Loaded via CONFIG.SYS or AUTOEXEC.BAT to permit memory-level management of country data.
  3. MODE Preparation: Prepares specific code pages for devices using MODE CON CP PREPARE.
  4. KEYB Execution: Loads keyboard layout tables for localized input.
  5. CHCP Activation: Uses NLSFUNC to switch between prepared primary and secondary code pages.