Question:
Hello, I have recently experienced trouble in the subject of C++'s inline Assembly implementation, using Microsoft Visual Studio 2017. I have been able to run inline Assembly, however I would like to allow the user to type in Assembly code into the console window, and then use C++'s inline Assembler to run the user's Assembly code. I could not figure out how to do this, after much searching, nothing was found. So I am here to ask if anyone knows of a way to accomplish this task.
Question Overview:
How would I go about using Microsoft Visual Studio 2017's C++ inline Assembler to run user inputted x86 Assembly code?
Additional Information:
Microsoft Visual Studio 2017, Windows 10 home, x64 system, x86 application, debug mode.
Template Code:
#include <Windows.h>
#include <iostream>
#include <string>
int main()
{
std::string _string;
std::getline(std::cin, _string);
__asm
{
// How would I run the user inputted Assembly code in the "_string" string?
}
std::getchar();
return 0;
}