Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. // main.c
  2. #include <stdio.h>
  3.  
  4. unsigned short foo(unsigned short a);
  5.  
  6. int main()
  7. {
  8.     printf("a %u", foo(100));
  9. }
  10.  
  11. // main.s
  12. .global foo
  13. foo:
  14.     inc %di
  15.     mov %di, %ax
  16.     ret
  17.  
  18. // gcc main.c main.s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement