kbd: use a better get_key method
[thunix.git] / boot / head.s
blobb42d2978ce8e8ea41637515fabd7701359f436d1
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
32 call init # we count on it.