Rev 1083 | Rev 2118 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1083 | Rev 1448 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2007-2008. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2007-2008. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 1083 $ |
8 | $Revision: 1448 $ |
9 | 9 | ||
Line 10... | Line 10... | ||
10 | ; Virtual-8086 mode manager |
10 | ; Virtual-8086 mode manager |
Line 89... | Line 89... | ||
89 | 89 | ||
90 | pop esi |
90 | pop esi |
91 | ; now V86 specific: initialize known addresses in first Mb |
91 | ; now V86 specific: initialize known addresses in first Mb |
92 | pop eax |
92 | pop eax |
93 | ; first page - BIOS data (shared between all machines!) |
93 | ; first page - BIOS data (shared between all machines!) |
94 | ; physical address = 0x2f0000 |
94 | ; physical address = 0 |
95 | ; linear address = BOOT_VAR = OS_BASE + 0x2f0000 |
95 | ; linear address = OS_BASE |
96 | mov dword [eax], (BOOT_VAR - OS_BASE) or 111b |
96 | mov dword [eax], 111b |
97 | mov dword [eax+800h], BOOT_VAR |
97 | mov dword [eax+800h], OS_BASE |
98 | ; page before 0xA0000 - Extended BIOS Data Area (shared between all machines!) |
98 | ; page before 0xA0000 - Extended BIOS Data Area (shared between all machines!) |
99 | ; physical address = 0x9C000 |
99 | ; physical address = 0x9C000 |
100 | ; linear address = 0x8009C000 |
100 | ; linear address = 0x8009C000 |
101 | ; (I have seen one computer with EBDA segment = 0x9D80, |
101 | ; (I have seen one computer with EBDA segment = 0x9D80, |
Line 217... | Line 217... | ||
217 | init_sys_v86: |
217 | init_sys_v86: |
218 | call v86_create |
218 | call v86_create |
219 | mov [sys_v86_machine], eax |
219 | mov [sys_v86_machine], eax |
220 | test eax, eax |
220 | test eax, eax |
221 | jz .ret |
221 | jz .ret |
222 | mov byte [BOOT_VAR + 0x500], 0xCD |
222 | mov byte [OS_BASE + 0x500], 0xCD |
223 | mov byte [BOOT_VAR + 0x501], 0x13 |
223 | mov byte [OS_BASE + 0x501], 0x13 |
224 | mov byte [BOOT_VAR + 0x502], 0xF4 |
224 | mov byte [OS_BASE + 0x502], 0xF4 |
225 | mov byte [BOOT_VAR + 0x503], 0xCD |
225 | mov byte [OS_BASE + 0x503], 0xCD |
226 | mov byte [BOOT_VAR + 0x504], 0x10 |
226 | mov byte [OS_BASE + 0x504], 0x10 |
227 | mov byte [BOOT_VAR + 0x505], 0xF4 |
227 | mov byte [OS_BASE + 0x505], 0xF4 |
228 | mov esi, eax |
228 | mov esi, eax |
229 | mov ebx, [eax+V86_machine.pagedir] |
229 | mov ebx, [eax+V86_machine.pagedir] |
230 | ; one page for stack, two pages for results (0x2000 bytes = 16 sectors) |
230 | ; one page for stack, two pages for results (0x2000 bytes = 16 sectors) |
231 | mov dword [ebx+0x99*4+0x1000], 0x99000 or 111b |
231 | mov dword [ebx+0x99*4+0x1000], 0x99000 or 111b |
232 | mov dword [ebx+0x99*4+0x1800], OS_BASE + 0x99000 |
232 | mov dword [ebx+0x99*4+0x1800], OS_BASE + 0x99000 |