Subversion Repositories Kolibri OS

Rev

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

Rev 7733 Rev 7965
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;
2
;;
3
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved.
3
;; Copyright (C) KolibriOS team 2004-2020. All rights reserved.
4
;; PROGRAMMING:
4
;; PROGRAMMING:
5
;; Ivan Poddubny
5
;; Ivan Poddubny
6
;; Marat Zakiyanov (Mario79)
6
;; Marat Zakiyanov (Mario79)
7
;; VaStaNi
7
;; VaStaNi
8
;; Trans
8
;; Trans
Line 69... Line 69...
69
format binary as "mnt"
69
format binary as "mnt"
Line 70... Line 70...
70
 
70
 
71
include 'macros.inc'
71
include 'macros.inc'
Line 72... Line 72...
72
include 'struct.inc'
72
include 'struct.inc'
Line 73... Line 73...
73
 
73
 
74
$Revision: 7733 $
74
$Revision: 7965 $
Line 2797... Line 2797...
2797
        mov     [esp+32], eax
2797
        mov     [esp+32], eax
2798
        test    eax, eax
2798
        test    eax, eax
2799
        jz      .nomem
2799
        jz      .nomem
2800
        mov     ebx, eax
2800
        mov     ebx, eax
2801
        shr     ebx, 12
2801
        shr     ebx, 12
2802
        or      dword [page_tabs+(ebx-1)*4], DONT_FREE_BLOCK
2802
        or      dword [page_tabs+(ebx-1)*4], MEM_BLOCK_DONT_FREE
2803
        mov     esi, [img_background]
2803
        mov     esi, [img_background]
2804
        shr     esi, 12
2804
        shr     esi, 12
2805
        mov     ecx, [mem_BACKGROUND]
2805
        mov     ecx, [mem_BACKGROUND]
2806
        add     ecx, 0xFFF
2806
        add     ecx, 0xFFF
2807
        shr     ecx, 12
2807
        shr     ecx, 12
Line 2842... Line 2842...
2842
        jnz     .err
2842
        jnz     .err
2843
        mov     eax, ecx
2843
        mov     eax, ecx
2844
        mov     ebx, ecx
2844
        mov     ebx, ecx
2845
        shr     eax, 12
2845
        shr     eax, 12
2846
        mov     ecx, [page_tabs+(eax-1)*4]
2846
        mov     ecx, [page_tabs+(eax-1)*4]
2847
        test    cl, USED_BLOCK+DONT_FREE_BLOCK
2847
        test    cl, MEM_BLOCK_USED or MEM_BLOCK_DONT_FREE
2848
        jz      .err
2848
        jz      .err
2849
        jnp     .err
2849
        jnp     .err
2850
        push    eax
2850
        push    eax
2851
        shr     ecx, 12
2851
        shr     ecx, 12
2852
        dec     ecx
2852
        dec     ecx
Line 2860... Line 2860...
2860
        invlpg  [edx]
2860
        invlpg  [edx]
2861
        pop     eax
2861
        pop     eax
2862
        inc     eax
2862
        inc     eax
2863
        loop    @b
2863
        loop    @b
2864
        pop     eax
2864
        pop     eax
2865
        and     dword [page_tabs+(eax-1)*4], not DONT_FREE_BLOCK
2865
        and     dword [page_tabs+(eax-1)*4], not MEM_BLOCK_DONT_FREE
2866
        stdcall user_free, ebx
2866
        stdcall user_free, ebx
2867
        mov     [esp+32], eax
2867
        mov     [esp+32], eax
2868
        and     [bgrlockpid], 0
2868
        and     [bgrlockpid], 0
2869
        mov     [bgrlock], 0
2869
        mov     [bgrlock], 0
2870
        ret
2870
        ret