I have noticed that you use a loop to halt your kernel. This is usually fine, but in the case of an interrupt it can fail. An option instead then is to first clear interrupts with the cli instruction, and then halt with the hlt instruction. I would also suggest writing the kernel in C. This may require investing in a cross compiler, but it is usually beneficial to jump from boot.S to a kernel entry point. As well as this, I would suggest that you reconfigure the GDT, as the one provided by a multiboot-compatible bootloader is not guaranteed to be effective. You can do this in assembly before the main kernel, or in C using packed structs. Just note that you may need a far jump to get into the correct logical address space. That being said, many people identity map the segments and opt for a higher-half kernel through the use of the virtual address space by using paging. To implement paging, consider the advice of such resources as wikipedia, the osdev wiki and the intel developers manual for IA-32 and IA-64 machines, depending on whether you plan to support long mode.
I have noticed that you use a loop to halt your kernel. This is usually fine, but in the case of an interrupt it can fail. An option instead then is to first clear interrupts with the
cli
instruction, and then halt with thehlt
instruction. I would also suggest writing the kernel in C. This may require investing in a cross compiler, but it is usually beneficial to jump fromboot.S
to a kernel entry point. As well as this, I would suggest that you reconfigure the GDT, as the one provided by a multiboot-compatible bootloader is not guaranteed to be effective. You can do this in assembly before the main kernel, or in C using packed structs. Just note that you may need a far jump to get into the correct logical address space. That being said, many people identity map the segments and opt for a higher-half kernel through the use of the virtual address space by using paging. To implement paging, consider the advice of such resources as wikipedia, the osdev wiki and the intel developers manual for IA-32 and IA-64 machines, depending on whether you plan to support long mode.