From 5fce3b3c9581ce094719ebd7ac64cb51b95a25fd Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Tue, 8 May 2007 12:45:59 +0000 Subject: [PATCH] m_ps2.inc from revision 473 git-svn-id: svn://kolibrios.org@480 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/hid/m_ps2.inc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/kernel/trunk/hid/m_ps2.inc b/kernel/trunk/hid/m_ps2.inc index fe6f97978a..ad7ca2c900 100644 --- a/kernel/trunk/hid/m_ps2.inc +++ b/kernel/trunk/hid/m_ps2.inc @@ -66,15 +66,13 @@ check_mouse_data_ps2: ; Вычислить новое значение координаты ; курсора по X add AX,[MOUSE_X] ;[XCoordinate] - cmp AX,0 - jge @@M1 - mov AX,0 + jns @@M1 + xor eax, eax jmp @@M2 @@M1: cmp AX,[ScreenWidth] ;ScreenLength jl @@M2 mov AX,[ScreenWidth] ;ScreenLength-1 - dec ax @@M2: mov [MOUSE_X],AX ;[XCoordinate] @@ -94,15 +92,13 @@ check_mouse_data_ps2: ; противоположно экранной) neg AX add AX,[MOUSE_Y] ;[YCoordinate] - cmp AX,0 - jge @@M4 - mov AX,0 + jns @@M4 + xor eax, eax jmp @@M5 @@M4: cmp AX,[ScreenHeight] ;ScreenHeigth jl @@M5 mov AX,[ScreenHeight] ;ScreenHeigth-1 - dec ax @@M5: mov [MOUSE_Y],AX ;[YCoordinate]