Subversion Repositories Kolibri OS

Rev

Rev 6333 | Rev 8866 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6333 Rev 8052
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: 6333 $
8
$Revision: 8052 $
9
 
9
 
Line 10... Line 10...
10
; Virtual-8086 mode manager
10
; Virtual-8086 mode manager
Line 356... Line 356...
356
; If faulted EIP exceeds 0xFFFF, we have #GP and it is an error
356
; If faulted EIP exceeds 0xFFFF, we have #GP and it is an error
357
        cmp     word [esp+v86_regs.eip+2], 0
357
        cmp     word [esp+v86_regs.eip+2], 0
358
        jnz     .nogp
358
        jnz     .nogp
359
; Otherwise we can safely access byte at CS:IP
359
; Otherwise we can safely access byte at CS:IP
360
; (because it is #GP, not #PF handler)
360
; (because it is #GP, not #PF handler)
361
; Если бы мы могли схлопотать исключение только из-за чтения байтов кода,
361
; If we could get an exception just because of reading code bytes,
362
; мы бы его уже схлопотали и это было бы не #GP
362
; we would have got it already and it wouldn't be #GP
363
        movzx   esi, word [esp+v86_regs.cs]
363
        movzx   esi, word [esp+v86_regs.cs]
364
        shl     esi, 4
364
        shl     esi, 4
365
        add     esi, [esp+v86_regs.eip]
365
        add     esi, [esp+v86_regs.eip]
366
        lodsb
366
        lodsb
367
        cmp     al, 0xCD        ; int xx command = CD xx
367
        cmp     al, 0xCD        ; int xx command = CD xx