[BITS 32] EXTERN KernelEntry GLOBAL StartOfKernelImage GLOBAL IdleLoop ;;; ;;; I put "entry.o" first in line at the linker so I am sure this function ;;; gets put first in the kernel image. This is good because: ;;; ;;; 1. We know there is valid code at 0x00010000 when we jump here ;;; 2. We can use the address of this function as the start of image ;;; 3. We don't have to make sure main (or KernelEntry or whatever) ;;; is always the first function in main.c ;;; StartOfKernelImage: jmp KernelEntry ret IdleLoop: sti hlt jmp IdleLoop