Extremely new to MASM here. I'm having trouble figuring out how to access the values passed into a procedure through the stack? For instance, here I try to simply add 2 vars, but the output gives me some crazy long address. Any suggestions?
INCLUDE Irvine32.inc
.data
;//DECOY VARS
operand1 WORD 46
operand2 WORD -20
dest DWORD 0
.code
main PROC
push operand1 ;[EBP + 16]
push operand2 ;[EBP + 12]
push OFFSET dest ;[EBP + 8]
call compute
call writeint
exit
main ENDP
compute PROC
push ebp ;save ebp state
mov ebp, esp ;set ebp to activation record
mov eax, [ebp + 16]
add eax, [ebp + 12]
pop ebp
ret 12
compute ENDP
END main