Trying to compute a harmonic series.
Right now I\'m entering the number I want the addition to go up to.
When I enter a small number like 1.2, the program just s
This line seems suspicious:
fst qword [currentSum] ;pop current sum value into currentSum
contrary to the comment, fst
stores the top of the stack into memory WITHOUT popping it. You want fstp
if you want to pop it.
Overall, the stack behavior of your program seems suspicious -- it pushes various things onto the fp stack but never pops anything. After a couple of iterations, the stack will overflow and wrap around. Depending on your settings, you'll then either get an exception or get bogus values if you don't have exceptions enabled.