From: zak100 <zul...@ya...> - 2009-07-09 06:37:02
|
Hi, I am trying to call 'C" functions from my tiny kernel code. Can somebody plz help me with this? ; call c function extern [_K_main] ;--- test kernel.bin--- ; push cs ; push cs ; pop ds ; pop es mov ax, 7E0H mov ds,ax mov es,ax mov si, msg mov ah, 0Eh mov bx, 7 top: lodsb cmp al, 0 jz blackhole int 10h jmp short top blackhole: mov cx,1000 Delay: Loop Delay call _K_main; this is in main.c hlt jmp blackhole msg db 'Welcome to the Kernel!', 0 times 0x200-($-$$) db 0 I am getting following error mesg: D:\nasm prog>nasm -f bin -o boot.bin test_kernel2.asm test_kernel2.asm:5: error: label or instruction expected at start of line D:\NASMPR~1> Zulfi. -- View this message in context: http://www.nabble.com/calling-%27C%27-functions-tp24404865p24404865.html Sent from the nasm-users mailing list archive at Nabble.com. |