I decided to try to lean a little about fpu math, and started to read Raymonds tutorial on the fpu.
what I didn't see and I am having problems with, is declaring a FP constant in the .data section.
For example:
when I try this:
.data
var1 dq .3048
I get this:
error a2006
undefined symbol: 3048
How would I declare a fp constant, without having it as a string first such as:
.data
var1 db ".3048",0
and convert it to an integer using the FPULib function FpuAtoFl ?
.data
var1 real8 0.3048
var2 real10 1.2342
real8 is floating point equivalent of qword, dq (eight bytes)
real10 is floating point equivalent of tbyte, dt (ten bytes)
Thank you! :U
rags
You can always use dd for a REAL4, dq for a REAL8, and dt for a REAL10. However, the MASM assembler NEEDS both an integer portion (even if it's 0), a decimal point, AND at least one decimal digit (again even if it's 0) in order to convert the declared value as a float.
(I don't know how other assemblers deal with the syntax of those declarations.)
Raymond