Linux on ia32 does not use the same calling convention as on amd64. Since your code uses the first, you should compile it as 32 bits and associate it with a 32-bit libc. On debian, you'll need the libc6-dev-i386 package.
You should also replace 'call [printf]' with 'call printf', which is an error.
Please also note that when using the main interface, you must return from the main interface and not make a system call to exit to allow C start-up code to run.
Hello World example for x86-32 with assembly instructions .
If you are working on amd64, you can learn how to write a 64-bit assembly.
Hello World example for x86-64 with assembly instructions .
source share