IntroductionChap. 1 Description of FPU InternalsChap. 2 Data types used by the FPU and addressing modesChap. 3 Instructions related to the FPU internalsChap. 4 Data transfer instructions - REAL numbersChap. 5 Data transfer instructions - integersChap. 6 Data transfer instructions - packed decimalsChap. 7 Comparison instructionsChap. 8 Arithmetic instructions - with REAL numbersChap. 9 Arithmetic instructions - with integer numbersChap. 10 Trigonometric instructionsChap. 11 Logarithmic and exponential instructionsChap. 12 Other instructionsChap. 13 Commented exampleAppendix 1 Alphabetical list of FPU instructions
The FPU, also known as a co-processor, used to be an option when the first PCs cameon the market. Modern PCs are now all provided with a co-processor. Although theoriginal PC-XT has evolved considerably over the years, the FPU itself has not changedappreciably during that same period. Apart from a few minor instructions having beenadded, the main improvement has been the extended range of some of the existinginstructions.
The entire set of assembler instructions for the FPU is relatively small and could bememorized rapidly. Learning which parameter(s) can be used with each instructionshould take only slightly longer. The main difficulty is in developing sound programmingtechniques to avoid some of the pitfalls peculiar to the FPU.
The main purpose of this document is to show that using the FPU can be relatively easywith minimal effort. Once the basics have been mastered, any computation howevercomplex can be performed.
The first chapter describes the internals of the FPU and how they function. Some of thisknowledge is an absolute necessity to use the FPU properly or help later inunderstanding the outcome of some of the instructions. This is followed by a chapterdescribing the various data types which can be used with some of the instructions,including a detailed review of the floating point data formats.
The FPU instructions are then discussed in detail in the following chapters whichregroup them according to some "biased" criteria. Although some description of eachinstruction is available in the Fphelp.hlp file provided with MASM32, a more in-depthreview is provided with more tangible examples of their usage.
The final chapter provides a fully commented example of a semi-complex computation.
It should be noted that this document has been prepared according to the syntax usedby MASM. Although most other assemblers/compilers should have a similar syntax forthe FPU instruction mnemonics, their syntax may differ for the addressing mode ofmemory variables. It is also known that some of the instructions used without explicitparameters are not supported by some of the other assemblers/compilers.
Any comment or suggestion aimed at improving this document will be given dueconsideration. Those can be sent to:
rayfil@hotmail.com
Please use "Simply FPU" in the subject line to help its retrieval from the ever increasingSPAM.
联系客服