Quantcast
Channel: User Sourav Kannantha B - Stack Overflow
Viewing all articles
Browse latest Browse all 64

Can I directly run compiled code in windows?

$
0
0

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.


Viewing all articles
Browse latest Browse all 64

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>