Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                              ;;
  3. ;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;;
  4. ;; Distributed under terms of the GNU General Public License    ;;
  5. ;;                                                              ;;
  6. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7.  
  8. $Revision: 7825 $
  9.  
  10.  
  11. align 4
  12. proc sys_array
  13.         cmp     ebx, 0
  14.         je      sys_init_array
  15.         ret
  16. endp
  17.  
  18. align 4
  19. proc sys_init_array
  20.         push    ecx
  21.         push    edx
  22.         call    sys_index_array
  23.         ret
  24. endp
  25.  
  26. align 4
  27. sys_index_array:
  28.         enter   8, 0
  29.         mov     eax, [ebp+8]
  30.         and     eax, 3
  31.         mov     [ebp-4], eax
  32.         mov     eax, [ebp-4]
  33.         shl     eax, 2
  34.         add     eax, [ebp+0Ch]
  35.         mov     [ebp-8], eax
  36.  
  37.         mov     eax, [ebp-4]
  38.         cmp     [ebp+8], eax
  39.         jne     .A4F4h
  40.         push    10h
  41.         pop     eax
  42.         add     eax, [ebp-8]
  43.         jmp     .A516h
  44.  
  45. .A4F4h:
  46.         mov     esi, [ebp-8]
  47.         cmp     dword [esi], 0
  48.         jne     .A508h
  49.         mov     eax, 68
  50.         mov     ebx, 12
  51.         mov     ecx, 32
  52.         call    malloc
  53.         mov     esi, [ebp-8]
  54.         mov     [esi], eax
  55.  
  56. .A508h:
  57.         push    dword[esi]
  58.         mov     eax, [ebp+8]
  59.         shr     eax, 2
  60.         push    eax
  61.         call    sys_index_array
  62.  
  63. .A516h:
  64.         leave
  65.         ret     8
  66.