I'm trying to link some assembly files, but I'm having some problems. I use nasm and I make my object file with:
nasm -f elf -o task1.o task1.asm
and when I try to link it with some other files with:
gcc -o task1 task1.o asm_io.o
I get error:
i386 architecture of input file 'task1.o' is incompatible with i386:x86-64 output
and same error for file asm_io.o.
My Ubutnu is 64-bit.
When I try command:
nasm -f elf64 -o task1.o task1.asm
I get error that instructions pusha and popa are not supported in 64-bit mode.
Can you tell me what instructions to use instead of pusha and popa, and what gcc command to use?