Machine Architecture: 2.4 8086 Architecture Overview: Inherent Optimizations

Up: GEOS SDK TechDocs | Up | Prev: 2.3 The Prefetch Queue

The 8088 and 8086 instruction set was designed with many instructions manifested in two different forms: one that allowed a wide range of possible arguments, and another that worked with one of the arguments prespecified. Since the second form did not have to load both arguments from memory, those instructions were shorter than their counterparts.

For example, the instruction and has these two forms: "And with anything," which assembles into three bytes of machine code, and "And with AX or AL," which assembles into only two bytes of machine code. Thus, the instruction and al, ffh is more efficient than and bl, ffh .

Another optimization occurs in the set of string instructions. A string is simply a set of consecutive bytes or words in memory. To repeat an operation on each element of the string could normally take a long time due to branching and checking for final conditions (branching clears out the prefetch queue). However, the string operations act as single, nonbranching instructions, so the prefetch queue is not affected by them. This speeds up string operations considerably.


Up: GEOS SDK TechDocs | Up | Prev: 2.3 The Prefetch Queue