Subversion Repositories Kolibri OS

Rev

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

Rev 3732 Rev 3742
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;
2
;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved.
3
;; Copyright (C) KolibriOS team 2004-2013. 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: 3732 $
74
$Revision: 3742 $
Line 354... Line 354...
354
        call    mutex_init
354
        call    mutex_init
Line 355... Line 355...
355
 
355
 
356
        mov     ecx, application_table_mutex
356
        mov     ecx, application_table_mutex
Line -... Line 357...
-
 
357
        call    mutex_init
-
 
358
 
-
 
359
        mov     ecx, ide_mutex
-
 
360
        call    mutex_init
-
 
361
        mov     ecx, ide_channel1_mutex
-
 
362
        call    mutex_init
-
 
363
        mov     ecx, ide_channel2_mutex
357
        call    mutex_init
364
        call    mutex_init
358
 
365
 
359
; SAVE REAL MODE VARIABLES
366
; SAVE REAL MODE VARIABLES
360
        xor     eax, eax
367
        xor     eax, eax
361
        mov     ax, [BOOT_VARS + BOOT_IDE_PI_16]
368
        mov     ax, [BOOT_VARS + BOOT_IDE_PI_16]
Line 1654... Line 1661...
1654
        jnz     nsyse5
1661
        jnz     nsyse5
1655
        mov     [syslang], ecx
1662
        mov     [syslang], ecx
1656
        ret
1663
        ret
1657
   nsyse5:
1664
   nsyse5:
Line 1658... Line 1665...
1658
 
1665
 
1659
        sub     ebx, 2          ; HD BASE
1666
        sub     ebx, 2          ; HD BASE - obsolete
Line 1660... Line -...
1660
        jnz     nsyse7
-
 
1661
 
-
 
1662
        test    ecx, ecx
-
 
1663
        jz      nosethd
-
 
1664
 
-
 
1665
        cmp     ecx, 4
-
 
1666
        ja      nosethd
-
 
1667
        mov     [hd_base], cl
-
 
1668
 
-
 
1669
        cmp     ecx, 1
-
 
1670
        jnz     noprmahd
-
 
1671
        mov     eax, [hd_address_table]
-
 
1672
        mov     [hdbase], eax   ;0x1f0
-
 
1673
        and     dword [hdid], 0x0
-
 
1674
        mov     dword [hdpos], ecx
-
 
1675
;     call set_FAT32_variables
-
 
1676
   noprmahd:
-
 
1677
 
-
 
1678
        cmp     ecx, 2
-
 
1679
        jnz     noprslhd
-
 
1680
        mov     eax, [hd_address_table]
-
 
1681
        mov     [hdbase], eax   ;0x1f0
-
 
1682
        mov     [hdid], 0x10
-
 
1683
        mov     dword [hdpos], ecx
-
 
1684
;     call set_FAT32_variables
-
 
1685
   noprslhd:
-
 
1686
 
-
 
1687
        cmp     ecx, 3
-
 
1688
        jnz     nosemahd
-
 
1689
        mov     eax, [hd_address_table+16]
-
 
1690
        mov     [hdbase], eax   ;0x170
-
 
1691
        and     dword [hdid], 0x0
-
 
1692
        mov     dword [hdpos], ecx
-
 
1693
;     call set_FAT32_variables
-
 
1694
   nosemahd:
-
 
1695
 
-
 
1696
        cmp     ecx, 4
-
 
1697
        jnz     noseslhd
-
 
1698
        mov     eax, [hd_address_table+16]
-
 
1699
        mov     [hdbase], eax   ;0x170
-
 
1700
        mov     [hdid], 0x10
-
 
1701
        mov     dword [hdpos], ecx
-
 
1702
;     call set_FAT32_variables
-
 
1703
   noseslhd:
-
 
1704
        call    reserve_hd1
-
 
1705
        call    reserve_hd_channel
-
 
1706
        call    free_hd_channel
1667
        jnz     nsyse7
1707
        and     dword [hd1_status], 0     ; free
1668
 
Line 1708... Line -...
1708
   nosethd:
-
 
1709
        ret
-
 
1710
 
-
 
1711
iglobal
-
 
1712
hd_base db 0
1669
   nosethd:
Line 1713... Line 1670...
1713
endg
1670
        ret
1714
 
1671
 
1715
nsyse7:
1672
nsyse7:
1716
 
-
 
1717
;     cmp  eax,8                      ; HD PARTITION
-
 
1718
        dec     ebx
-
 
1719
        jnz     nsyse8
-
 
1720
        mov     [fat32part], ecx
-
 
1721
;     call set_FAT32_variables
-
 
1722
        call    reserve_hd1
-
 
1723
        call    reserve_hd_channel
-
 
1724
        call    free_hd_channel
-
 
1725
;       pusha
1673
 
Line 1726... Line 1674...
1726
        call    choice_necessity_partition_1
1674
;     cmp  eax,8                      ; HD PARTITION - obsolete
1727
;       popa
1675
        dec     ebx
1728
        and     dword [hd1_status], 0   ; free
1676
        jnz     nsyse8
Line 1824... Line 1772...
1824
        ret
1772
        ret
1825
ngsyse5:
1773
ngsyse5:
1826
;     cmp  eax,7
1774
;     cmp  eax,7
1827
        sub     ebx, 2
1775
        sub     ebx, 2
1828
        jnz     ngsyse7
1776
        jnz     ngsyse7
1829
        movzx   eax, [hd_base]
1777
        xor     eax, eax
1830
        mov     [esp+32], eax
1778
        mov     [esp+32], eax
1831
        ret
1779
        ret
1832
ngsyse7:
1780
ngsyse7:
1833
;     cmp  eax,8
1781
;     cmp  eax,8
1834
        dec     ebx
1782
        dec     ebx