Undocumented 80x86 Features

Some programs written by companies outside Intel have unusually good knowledge of Intel’s processors.

The Disassembler in Microsoft’s COFF Linker

This sample is an article that describes how a linker supplied with different versions of Microsoft Visual C++ knows the opcodes and operand requirements of a dozen or so 80x86 instructions that Intel does not seem to have documented for general knowledge:

LOADALL, CFLSH, WRECR, RDECR, SVDC, RSDC, SVLDT, RSLDT, SVTS, RSTS, SMINT, XBTS, IBTS, ZALLOC

(I am grateful to Robert Collins and Christian Ludloff for their separate information that seven of these, namely SVDC, RSDC, SVLDT, RSLDT, SVTS, RSTS and SMINT, are not actually Intel’s instructions but are documented as instructions for Cyrix’s 80x86 look-alike processors. I would never have thought to look.)

Motivation and Purpose

From the perspective of Software Analysis as a technique of software development or as a future academic discipline, the particular program that was studied is interesting because its opcode tables have errors, even for instructions that are well-known. The article’s primary purpose is therefore not to list some undocumented CPU instructions but to demonstrate the feasibility and practical value of having a second person check a first person’s programming work for errors.

Successive versions of the program have corrected some errors but not others, which suggests that the program’s manufacturer has a will to have the correct tables but a difficulty in detecting the errors. Moreover, with successive upgrades to support instructions for new processors, new errors have been introduced. The opcode tables are presumably generated through macros. Although these may be convenient for development, they may also obscure errors from someone who reviews the program’s source code. The manufacturer could have detected more errors by having someone review the relevant code and data in the program. This article, written externally to the program’s manufacturer and without the benefit of already knowing the format of the opcode tables, is intended to show that such a process of review may be commercially feasible.

Download

The article is presented as a Microsoft Word for Windows 7.0 document, compressed into a cabinet file.

Copyright © 1997-98. Geoff Chappell. All rights reserved.

[Home][Programming Samples][Application Notes][Security Notes][Editorial][Consultation][Contacts]