Subversion Repositories Kolibri OS

Rev

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

Rev 1065 Rev 1132
Line 66... Line 66...
66
if use_lba
66
if use_lba
67
	mov	ah, 41h
67
        mov     ah, 41h
68
	mov	bx, 55AAh
68
        mov     bx, 55AAh
69
	int	13h
69
        int     13h
70
	mov	si, aNoLBA
70
        mov     si, aNoLBA
71
	jc	err
71
        jc      err_
72
	cmp	bx, 0AA55h
72
        cmp     bx, 0AA55h
73
	jnz	err
73
        jnz     err_
74
	test	cx, 1
74
        test    cx, 1
75
	jz	err
75
        jz      err_
76
else
76
else
77
	mov	ah, 8
77
        mov     ah, 8
78
	int	13h
78
        int     13h
79
	jc	@f		; on error, assume that BPB geometry is valid
79
        jc      @f              ; on error, assume that BPB geometry is valid
80
	mov	al, dh
80
        mov     al, dh
Line 120... Line 120...
120
	jc	noloader
120
        jc      noloader
121
	test	byte [es:di+11], 10h	; directory?
121
        test    byte [es:di+11], 10h    ; directory?
122
	jz	kordldr_ok
122
        jz      kordldr_ok
123
noloader:
123
noloader:
124
	mov	si, aLoaderNotFound
124
        mov     si, aLoaderNotFound
125
err:
125
err_:
126
	call	out_string
126
        call    out_string
127
	mov	si, aPressAnyKey
127
        mov     si, aPressAnyKey
128
	call	out_string
128
        call    out_string
129
	xor	ax, ax
129
        xor     ax, ax
130
	int	16h
130
        int     16h
Line 183... Line 183...
183
	mov	si, sp
183
        mov     si, sp
184
	mov	dl, [bp+BS_DrvNum-0x7C00]
184
        mov     dl, [bp+BS_DrvNum-0x7C00]
185
	mov	ah, 42h
185
        mov     ah, 42h
186
	int	13h
186
        int     13h
187
	mov	si, aReadError
187
        mov     si, aReadError
188
	jc	err
188
        jc      err_
189
; restore stack
189
; restore stack
190
	add	sp, 10h
190
        add     sp, 10h
191
; increase current sector & buffer; decrease number of sectors
191
; increase current sector & buffer; decrease number of sectors
192
	mov	si, cx
192
        mov     si, cx
193
	mov	ax, es
193
        mov     ax, es
Line 255... Line 255...
255
	int	13h	; reset drive
255
        int     13h     ; reset drive
256
	pop	ax
256
        pop     ax
257
	dec	si
257
        dec     si
258
	jnz	@b
258
        jnz     @b
259
	mov	si, aReadError
259
        mov     si, aReadError
260
	jmp	err
260
        jmp     err_
261
@@:
261
@@:
262
	pop	ax
262
        pop     ax
263
	mov	ax, es
263
        mov     ax, es
264
	mov	cx, di
264
        mov     cx, di
265
	shl	cx, 5
265
        shl     cx, 5
Line 387... Line 387...
387
		display d
387
                display d
388
	end repeat
388
        end repeat
389
	display 13,10
389
        display 13,10
390
}
390
}
Line 391... Line 391...
391
 
391