Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hmmm, I checked using grub-file, my kernel is multiboot 1, but not multiboot 2 compliant. But I don't believe that I know how I could access the args. Unless the
line in the muliboot header that's back in boot.S is the arguments? Even then, how would I be able to access that all the way over in the Kernel? Since I really would rather not be trying to do it with asm. If that's the ONLY possible way to do it then I will, but if I could pass it to the kernel and check it from there, I would much rather do that.
Techflash wrote:Since I really would rather not be trying to do it with asm. If that's the ONLY possible way to do it then I will, but if I could pass it to the kernel and check it from there, I would much rather do that.
You will have to use assembly. It's the only way to get the values out of the registers before they get clobbered. Besides, you should have some assembly already anyways to set up the stack.
Techflash wrote:Even then, how would I be able to access that all the way over in the Kernel?
When the bootloader jumps to your kernel entry point, EBX contains a pointer to the Multiboot information structure. You can pass that pointer to your main C function and then access all of the Multiboot information from C, including the kernel command line.
If you copied your code from a tutorial, it may already pass the pointer in EBX to your main C function.