I want to know what is the standard way for writing a -simple- kernel to be compiled on NASM?
To get it clearer: I was abl开发者_如何学Pythone to define the code block with all the following ways:
[segment code]
[segment .code]
segment code
segment .code
[section code]
[section .code]
section code
section .code
I need to know what is the standard way to do that, And what is the difference between them...
Thanks
Your question is answer in the NASM documentation, as stated above.
The truth is.. the sections do not mean verymuch when you load your code. A kernel to be loaded, needs a complete bootloader, and a bootloader has 512b to load GDTr, , enabling A20, entering protected mode, and jumping to _kmain. Checkout OSDev.org for more examples, and information.
精彩评论