News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Pass variables from C++ to ASM

Started by Caljay, August 04, 2022, 12:39:21 PM

Previous topic - Next topic

Caljay

Hello, to start off I am new to this forum so if I have this topic in the wrong spot, please redirect me to the proper place.

I am fairly new to Assembly(experienced in other HLLs) and am using MASM built into Visual Studio 2019. I was wondering if it is possible to pass in a variable or argument into an assembly proc from C++ and how I might go about doing so.

Another thing, are there any good tutorials for x64/64 bit MASM, most of the ones I am able to find are only for NASM with Linux.

edit: I already see that I have put this in the wrong spot lmao. My bad on that.

Thank you,
Caljay

hutch--

64 bit C++ uses the normal calling convention in 64 bit Windows, its a version of FASTCALL, first 4 args are registers and any more are passed on the stack.