In this site, wrote a simple C code and got its assembly code: (x86-64 gcc 10.2)
#include<stdio.h> // Type your code here, or load an example. int main() { int a=5, b=5; int c = a+b; return 0; }
main: push rbp mov rbp, rsp mov DWORD PTR [rbp-4], 5 mov DWORD PTR [rbp-8], 5 mov edx, DWORD PTR [rbp-4] mov eax, DWORD PTR [rbp-8] add eax, edx mov DWORD PTR [rbp-12], eax mov eax, 0 pop rbp ret
If I copy the above assembly code and paste it in notepad, can I somehow run it in windows to get the same expected output as if I ran the above C code? If I can, how should I do it.
https://stackoverflow.com/questions/66498291/can-i-directly-run-compiled-code-in-windows March 06, 2021 at 03:10AM
没有评论:
发表评论