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 | |||
864 | serge | 7 | |
851 | serge | 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 | public _poweroff |
863 | serge | 23 | |
851 | serge | 24 | |
25 | |||
26 | |||
27 | |||
28 | |||
29 | |||
30 | |||
855 | serge | 31 | |
851 | serge | 32 | |
33 | |||
34 | |||
35 | |||
855 | serge | 36 | |
37 | |||
38 | |||
851 | serge | 39 | and eax, not 0x80000001 |
40 | mov cr0, eax |
||
41 | jmp far 0x1000:start_of_code |
||
42 | |||
43 | |||
44 | |||
45 | |||
46 | include "preboot.inc" |
||
47 | |||
48 | |||
49 | include "booteng.inc" ; english system boot messages |
||
50 | else if lang eq ru |
||
51 | include "bootru.inc" ; russian system boot messages |
||
52 | include "ru.inc" ; Russian font |
||
53 | else if lang eq et |
||
54 | include "bootet.inc" ; estonian system boot messages |
||
55 | include "et.inc" ; Estonian font |
||
56 | else |
||
57 | include "bootge.inc" ; german system boot messages |
||
58 | end if |
||
59 | |||
60 | |||
61 | |||
62 | |||
63 | include "../bus/pci/pci16.inc" |
||
64 | include "../detect/biosdisk.inc" |
||
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 | |||
863 | serge | 76 | |
77 | ;_leave_16bit: |
||
78 | ; |
||
79 | ; cli |
||
80 | ; mov eax, cr0 |
||
81 | ; or eax, CR0_PG+CR0_WP+CR0_PE |
||
82 | ; mov cr0, eax |
||
83 | ; hlt |
||
84 | |||
85 | |||
851 | serge | 86 | rmode_idt: |
863 | serge | 87 | dw 0x400 |
88 | dd 0 |
||
89 | dw 0 |
||
90 | |||
91 | |||
92 | _poweroff: |
||
93 | mov eax, cr0 |
||
855 | serge | 94 | and eax, not 0x80000001 |
95 | mov cr0, eax |
||
96 | jmp far 0x1000:@F |
||
97 | @@: |
||
98 | mov eax, 0x3000 |
||
99 | mov ss, ax |
||
100 | mov esp, 0xEC00 |
||
101 | |||
102 | |||
103 | mov ds, bx |
||
104 | mov es, bx |
||
105 | |||
106 | |||
863 | serge | 107 | |
108 | |||
109 | mov ax, 5304h |
||
110 | xor bx, bx |
||
111 | int 15h |
||
112 | ;!!!!!!!!!!!!!!!!!!!!!!!! |
||
113 | mov ax,0x5300 |
||
114 | xor bx,bx |
||
115 | int 0x15 |
||
116 | push ax |
||
117 | |||
118 | |||
119 | xor bx,bx |
||
120 | int 0x15 |
||
121 | |||
122 | |||
123 | mov bx,1 |
||
124 | mov cx,bx |
||
125 | int 0x15 |
||
126 | |||
127 | |||
128 | xor bx,bx |
||
129 | pop cx |
||
130 | int 0x15 |
||
131 | |||
132 | |||
133 | mov bx,1 |
||
134 | mov cx,bx |
||
135 | int 0x15 |
||
136 | |||
137 | |||
138 | mov bx,1 |
||
139 | mov cx,bx |
||
140 | int 0x15 |
||
141 | |||
142 | |||
143 | mov bx,1 |
||
144 | mov cx,3 |
||
145 | int 0x15 |
||
146 | ;!!!!!!!!!!!!!!!!!!!!!!!! |
||
147 | |||
148 | |||
149 | |||
150 | |||
151 | |||
855 | serge | 152 | _16bit_end: |
153 |