Subversion Repositories Kolibri OS

Rev

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

Rev 5363 Rev 6843
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2008-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2008-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: 5363 $
8
$Revision: 6843 $
9
 
9
 
10
 
10
 
-
 
11
; Detect all BIOS hard drives.
Line 11... Line 12...
11
; Detect all BIOS hard drives.
12
; diamond, 2008
12
; diamond, 2008
13
; Do not include USB mass storages. CleverMouse, 2013
13
; Do not include USB mass storages. CleverMouse, 2013
14
; Read the number of sectors, bytes per sector. dunkaist, 2017
14
 
15
 
Line 63... Line 64...
63
        jz      .noide
64
        jz      .noide
64
        inc     byte [es:0x907F]
65
        inc     byte [es:0x907F]
65
        mov     al, dl
66
        mov     al, dl
66
        stosb
67
        stosb
67
        push    ds
68
        push    ds
-
 
69
        push    si
68
        lds     si, [es:si+1Ah]
70
        lds     si, [es:si+1Ah]
69
        mov     al, [si+6]
71
        mov     al, [si+6]
70
        and     al, 0xF
72
        and     al, 0xF
71
        stosb
73
        stosb
72
        mov     al, byte [si+4]
74
        mov     al, byte [si+4]
Line 80... Line 82...
80
        jz      @f
82
        jz      @f
81
        or      ax, -1
83
        or      ax, -1
82
;        mov     ax, -1
84
;        mov     ax, -1
83
@@:
85
@@:
84
        stosw
86
        stosw
-
 
87
        pop     si
85
        pop     ds
88
        pop     ds
86
        jmp     bddc2
89
        jmp     bddc3
87
.noide:
90
.noide:
88
        cmp     word [es:si], 42h
91
        cmp     word [es:si], 42h
89
        jb      .nousb
92
        jb      .nousb
90
        cmp     word [es:si+28h], 'US'
93
        cmp     word [es:si+28h], 'US'
91
        jnz     .nousb
94
        jnz     .nousb
Line 101... Line 104...
101
        stosw
104
        stosw
102
;        mov     al, 0
105
;        mov     al, 0
103
;        stosb
106
;        stosb
104
;        mov     ax, -1
107
;        mov     ax, -1
105
;        stosw
108
;        stosw
-
 
109
bddc3:
-
 
110
        movzx   eax, word[es:si+24]
-
 
111
        stosd
-
 
112
        mov     eax, [es:si+16]
-
 
113
        stosd
-
 
114
        mov     eax, [es:si+20]
-
 
115
        stosd
106
bddc2:
116
bddc2:
107
        cmp     cl, [es:0x475]
117
        cmp     cl, [es:0x475]
108
        jae     bdde
118
        jae     bdde
109
bddc:
119
bddc:
110
        inc     dl
120
        inc     dl