Page 1 of 1
Floating point variables and Math?..
Posted: Sun Dec 30, 2007 1:30 am
Is this possible in assembly?
Posted: Tue Jan 01, 2008 12:23 am
In the CPU, along with the ALU, there is the FPU which deals entirely with floating point numbers. all floating point instructions begin with an 'f' so that add would be 'fadd'.
However, using the FPU is harder than normal. There are 8 80bit registers that work similar to a stack. 32 and 64 bit variables can be loaded to and saved from the FPU.
I suggest reading the online book PCASM (link is in the resources section of this webside). It is an excelent resource that completely explains how to use the FPU as well as the history of it.
As for 'maths'
Any mathematical problem that I know of can be formed into an equation.
Any equation can be programmed
Any program ends up running via assembly (after interpreting or compiling and linking)
Hope this helps