Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int foo = 1;
- char bar[] = "Яблоко";
- asm(
- "_asm_function: \n"
- " \n"
- " push %ebp \n"
- " mov %esp, %ebp \n"
- " \n"
- " mov _foo, %eax \n"
- " add %eax, _bar \n"
- " add $1, _foo \n"
- " \n"
- " push $_bar \n"
- " call _puts \n"
- " \n"
- " mov %ebp, %esp \n"
- " pop %ebp \n"
- " ret \n"
- );
- extern "C" void asm_function();
- int main()
- {
- asm_function();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement