Article ID: 31810 - View products that this article applies to.
This article was previously published under Q31810
This article has been archived. It is offered "as is" and will no longer be updated.
The Microsoft Macro Assembler is useful for writing fast programs. For example, the following is a fast method to take the absolute value of a number held in the AX register:
This method achieves part of its speed by avoiding the use of a jump instruction to keep the 8086's pre-fetch queue full.
To save time while a program is running, the 8086 tries to fetch the next instruction from memory while it is processing the current instruction. However, a jump instruction moves the location of the next instruction to fetch, making invalid the instruction that the 8086 just fetched into its pre-fetch queue.
This process forces the 8086 to spend time fetching the correct instruction from memory after the jump. Whenever possible, avoid jumps to increase the execution speed of Macro Assembler programs.
Contact us for more help