Rev 6016 | Rev 8866 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6016 | Rev 6333 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2007-2015. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2007-2015. 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: 6016 $ |
8 | $Revision: 6333 $ |
9 | 9 | ||
Line 10... | Line 10... | ||
10 | ; Virtual-8086 mode manager |
10 | ; Virtual-8086 mode manager |
Line 35... | Line 35... | ||
35 | ; initialize mutex |
35 | ; initialize mutex |
36 | and dword [eax+V86_machine.mutex], 0 |
36 | and dword [eax+V86_machine.mutex], 0 |
37 | ; allocate tables |
37 | ; allocate tables |
38 | mov ebx, eax |
38 | mov ebx, eax |
Line 39... | Line 39... | ||
39 | 39 | ||
40 | stdcall create_process, 4096, eax, 4096 ;FIXME |
40 | stdcall create_process, 4096 |
41 | test eax, eax |
41 | test eax, eax |
Line 42... | Line 42... | ||
42 | jz .fail2 |
42 | jz .fail2 |
43 | 43 | ||
Line 49... | Line 49... | ||
49 | test eax, eax |
49 | test eax, eax |
50 | jz .fail2 |
50 | jz .fail2 |
Line 51... | Line 51... | ||
51 | 51 | ||
Line 52... | Line -... | ||
52 | mov [ebx+V86_machine.iopm], eax |
- | |
53 | 52 | mov [ebx+V86_machine.iopm], eax |
|
54 | 53 | ||
55 | ; initialize tables |
54 | ; initialize tables |
56 | push edi |
55 | push edi |
57 | mov edi, eax |
56 | mov edi, eax |
Line 64... | Line 63... | ||
64 | 63 | ||
65 | pushfd |
64 | pushfd |
66 | cli |
65 | cli |
Line 67... | Line -... | ||
67 | mov cr3, eax |
- | |
68 | 66 | mov cr3, eax |
|
Line 69... | Line 67... | ||
69 | 67 | ||
70 | ; now V86 specific: initialize known addresses in first Mb |
68 | ; now V86 specific: initialize known addresses in first Mb |
71 | 69 | ||
Line 107... | Line 105... | ||
107 | @@: |
105 | @@: |
108 | stosd |
106 | stosd |
109 | add eax, edx |
107 | add eax, edx |
110 | loop @b |
108 | loop @b |
Line 111... | Line 109... | ||
111 | 109 | ||
112 | mov eax, sys_proc |
- | |
113 | push ebx |
- | |
114 | call set_cr3 |
110 | mov eax, [sys_proc+PROC.pdt_0_phys] |
115 | pop ebx |
111 | mov cr3, eax |
Line 116... | Line 112... | ||
116 | popfd |
112 | popfd |
Line 117... | Line 113... | ||
117 | 113 |