I'm trying to link together a program that's mostly in assembler, but can call some C functions, making use of the C library.
I build the assembly side with vasm:-
Code: Select all
vasmm68k_mot -Faout -devpac -o demo-s.o demo.S
Code: Select all
m68k-atari-mint-gcc -m68000 -c -o demo-c.o demo.c
Code: Select all
m68k-atari-mint-ld -o demo.prg demo-s.o /usr/m68k-atari-mint/lib/libc.a demo-c.o
Reading around hasn't got me very far. I've seen reference to linking with libgcc, but that doesn't appear to have any effect. I can't see how puts is in any library other than the C standard lib, which is what I thought libc.a was.
Can anyone set me on the straight and narrow?
Thanks,
BW
PS. here's a demonstration project.