flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
ctl3d32
Hi! These should be changed:
Code: push [_Number1] push [_Number2] call Addition push eax push [_Number1] push [_Number2] push _Result call [printf] |
|||
![]() |
|
mindcooler
Code: push _Number1 push _Number2 You're pushing the addresses of your variables, not their values. Code: push [_Number1] push [_Number2] call Addition push eax push [_Number1] push [_Number2] push _Result call [printf] _________________ This is a block of text that can be added to posts you make. |
|||
![]() |
|
DStevens5833
Such a simple mistake! It works now; thank you both for your help!
|
|||
![]() |
|
LocoDelAssembly
In this particular case nothing will blow up but you should use "add esp, total_size_of_arguments" after each call to msvcrt functions (and wsprintf), where total_size_of_arguments in all your cases is the number of PUSHes multiplied by 4. (Using cinvoke would do this automatically for you as long as all the parameters are specified in the cinvoke call and not some of them pre pushed.)
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.