Subversion Repositories Kolibri OS

Rev

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

Rev 9045 Rev 9265
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2013-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: 9045 $
8
$Revision: 9265 $
9
 
9
 
10
 
10
 
Line 48... Line 48...
48
align 4
48
align 4
49
.2:
49
.2:
50
        dec     ebx  ; 2 - Write the data to the clipboard
50
        dec     ebx  ; 2 - Write the data to the clipboard
51
        jnz     .3
51
        jnz     .3
Line 52... Line 52...
52
 
52
 
53
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
53
; check pointer on kernel address
54
        stdcall is_region_userspace, edx, ecx
54
        stdcall is_region_userspace, edx, ecx
55
        jz      @f
55
        jz      @f
56
        mov     eax, -1
56
        mov     eax, -1
57
        jmp     .exit_1
57
        jmp     .exit_1
58
@@:
-
 
59
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
60
 
58
@@:
61
; check the lock
59
; check the lock
62
        mov     ebx, clipboard_write_lock
60
        mov     ebx, clipboard_write_lock
63
        xor     eax, eax
61
        xor     eax, eax
64
        cmp     [ebx], eax
62
        cmp     [ebx], eax
Line 79... Line 77...
79
        mov     edi, eax
77
        mov     edi, eax
80
        mov     eax, [clipboard_slots]
78
        mov     eax, [clipboard_slots]
81
        shl     eax, 2
79
        shl     eax, 2
82
        add     eax, [clipboard_main_list]
80
        add     eax, [clipboard_main_list]
83
        mov     [eax], edi
81
        mov     [eax], edi
-
 
82
        push    edi       ;save pointer to data
-
 
83
        push    ecx       ;save size data
84
; copy the data into the slot
84
; copy the data into the slot
85
        mov     esi, edx
85
        mov     esi, edx
86
        mov     eax, ecx
86
        mov     eax, ecx
87
        cld
87
        cld
88
        stosd  ; store size of slot
88
        stosd  ; store size of slot
89
        sub     ecx, 4
89
        sub     ecx, 4
90
        add     esi, 4
90
        add     esi, 4
91
        rep movsb ; store slot data
91
        rep movsb ; store slot data
-
 
92
;copy ecx in Dword[clipboard_main_list+clipboard_slots*4]
-
 
93
        pop     ecx
-
 
94
        pop     eax
-
 
95
        mov     [eax], ecx
92
; increase the counter of slots
96
; increase the counter of slots
93
        inc     [clipboard_slots]
97
        inc     [clipboard_slots]
94
; unlock last slot
98
; unlock last slot
95
        xor     eax, eax
99
        xor     eax, eax
96
        mov     [ebx], eax
100
        mov     [ebx], eax