# Just an example of calling printf() using ASM .section .data firststring: .ascii "Hello! %s is a %s who lives the number %d\n\0" name: .ascii "Maiolino\0" personstring: .ascii "person\0" numberloved: .long 123 .section .text .globl _start # Recall we are using x86_64 ABI here, so we pass arguments through # registers instead of on the stack. _start: movq $firststring, %rdi movq $name, %rsi movq $personstring, %rdx # We don't use $numberloved here because $ sign means 'immediate' # addressing. Here we want the 'CONTENT' pointed by label 'numberloved' # so, we use 'direct' addressing, by ommiting the $ sign, so we get the # information "pointed by" the label numberloved itself. movq numberloved, %rcx call printf movq $0, %rdi call exit