Rev 854 | Rev 863 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
851 | serge | 1 | |
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 | include "../kglobals.inc" |
||
12 | include "../lang.inc" |
||
13 | |||
14 | |||
854 | serge | 15 | CR0_WP equ 0x00010000 ;write protect |
16 | CR0_PG equ 0x80000000 ;paging |
||
17 | |||
18 | |||
855 | serge | 19 | public _16bit_end |
20 | |||
854 | serge | 21 | |
851 | serge | 22 | |
23 | |||
24 | |||
25 | |||
26 | |||
27 | |||
28 | |||
29 | |||
855 | serge | 30 | |
851 | serge | 31 | |
32 | |||
33 | |||
34 | |||
855 | serge | 35 | |
36 | |||
37 | |||
851 | serge | 38 | and eax, not 0x80000001 |
39 | mov cr0, eax |
||
40 | jmp far 0x1000:start_of_code |
||
41 | |||
42 | |||
43 | |||
44 | |||
45 | include "preboot.inc" |
||
46 | |||
47 | |||
48 | include "booteng.inc" ; english system boot messages |
||
49 | else if lang eq ru |
||
50 | include "bootru.inc" ; russian system boot messages |
||
51 | include "ru.inc" ; Russian font |
||
52 | else if lang eq et |
||
53 | include "bootet.inc" ; estonian system boot messages |
||
54 | include "et.inc" ; Estonian font |
||
55 | else |
||
56 | include "bootge.inc" ; german system boot messages |
||
57 | end if |
||
58 | |||
59 | |||
60 | |||
61 | |||
62 | include "../bus/pci/pci16.inc" |
||
63 | include "../detect/biosdisk.inc" |
||
64 | |||
65 | |||
66 | |||
67 | |||
68 | |||
69 | |||
70 | or eax, CR0_PG+CR0_WP+CR0_PE |
||
854 | serge | 71 | mov cr0, eax |
851 | serge | 72 | |
73 | |||
74 | |||
75 | |||
76 | _enter_16bit: |
||
855 | serge | 77 | mov eax, cr0 |
78 | and eax, not 0x80000001 |
||
79 | mov cr0, eax |
||
80 | jmp far 0x1000:@F |
||
81 | |||
82 | |||
83 | _leave_16bit: |
||
84 | |||
85 | |||
86 | mov eax, cr0 |
||
87 | or eax, CR0_PG+CR0_WP+CR0_PE |
||
88 | mov cr0, eax |
||
89 | hlt |
||
90 | |||
91 | |||
92 | @@: |
||
93 | mov eax, 0x3000 |
||
94 | mov ss, ax |
||
95 | mov esp, 0xEC00 |
||
96 | |||
97 | |||
98 | mov ds, bx |
||
99 | mov es, bx |
||
100 | cli |
||
101 | hlt |
||
102 | |||
103 | |||
104 | _16bit_end: |
||
105 |