Filename: main.c
extern out_f();
int main()
{
out_f();
return 0;
}
Here is assemblers code
Filename: out.asm
format ELF section '.text' executable public out_f out_f: push msg_len push msg push 1 mov eax, 4 push eax int 0x80 add esp, 4*4 ret section '.data' writeable msg db "Hello from out.asm",0 msg_len = $-msg
Compiling lines is:
gcc -c main.c -o main.o
fasm out.asm out.o
gcc main.o out.o -o main