Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 1376 → Rev 1206

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