ArticleslgStudy

science

Hardware code page

Hardware code page is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Hardware code page rather than just read about it. In short: In computing, a hardware code page (HWCP) 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 (like ROM or flash) and are thus not user-changeable.

Key takeaways

  • Hardware code page belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Hardware code page to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Hardware code page from memory before moving on to harder problems.

Reference excerpt

In computing, a hardware code page (HWCP) 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 (like ROM or flash) 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.

Code page assignments 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 (Eastern) European, Arabic, Middle Eastern and Asian PCs used a number of other code pages as their hardware code page, including code page 100 ("Hebrew"), 151 ("Nafitha Arabic"), 667 ("Mazovia"), 737 ("Greek"), 850 ("Multilingual"), 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 ("ISO/IEC 646-US / ASCII"), 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.

Support in operating systems 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 (hwcp) to the device drivers DISPLAY.SYS and PRINTER.SYS in CONFIG.SYS:

DEVICE=…\DISPLAY.SYS CON=(type,hwcp,n|(n,m)) DEVICE=…\PRINTER.SYS PRN=(type,hwcp,n)

If multiple hardware code pages are supported in OEM issues, the first hardware code page (hwcp1) in the list specifies the default hardware code page:

DEVICE=…\DISPLAY.SYS CON=(type,(hwcp1,hwcp2,…),n|(n,m)) DEVICE=…\PRINTER.SYS PRN=(type,(hwcp1,hwcp2,…),n)

If no hardware code page(s) 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 (the first code page listed in COUNTRY.SYS files for a particular country with the country code either specified in the CONFIG.SYS COUNTRY directive or assumed to be the operating system's internal default, usually 1 (US) in Western issues of DOS). In many English-speaking countries, the primary code page is either 437 (f.e. in the US) or 850 (f.e. in the UK, Ireland and Canada), 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 (E000h–EFFFh) for user-definable code pages or 65280–65533 (FF00h–FFFDh) 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_HGC.COM.

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, (a.k.a. downloadable character sets or downloadable fonts), character sets loaded as raster fonts into the font RAM of suitable display adapters (like Sirius 1/Victor 9000, NEC APC, HP 100LX/200LX/700LX, Persyst's BoB Color Adapter, Hercules' HGC+, InColor and Network Plus with RAMFONT, and IBM's MCGA, EGA, VGA, etc.) and printers as well. Hence, the group of OEM code pages is a superset of hardware code pages.

See also PC-9800 series Alt codes

Notes

References

External links "Non-US character ROMs from MDA/CGA/Hercules cards?". 2015-09-14. Archived from the original on 2016-06-09. Retrieved 2016-06-09.

Worked examples

Example 1 — a first encounter with Hardware code page

Start with the simplest possible case. Write down what Hardware code page claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Hardware code page before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Hardware code page ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Hardware code page

In research
Hardware code page appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Hardware code page in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Hardware code page is common in secondary-school and first-year university syllabi. It links to neighbouring topics Character encoding, DOS code pages, so understanding it makes those chapters shorter.
In everyday life
Look for Hardware code page outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Hardware code page” →

How to study Hardware code page in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Hardware code page means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Hardware code page out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Hardware code page in simple terms?

In computing, a hardware code page (HWCP) 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 (like ROM or flash) and are thus not user…

Why does Hardware code page matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Hardware code page?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Hardware code page.

Tags

  • Character encoding
  • DOS code pages

Keep exploring