x64 Assembly Programming Tutorial 1 : Getting into x64 ASM from C++
Setup x64 assembly programming in vs2010. The steps as following:
1) Create a empty visual c++ project;
2) Choose "Customize build" from project properties, select "MASM";
3) Add empty c++ source file named "code.asm" , write some code just as following:
.code GetValueFromASM proc mov eax, 1234 ret GetValueFromASM endp end
4) Add C++ source file, write some code like this:
#includeusing namespace std; extern "C" int GetValueFromASM(); int main() { cout << "ASM value: " << GetValueFromASM() << endl; int val; cin >> val; return 0; }
5) build and run the progam.
Note: you need to set up MASM configure first before add any .asm source file. If you have some .asm file, then remove it and add it later.
二月 21, 2020
Tags :
Articles
,
X64-ASM
Subscribe by Email
Follow Updates Articles from This Blog via Email
No Comments