Advertisement
paulogp

ASM - Assembly inline C

Jul 13th, 2011
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. // Apple Xcode
  2.  
  3. //  main.c
  4. //
  5. //  Created by Paulo G.P. on 5/21/11.
  6. //
  7.  
  8. #include <stdio.h>
  9. #include <unistd.h>
  10.  
  11.  
  12. int main(int argc, const char * argv[]) {
  13.     printf("Exemplo ASM\n");
  14.  
  15.  
  16.     asm ("nop"); // no operation
  17.     //asm ("ret"); // return from procedure
  18.     //asm ("mov %ax, %bx"); // contents of the AX register to the BX register
  19.  
  20.     sleep(5);
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement