Reputation: 27
Proc Code:
Values PROC ,
Text:PTR BYTE, listPtr:PTR BYTE
mov edx,Text
L1: call WriteString
call ReadFloat
fild 100
fcomp comVal
jg endLoop
fild 100
fcomp comVal
jl endPRoc
fstp REAL8 PTR [esi]
add esi, TYPE REAL8
endProc:
Values ENDP
I invoke it using invoke storeValues, ADDR prompt, ADDR List
and get the error 2001 and am confused on how to fix it
Upvotes: 1
Views: 1385
Reputation: 2916
As defined in the Intel Software Manual page 830, FILD takes a memory operand, not an immediate:
DF /0 FILD m16int Valid Valid Push m16int onto the FPU register stack. DB /0 FILD m32int Valid Valid Push m32int onto the FPU register stack. DF /5 FILD m64int Valid Valid Push m64int onto the FPU register stack.
You want to define the constants in a data segment, and point to it. Something like:
.data
hundred dd 100
; ....
.code
fild dword ptr [hundred]
Upvotes: 1