Hello osdevers, Im new to OS Development and have been reading alot of articles about loading and running kernels from bootloaders etc... My goal is just to get a very simple kernel which does nothing except get stuck in a continues loop, loaded from my bootloader. Heres what i have made out from what i have been reading:
boot.asm assembled into boot.bin and placed in the first secor of a floppy disk
loads kernel.bin to a specific memory address.
jumps to the memory where the kernel has been loaded to.
loadKerenl.o assembled from loadKernel.asm
calls an externel function which is declared in kernel.c
kernel.o compiled from kernel.c
has the main function declared, which is called from loadKernel.
kernel.bin linked from loadKernel.o and kernel.o
Am i on the right line or am i completely off track?
Thank you for your time reading this post.
Am i thinking along the right lines?
Am i thinking along the right lines?
Technically, 0 is a statement, it returns, well, 0
Ok so i started, and managed to get my bootloader working but now im trying to mix asm with c. so i created both my asm file which calls the main function in the c file. I compiled the c file using gcc and assembled the asm file with nasm. Now when i try to link both files into kernel.bin i get this error message:
loadKernel.o: file not recognized: File format not recognized
Im guessing nasm has assembled my file in the wrong format, but im not to sure on how i could fix this. Anybody got any ideas?
thanks again
loadKernel.o: file not recognized: File format not recognized
Im guessing nasm has assembled my file in the wrong format, but im not to sure on how i could fix this. Anybody got any ideas?
thanks again
Technically, 0 is a statement, it returns, well, 0