Rev 1055 | Rev 1082 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1055 | Rev 1056 | ||
---|---|---|---|
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: 1055 $ |
8 | $Revision: 1056 $ |
9 | 9 | ||
Line 10... | Line 10... | ||
10 | ; Virtual-8086 mode manager |
10 | ; Virtual-8086 mode manager |
Line 349... | Line 349... | ||
349 | 349 | ||
350 | ; It is only possible to leave virtual-8086 mode by faulting to |
350 | ; It is only possible to leave virtual-8086 mode by faulting to |
351 | ; a protected-mode interrupt handler (typically the general-protection |
351 | ; a protected-mode interrupt handler (typically the general-protection |
Line 352... | Line -... | ||
352 | ; exception handler, which in turn calls the virtual 8086-mode monitor). |
- | |
353 | - | ||
354 | v86_debug_exc: |
- | |
355 | pushad |
- | |
356 | xor eax, eax |
- | |
357 | mov dr6, eax |
- | |
358 | mov bl, 1 |
- | |
359 | jmp v86_exc_c |
- | |
360 | - | ||
361 | v86_page_fault: |
- | |
362 | add esp, 4 |
- | |
363 | pushad |
- | |
364 | mov bl, 14 |
- | |
365 | jmp v86_exc_c |
- | |
366 | - | ||
367 | v86_except_16: |
- | |
368 | pushad |
- | |
369 | mov bl, 16 |
- | |
370 | jmp v86_exc_c |
- | |
371 | v86_except_19: |
- | |
372 | pushad |
- | |
373 | mov bl, 19 |
352 | ; exception handler, which in turn calls the virtual 8086-mode monitor). |
374 | 353 | ||
375 | iglobal |
354 | iglobal |
376 | v86_exc_str1 db 'V86 : unexpected exception ',0 |
355 | v86_exc_str1 db 'V86 : unexpected exception ',0 |
377 | v86_exc_str2 db ' at ',0 |
356 | v86_exc_str2 db ' at ',0 |
Line 385... | Line 364... | ||
385 | v86_io_dword db ' (dword)',13,10,0 |
364 | v86_io_dword db ' (dword)',13,10,0 |
386 | v86_irqerr db 'V86 : IRQ already hooked',13,10,0 |
365 | v86_irqerr db 'V86 : IRQ already hooked',13,10,0 |
387 | endg |
366 | endg |
Line 388... | Line 367... | ||
388 | 367 | ||
389 | v86_exc_c: |
- | |
390 | mov ax, app_data |
- | |
391 | mov ds, ax |
- | |
392 | mov es, ax |
368 | v86_exc_c: |
- | 369 | ; Did we all that we have wanted to do? |
|
- | 370 | cmp bl,1 |
|
- | 371 | jne @f |
|
- | 372 | xor eax, eax |
|
393 | ; Did we all that we have wanted to do? |
373 | mov dr6, eax |
394 | mov eax, [esp+v86_regs.size+10h+18h] |
374 | @@: mov eax, [esp+v86_regs.size+10h+18h] |
395 | cmp word [esp+v86_regs.eip], ax |
375 | cmp word [esp+v86_regs.eip], ax |
396 | jnz @f |
376 | jnz @f |
397 | shr eax, 16 |
377 | shr eax, 16 |
398 | cmp word [esp+v86_regs.cs], ax |
378 | cmp word [esp+v86_regs.cs], ax |