Initial checkin of toy OS project.
[os.git] / kernel / init / entry.asm
1 [BITS 32]
2
3 EXTERN KernelEntry
4 GLOBAL StartOfKernelImage
5 GLOBAL IdleLoop
6                 
7 ;;; 
8 ;;; I put "entry.o" first in line at the linker so I am sure this function
9 ;;; gets put first in the kernel image.  This is good because:
10 ;;;
11 ;;;     1. We know there is valid code at 0x00010000 when we jump here
12 ;;;     2. We can use the address of this function as the start of image
13 ;;;     3. We don't have to make sure main (or KernelEntry or whatever) 
14 ;;;        is always the first function in main.c
15 ;;; 
16 StartOfKernelImage:
17         jmp KernelEntry
18         ret
19
20 IdleLoop:
21         sti
22         hlt
23         jmp IdleLoop