Created
May 1, 2017 23:12
-
-
Save echiesse/4cd16de73305af07244a3a438209d0be to your computer and use it in GitHub Desktop.
Exemplo de assembler com Visual Studio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int soma(int a, int b); | |
int main() | |
{ | |
printf("Total: %i", soma(2,3)); | |
} | |
int soma(int a, int b) | |
{ | |
__asm | |
{ | |
mov eax, a; | |
add eax, b | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment