3-8-2015
Thanks Dave for helping.
This code gives the wrong value in GoAsm 64-bit
Value should be 0.006
Incorrect value is 1.#nf
hdc dq 0
n1 dq 0
n2 dq 15 ;fixed value
n3 dq 0 ; result
buf db ' ',0
; keyed in value is 0.090 in HoldValue
HoldValue db ' ',0 ; keyed in variable input ex: 0.090
lea rcx,HoldValue ; this includes the decimal point
invoke atodw,rcx ; decimal string to DWORD(now in Hex)
push rax
fild Q[rsp] ; load HoldValue into the ST0 register on the fpu stack
fdiv Q[n2] ; divide it by n2 directly from memory
fstp Q[n3] ; pop the results off the stack to memory
invoke msvcrt:sprintf_s,addr buf,sizeof buf,\
"%g",[n3]
invoke user32:MessageBoxA,0,addr buf,"Result",0
invoke TextOut, [hdc],200,345,addr buf,7
pop rax