Linking *.o for YASM and GCC

Programming, for all ages and all languages.
Post Reply
Demoh

Linking *.o for YASM and GCC

Post by Demoh »

I am programming in 64 bits. How I can linking object files for YASM and GCC?

yasm.asm

bits 64
GLOBAL _start
_start:   mov rax,41h
      mov ah, 0eh
      int 10h
      jmp _start


gcc.c

main(){
start();

}
Silverhawk

Re:Linking *.o for YASM and GCC

Post by Silverhawk »

Have you tried to declare start() function as extern in your gcc.c file ?
(be sure you've to prefix start with "_" : it depends on the system you have !)
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Linking *.o for YASM and GCC

Post by Candy »

Are you seriously trying to call a 16-bit BIOS routine from 64-bit mode?
Post Reply