Rev 3400 | Rev 3696 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3400 | Rev 3539 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2007-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2007-2012. 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: 3400 $ |
8 | $Revision: 3539 $ |
9 | 9 | ||
Line 10... | Line 10... | ||
10 | ; Virtual-8086 mode manager |
10 | ; Virtual-8086 mode manager |
Line 176... | Line 176... | ||
176 | ; Allocate memory in V86 machine |
176 | ; Allocate memory in V86 machine |
177 | ; in: eax=size (in bytes) |
177 | ; in: eax=size (in bytes) |
178 | ; esi=handle |
178 | ; esi=handle |
179 | ; out: eax=V86 address, para-aligned (0x10 multiple) |
179 | ; out: eax=V86 address, para-aligned (0x10 multiple) |
180 | ; destroys: nothing |
180 | ; destroys: nothing |
181 | ; ¥¤®¯¨á !!! |
181 | ; недописана!!! |
182 | ;v86_alloc: |
182 | ;v86_alloc: |
183 | ; push ebx ecx edx edi |
183 | ; push ebx ecx edx edi |
184 | ; lea ebx, [esi+V86_machine.mutex] |
184 | ; lea ebx, [esi+V86_machine.mutex] |
185 | ; call wait_mutex |
185 | ; call wait_mutex |
186 | ; add eax, 0x1F |
186 | ; add eax, 0x1F |
Line 375... | Line 375... | ||
375 | ; If faulted EIP exceeds 0xFFFF, we have #GP and it is an error |
375 | ; If faulted EIP exceeds 0xFFFF, we have #GP and it is an error |
376 | cmp word [esp+v86_regs.eip+2], 0 |
376 | cmp word [esp+v86_regs.eip+2], 0 |
377 | jnz .nogp |
377 | jnz .nogp |
378 | ; Otherwise we can safely access byte at CS:IP |
378 | ; Otherwise we can safely access byte at CS:IP |
379 | ; (because it is #GP, not #PF handler) |
379 | ; (because it is #GP, not #PF handler) |
380 | ; ᫨ ¡ë ¬ë ¬®£«¨ áå«®¯®â âì ¨áª«î票¥ ⮫쪮 ¨§-§ çâ¥¨ï ¡ ©â®¢ ª®¤ , |
380 | ; Если бы мы могли схлопотать исключение только из-за чтения байтов кода, |
381 | ; ¬ë ¡ë ¥£® 㦥 áå«®¯®â «¨ ¨ íâ® ¡ë«® ¡ë ¥ #GP |
381 | ; мы бы его уже схлопотали и это было бы не #GP |
382 | movzx esi, word [esp+v86_regs.cs] |
382 | movzx esi, word [esp+v86_regs.cs] |
383 | shl esi, 4 |
383 | shl esi, 4 |
384 | add esi, [esp+v86_regs.eip] |
384 | add esi, [esp+v86_regs.eip] |
385 | lodsb |
385 | lodsb |
386 | cmp al, 0xCD ; int xx command = CD xx |
386 | cmp al, 0xCD ; int xx command = CD xx |