c.c
Code: Select all
extern void _kmain();
void _kmain()
{
}
Code: Select all
global loader
extern _kmain
loader:
mov ah, 00
mov al, 12h
int 10h
call _kmain
end:
jmp $
times 510 - ($ - $$) db 0
dw 0xAA55
Code: Select all
ENTRY (loader)
when I try to link them, I get:
ld: warning: cannot find entry symbol loader; defaulting to 00000000
c\asm.o: In function `loader':
c\asm.asm:(.text+0xd): undefined reference to `_kmain'