I am trying to sum 2 numbers but the program crashes

can I get some help?
I already read this

SumarFloat proc var1:DWORD,var2:DWORD
fld f1
fld f2

fadd st(0), st(1)
fst  dword ptr


SumarFloat endp
Posted on 2005-04-26 20:00:42 by luisvalencia
Glad to see that you have finally decided to try and learn by reading some of the available literature. However, you are using some of the provided examples out of context. From that tutorial,

fst? dword ptr ? ?;stores the value of ST(0) in the REAL4 format
? ? ? ? ? ? ? ? ? ? ? ?;at the memory address indicated by EAX

I have not seen anything in your code which would set the content of the EAX register to an acceptable memory address. That is most probably the cause of your program crashing if you are trying to write to a memory area which is not allowed .

Posted on 2005-04-26 21:15:41 by Raymond
Another thing: what are f1 and f2? And what happened to var1 and var2? :)
Posted on 2005-04-27 14:00:35 by QvasiModo