Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 1206 → Rev 1376

/kernel/branches/net/hid/keyboard.inc
Property changes:
Modified: svn:keywords
-Revision
\ No newline at end of property
+Rev
\ No newline at end of property
Added: svn:mergeinfo
/kernel/branches/net/hid/mousedrv.inc
51,12 → 51,13
draw_mouse_under:
; return old picture
 
cmp [set_hw_cursor], 0
jz @F
cmp [_display.restore_cursor], 0
je @F
 
pushad
movzx eax,word [X_UNDER]
movzx ebx,word [Y_UNDER]
stdcall [hw_restore], eax, ebx
stdcall [_display.restore_cursor], eax, ebx
popad
ret
@@:
97,7 → 98,7
 
save_draw_mouse:
 
cmp [set_hw_cursor], 0
cmp [_display.move_cursor], 0
je .no_hw_cursor
pushad
 
111,8 → 112,8
mov ecx, [Screen_Max_X]
inc ecx
mul ecx
 
movzx edx, byte [display_data+ebx+eax]
add eax, [_WinMapAddress]
movzx edx, byte [ebx+eax]
shl edx, 8
mov esi, [edx+SLOT_BASE+APPDATA.cursor]
 
119,20 → 120,17
cmp esi, [current_cursor]
je .draw
 
; cmp [esi+CURSOR.magic], 'CURS'
; jne .fail
 
push esi
call [select_hw_cursor]
call [_display.select_cursor]
mov [current_cursor], esi
.draw:
stdcall [set_hw_cursor], esi
stdcall [_display.move_cursor], esi
popad
ret
.fail:
mov ecx, [def_cursor]
mov [edx+SLOT_BASE+APPDATA.cursor], ecx
stdcall [set_hw_cursor], ecx ; stdcall: [esp]=ebx,eax
stdcall [_display.move_cursor], ecx ; stdcall: [esp]=ebx,eax
popad
ret
 
292,7 → 290,7
inc ecx
imul ecx,ebx
add ecx,eax
add ecx, display_data
add ecx, [_WinMapAddress]
mov eax, [CURRENT_TASK]
movzx ebx, byte [ecx]
cmp eax,ebx
Property changes:
Modified: svn:keywords
-Revision
\ No newline at end of property
+Rev
\ No newline at end of property
Added: svn:mergeinfo
/kernel/branches/net/hid/set_dtc.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2009. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17,7 → 17,7
; ebx =3 - set alarm-clock ecx - 00SSMMHH
; out: 0 -Ok 1 -wrong format 2 -battery low
sys_settime:
mov ecx,eax
cli
mov al,0x0d
out 0x70,al
24,130 → 24,132
in al,0x71
bt ax,7
jnc bat_low
cmp ecx,2 ;day of week
cmp ebx,2 ;day of week
jne nosetweek
test ebx,ebx ;test day of week
test ecx,ecx ;test day of week
je wrongtime
cmp ebx,7
cmp ecx,7
ja wrongtime
mov dx,0x70
mov edx,0x70
call startstopclk
dec edx
mov al,6
out dx,al
inc edx
mov al,bl
mov al,cl
out dx,al
jmp endsettime
nosetweek: ;set date
cmp ecx,1
cmp ebx,1
jne nosetdate
cmp bl,0x99 ;test year
cmp cl,0x99 ;test year
ja wrongtime
shl ebx,4
cmp bl,0x90
shl ecx,4
cmp cl,0x90
ja wrongtime
cmp bh,0x99 ;test month
cmp ch,0x99 ;test month
ja wrongtime
shr ebx,4
test bh,bh
shr ecx,4
test ch,ch
je wrongtime
cmp bh,0x12
cmp ch,0x12
ja wrongtime
shl ebx,8
bswap ebx ;ebx=00YYMMDD
test bl,bl ;test day
shl ecx,8
bswap ecx ;ebx=00YYMMDD
test cl,cl ;test day
je wrongtime
shl ebx,4
cmp bl,0x90
shl ecx,4
cmp cl,0x90
ja wrongtime
shr ebx,4
cmp bh,2 ;February
shr ecx,4
cmp ch,2 ;February
jne testday
cmp bl,0x29
cmp cl,0x29
ja wrongtime
jmp setdate
testday:
cmp bh,8
cmp ch,8
jb testday1 ;Aug-Dec
bt bx,8
bt cx,8
jnc days31
jmp days30
testday1:
bt bx,8 ;Jan-Jul ex.Feb
bt cx,8 ;Jan-Jul ex.Feb
jnc days30
days31:
cmp bl,0x31
cmp cl,0x31
ja wrongtime
jmp setdate
days30:
cmp bl,0x30
cmp cl,0x30
ja wrongtime
setdate:
mov dx,0x70
mov edx,0x70
call startstopclk
dec edx
mov al,7 ;set days
out dx,al
inc edx
mov al,bl
mov al,cl
out dx,al
dec edx
mov al,8 ;set months
out dx,al
inc edx
mov al,bh
mov al,ch
out dx,al
dec edx
mov al,9 ;set years
out dx,al
inc edx
shr ebx,8
mov al,bh
shr ecx,8
mov al,ch
out dx,al
jmp endsettime
nosetdate: ;set time or alarm-clock
cmp ecx,3
cmp ebx,3
ja wrongtime
cmp bl,0x23
cmp cl,0x23
ja wrongtime
cmp bh,0x59
cmp ch,0x59
ja wrongtime
shl ebx,4
cmp bl,0x90
shl ecx,4
cmp cl,0x90
ja wrongtime
cmp bh,0x92
cmp ch,0x92
ja wrongtime
shl ebx,4
bswap ebx ;00HHMMSS
cmp bl,0x59
shl ecx,4
bswap ecx ;00HHMMSS
cmp cl,0x59
ja wrongtime
shl ebx,4
cmp bl,0x90
shl ecx,4
cmp cl,0x90
ja wrongtime
shr ebx,4
mov dx,0x70
shr ecx,4
 
mov edx,0x70
call startstopclk
dec edx
cmp ecx,3
cmp ebx,3
je setalarm
xor eax,eax ;al=0-set seconds
out dx,al
inc edx
mov al,bl
mov al,cl
out dx,al
dec edx
mov al,2 ;set minutes
out dx,al
inc edx
mov al,bh
mov al,ch
out dx,al
dec edx
mov al,4 ;set hours
out dx,al
inc edx
shr ebx,8
mov al,bh
shr ecx,8
mov al,ch
out dx,al
jmp endsettime
setalarm:
154,20 → 156,20
mov al,1 ;set seconds for al.
out dx,al
inc edx
mov al,bl
mov al,cl
out dx,al
dec edx
mov al,3 ;set minutes for al.
out dx,al
inc edx
mov al,bh
mov al,ch
out dx,al
dec edx
mov al,5 ;set hours for al.
out dx,al
inc edx
shr ebx,8
mov al,bh
shr ecx,8
mov al,ch
out dx,al
dec edx
mov al,0x0b ;enable irq's
180,15 → 182,15
dec edx
call startstopclk
sti
mov [esp+36],dword 0
and [esp+36-4],dword 0
ret
bat_low:
sti
mov [esp+36],dword 2
mov [esp+36-4],dword 2
ret
wrongtime:
sti
mov [esp+36],dword 1
mov [esp+36-4],dword 1
ret
 
startstopclk:
Property changes:
Modified: svn:keywords
-Revision
\ No newline at end of property
+Rev
\ No newline at end of property
Added: svn:mergeinfo