未定义符号:WriteFloat
; Implementation of the following expression:
; (6.0 * 2.0) + (4.5 * 3.2)
; FPU instructions used.
INCLUDE Irvine32.inc ; 32-bit Protected mode program.
Include Macros.inc
.data
array REAL4 6.0, 2.0, 4.5, 3.2
dotProduct REAL4 ?
val BYTE ?
.code
main PROC
finit ; initialize FPU
fld array ; push 6.0 onto the stack
fmul array+4 ; ST(0) = 6.0 * 2.0
fld array+8 ; push 4.5 onto the stack
fmul array+12 ; ST(0) = 4.5 * 3.2
fadd ; ST(0) = ST(0) + ST(1)
fstp dotProduct ; pop stack into memory operand
call WriteFloat
exit
main ENDP
END main
我的代码正在运行。问题只是WriteFloat。当我将 WriteFloat 更改为 WriteInt 或 WriteDec 时,没有错误。但我无法得到我的确切结果。我有 Irvine32.lib、Macros.inc,我正在使用 masm615,我的编辑器是 textpad。