Add the Abstract doc file
[thunix.git] / boot / head.s
blobe478baed305fb5bcce450919dd5025365019a4d3
1 ##***************************************************************
2 ## What's done here is very simple, assign the segments, *
3 ## move the rest of kernel down to low address again. Then *
4 ## call the kernel initial function init(). *
5 ## Yeah, we put the all the rest job of our kernel on it. *
6 ## Hope it don't let's down. :) *
7 ## *
8 ## Copyright (C) 2007-2008 Aleaxander *
9 ## Email: Aleaxander@gmail.com *
10 ##***************************************************************
11 .text
12 .globl pm_mode
13 .include "kernel.inc"
14 .org 0
15 pg_dir:
16 pm_mode:
17 movl $DATA_SEL,%eax
18 movw %ax, %ds
19 movw %ax, %es
20 movw %ax, %fs
21 movw %ax, %gs
22 movw %ax, %ss
23 movl $STACK_BOT,%esp
25 cld
26 movl $0x10200,%esi
27 movl $0x200, %edi
28 movl $(KERNEL_SECT-1)<<7,%ecx
29 rep
30 movsl
31 jmp next
35 * tmp_floppy_area is used by the floppy-driver when DMA cannot
36 * reach to a buffer-block. It needs to be aligned, so that it isn't
37 * on a 64kB border.
39 /*.globl tmp_floppy_area
40 .org 0x1000
41 tmp_floppy_area:
42 .fill 1024,1,0
43 */
44 next:
45 call init # we count on it.