I'm trying to build a function but I'm getting an unexpected result. Here's the data definition and function call:
.Data
bigNum1 DD 100H Dup 0
numDoubleWords DD 2
.Code
Invoke getSumBigNumDigits, Addr bigNum1, Addr numDoubleWords
The function looks like this:
getSumBigNumDigits Frame bigNum1, numDoubleWords
Mov Eax, [numDoubleWords]
.DEBUGGING_BREAK_1
Ret
EndF
I'm looking at this in the debugger. I would expect that Eax = 2 at .DEBUGGING_BREAK_1. However, Eax = 4B7962, which is the ADDRESS of numDoubleWords (instead of the value).
Can anyone help with an explanation of how this works? How can I get "Mov Eax, [numDoubleWords]" to work in the normal way?
Thanks!
Gary