m_ps2.inc from revision 473

git-svn-id: svn://kolibrios.org@480 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2007-05-08 12:45:59 +00:00
parent 510a108c5d
commit 5fce3b3c95

View File

@ -66,15 +66,13 @@ check_mouse_data_ps2:
; Âû÷èñëèòü íîâîå çíà÷åíèå êîîðäèíàòû ; Âû÷èñëèòü íîâîå çíà÷åíèå êîîðäèíàòû
; êóðñîðà ïî X ; êóðñîðà ïî X
add AX,[MOUSE_X] ;[XCoordinate] add AX,[MOUSE_X] ;[XCoordinate]
cmp AX,0 jns @@M1
jge @@M1 xor eax, eax
mov AX,0
jmp @@M2 jmp @@M2
@@M1: @@M1:
cmp AX,[ScreenWidth] ;ScreenLength cmp AX,[ScreenWidth] ;ScreenLength
jl @@M2 jl @@M2
mov AX,[ScreenWidth] ;ScreenLength-1 mov AX,[ScreenWidth] ;ScreenLength-1
dec ax
@@M2: @@M2:
mov [MOUSE_X],AX ;[XCoordinate] mov [MOUSE_X],AX ;[XCoordinate]
@ -94,15 +92,13 @@ check_mouse_data_ps2:
; ïðîòèâîïîëîæíî ýêðàííîé) ; ïðîòèâîïîëîæíî ýêðàííîé)
neg AX neg AX
add AX,[MOUSE_Y] ;[YCoordinate] add AX,[MOUSE_Y] ;[YCoordinate]
cmp AX,0 jns @@M4
jge @@M4 xor eax, eax
mov AX,0
jmp @@M5 jmp @@M5
@@M4: @@M4:
cmp AX,[ScreenHeight] ;ScreenHeigth cmp AX,[ScreenHeight] ;ScreenHeigth
jl @@M5 jl @@M5
mov AX,[ScreenHeight] ;ScreenHeigth-1 mov AX,[ScreenHeight] ;ScreenHeigth-1
dec ax
@@M5: @@M5:
mov [MOUSE_Y],AX ;[YCoordinate] mov [MOUSE_Y],AX ;[YCoordinate]