Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // gcc -o asmtest.bin asmtest.c
- #include <stdio.h>
- int dodaj(int x, int y){
- __asm{
- /* Intel
- mov eax,[esp+4]
- add eax,[esp+8]
- retn
- */
- movl +4(%esp), %eax
- add +8(%esp), %eax
- ret
- }
- }
- int main(){
- int x,y;
- scanf("%d%d",&x,&y);
- printf(dodaj(x,y));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement