How do I manage to get to the point where I can start writing my code in C?
I have tried calling my C kernel like so:
asm (no, it's not the complete code):
Code: Select all
[extern _kernel]
call _kernel
Code: Select all
int kernel()
{
for (;;);
}
I am using NASM and GCC on Windows XP. Now, I've tried some methods to link the compiled output with LD by reading some tutorials, but I always fail because of multiple reasons (mostly because LD "doesn't recognize the file input")...
I'm asking for somebody to write a quick and dirty example on how to link compiled output from NASM and GCC (and how to compile it in the first place) in Windows using LD in order to create a basic "Hello world" kernel (where "Hello World" is an endless loop ).
PS: And if somebody could explain which output format should be used (aout, elf etc.), and why, that would be great
PS2: I'm using GCC and LD from the bin folder that I got with Bloodshed Dev-Cpp