In computing, a hardware code page refers to a code page supported natively by a hardware device such as a display adapter or printer. The glyphs to present the characters are stored in the alphanumeric character generator's resident read-only memory and are thus not user-changeable. They are available for use by the system without having to load any font definitions into the device first. Startup messages issued by a PC's System BIOS or displayed by an operating system before initializing its own code page switching logic and font management and before switching to graphics mode are displayed in a computer's default hardware code page.
In North American IBM-compatible PCs, the hardware code page of the display adapter is typically code page 437. However, various portable machines as well as European, Arabic, Middle Eastern and Asian PCs used a number of other code pages as their hardware code page, including code page 100, 151, 667, 737, 850, encodings like "Roman-8", "Kamenický", "KOI-8", "MIK", and others. Most display adapters support a single 8-bit hardware code page only. The bitmaps were often stored in an EPROM in a DIP socket. At most, the hardware code page to be activated was user-selectable via jumpers, configuration EEPROMs or CMOS setup. However, some of the display adapters designed for Eastern European, Arabic and Hebrew PCs supported multiple software-switchable hardware code pages, also named font pages, selectable via I/O ports or additional BIOS functions. In contrast to this, printers frequently support several user-switchable character sets, often including various variants of the 7-bit ISO/IEC 646 character sets such as code page 367, sometimes also a couple of 8-bit code pages like code page 437, 850, 851, 852, 853, 855, 857, 860, 861, 863, 865, and 866. Printers for the Eastern European or Middle Eastern markets sometimes support other locale-specific hardware code pages to choose from. They can be selected via DIP switches or configuration menus on the printer, or via specific escape sequences.
When operating systems initialize their code page switching logic, they need to know but have no means to determine the previously active hardware code page by themselves. Therefore, for code page switching to work correctly, the hardware code page needs to be specified. Under DOS and Windows 9x this is accomplished by specifying the hardware code page as a parameter to the device drivers DISPLAY.SYS and PRINTER.SYS in CONFIG.SYS: If multiple hardware code pages are supported in OEM issues, the first hardware code page in the list specifies the default hardware code page: If no hardware code page are specified, these drivers default either to a dummy code page number 999 or assume the hardware code page to be equal to the primary code page. In many English-speaking countries, the primary code page is either 437 or 850, so that, without specifying a different code page, the system would often assume one of these to be the corresponding device's default hardware code page as well. If a hardware code page does not match one of those with official code page assignments, an arbitrary number from the range 57344–61439 for user-definable code pages or 65280–65533 for private use code pages could be specified per IBM CDRA to give the operating system a non-conflictive "handle" to select that code page. Arabic and Hebrew MS-DOS do not use DISPLAY.SYS and PRINTER.SYS, but provide similar facilities using ARABIC.COM, HEBREW.COM, and SK.
OEM code pages
Hardware code pages are also OEM code pages. The designation "OEM", for "original equipment manufacturer", indicates that the character set could be changed by the manufacturer to meet different markets. However, OEM code pages do not necessarily reside in ROM, but include so called prepared code pages,, character sets loaded as raster fonts into the font RAM of suitable display adapters and printers as well. Hence, the group of OEM code pages is a superset of hardware code pages.