diff options
Diffstat (limited to 'kernel/init/entry.asm')
| -rw-r--r-- | kernel/init/entry.asm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/init/entry.asm b/kernel/init/entry.asm new file mode 100644 index 0000000..afb0434 --- /dev/null +++ b/kernel/init/entry.asm @@ -0,0 +1,23 @@ +[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 |
