I would like to print a float number in x86 assembly using printf. Here is my code.
.data
number1: .float 18.0
format: .ascii "%f\n"
.text
.global main
main:
movsd liczba1, %xmm0
push %ebp
mov %esp, %ebp
#dont know to push %xmm0 on stack
push $format
call printf
mov %ebp, %esp
pop %ebp
mov $1, %eax
mov $0, %ebx
int $0x80
I guess that pushing %xmm0 registry on stack would make the whole thing work but I couldn't find solution how to do it.