.text
.globl main
main:
movq $2, x
mov x, %rcx
imul %rcx, %rcx
mov %rcx, y
mov x, %rdi
add y, %rdi
call print_int
mov $0, %rax # on termine proprement
ret
## une routine pour afficher un entier (%rdi) avec printf
print_int:
mov %rdi, %rsi
mov $message, %rdi # arguments pour printf
mov $0, %rax
call printf
ret
.data
message:
.string "%d\n"
x:
.quad 0
y:
.quad 0
## Local Variables:
## compile-command: "gcc -no-pie global.s && ./a.out"
## End: