I try to call printf function from asm code.
hello.asm:
%macro exit 0
    mov eax, 1
    mov ebx, 0
    int 80h
%endmacro
extern   printf      ; the C function, to be called
SECTION .data
    hello:     db   'Hello world!', 0
SECTION .text
    GLOBAL main
main:
    sub 8, rsp
    push dword hello
    call printf      ; Call C function
    add 8, rsp
    exit
Makefile:
all:
    nasm -f elf64 hello.asm -o hello.o
    ld hello.o -e main -o hello -lc -I/lib/ld-linux.so.2
clean:
    rm -f hello.o hello
make call:
nasm -f elf64 hello.asm -o hello.o
hello.asm:16: error: invalid combination of opcode and operands
hello.asm:19: error: invalid combination of opcode and operands
make: *** [all] Error 1
Please explain errors and how to fix code.
Thanks.
 
    