GEOS SDK TechDocs
|
|
2.2 Registers
|
2.4 Inherent Optimizations
Programmers who code in assembly language should be familiar with how the 8086 fetches data and instructions from memory. Good programmers can take advantage of the more efficient instructions to cut down on processor time for given operations.
The 8086 takes four clock cycles to fetch a single word from memory. To speed up instruction processing, the 8086 has a prefetch queue , a buffer of six bytes into which pending instructions are put. The 8086 is also broken into two separate processing units: The Execution Unit executes instructions while the Bus Interface Unit (BIU) fetches pending instructions and stuffs them into the prefetch queue.
The main goal of this separation is to make as much use of the bus as possible, even when an instruction that does not access memory is being executed. For example, if an instruction takes eight cycles to execute and does not access memory, the BIU could meanwhile fill four instructions into the prefetch queue. Therefore, while slow instructions are still slow, the instructions after them appear to be quicker.
However, jump and branch instructions negate this prefetch effect. When a branch or jump is executed, the prefetch queue is flushed and must again be filled.
GEOS SDK TechDocs
|
|
2.2 Registers
|
2.4 Inherent Optimizations