Subversion Repositories Kolibri OS

Rev

Rev 7122 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7122 Rev 7132
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: 7122 $
8
$Revision: 7132 $
9
 
9
 
10
 
10
 
11
; Detect all BIOS hard drives.
11
; Detect all BIOS hard drives.
Line 12... Line 12...
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
; Read the number of sectors, bytes per sector. dunkaist, 2017
15
 
15
 
16
        xor     cx, cx
16
        xor     cx, cx
17
        mov     es, cx
17
        mov     es, cx
18
        mov     di, BOOT_BIOS_HD
18
        mov     di, BOOT_LO.bios_hd
19
        mov     byte [es:di-1], cl
19
        mov     byte [es:di-1], cl
Line 60... Line 60...
60
        jc      bddc2
60
        jc      bddc2
61
        cmp     word [es:si], 1Eh
61
        cmp     word [es:si], 1Eh
62
        jb      .noide
62
        jb      .noide
63
        cmp     word [es:si+1Ah], 0xFFFF
63
        cmp     word [es:si+1Ah], 0xFFFF
64
        jz      .noide
64
        jz      .noide
65
        inc     byte [es:BOOT_BIOS_HD_CNT]
65
        inc     byte [es:BOOT_LO.bios_hd_cnt]
66
        mov     al, dl
66
        mov     al, dl
67
        stosb
67
        stosb
68
        push    ds
68
        push    ds
69
        push    si
69
        push    si
70
        lds     si, [es:si+1Ah]
70
        lds     si, [es:si+1Ah]
Line 93... Line 93...
93
        cmp     word [es:si+28h], 'US'
93
        cmp     word [es:si+28h], 'US'
94
        jnz     .nousb
94
        jnz     .nousb
95
        cmp     byte [es:si+2Ah], 'B'
95
        cmp     byte [es:si+2Ah], 'B'
96
        jz      bddc2
96
        jz      bddc2
97
.nousb:
97
.nousb:
98
        inc     byte [es:BOOT_BIOS_HD_CNT]
98
        inc     byte [es:BOOT_LO.bios_hd_cnt]
99
        mov     al, dl
99
        mov     al, dl
100
        stosb
100
        stosb
101
        xor     ax, ax
101
        xor     ax, ax
102
        stosb
102
        stosb
103
        dec     ax
103
        dec     ax