forked from KolibriOS/kolibrios
prepare for cd load (bx='m0' set by loader).
git-svn-id: svn://kolibrios.org@543 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6a21548368
commit
263374dacd
@ -18,7 +18,7 @@ $Revision$
|
|||||||
|
|
||||||
|
|
||||||
; Максимальное количество повторений операции чтения
|
; Максимальное количество повторений операции чтения
|
||||||
MaxRetr equ 3
|
MaxRetr equ 10
|
||||||
; Предельное время ожидания готовности к приему команды
|
; Предельное время ожидания готовности к приему команды
|
||||||
; (в тиках)
|
; (в тиках)
|
||||||
BSYWaitTime equ 1000 ;2
|
BSYWaitTime equ 1000 ;2
|
||||||
@ -69,6 +69,7 @@ ReadCD:
|
|||||||
;********************************************
|
;********************************************
|
||||||
ReadCDWRetr:
|
ReadCDWRetr:
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
; Цикл, пока команда не выполнена успешно или не
|
; Цикл, пока команда не выполнена успешно или не
|
||||||
; исчерпано количество попыток
|
; исчерпано количество попыток
|
||||||
mov ECX,MaxRetr
|
mov ECX,MaxRetr
|
||||||
@ -77,6 +78,11 @@ ReadCDWRetr:
|
|||||||
call ReadCD
|
call ReadCD
|
||||||
cmp [DevErrorCode],0
|
cmp [DevErrorCode],0
|
||||||
je @@End_4
|
je @@End_4
|
||||||
|
|
||||||
|
or ecx,ecx ;{SPraid.simba} (for cd load)
|
||||||
|
jz @@End_4
|
||||||
|
dec ecx
|
||||||
|
|
||||||
cmp [timer_ticks_enable],0
|
cmp [timer_ticks_enable],0
|
||||||
jne @f
|
jne @f
|
||||||
mov eax,NoTickWaitTime
|
mov eax,NoTickWaitTime
|
||||||
|
@ -82,6 +82,7 @@ szSTART db 'START',0
|
|||||||
szEXPORTS db 'EXPORTS',0
|
szEXPORTS db 'EXPORTS',0
|
||||||
szIMPORTS db 'IMPORTS',0
|
szIMPORTS db 'IMPORTS',0
|
||||||
|
|
||||||
|
read_firstapp db '/sys/'
|
||||||
firstapp db 'LAUNCHER',0
|
firstapp db 'LAUNCHER',0
|
||||||
|
|
||||||
char db '/sys/FONTS/CHAR.MT',0
|
char db '/sys/FONTS/CHAR.MT',0
|
||||||
|
@ -27,7 +27,10 @@ tmp_file_name_table dd ?
|
|||||||
endg
|
endg
|
||||||
|
|
||||||
; use bx_from_load and init system directory /sys
|
; use bx_from_load and init system directory /sys
|
||||||
Parser_params:
|
proc Parser_params
|
||||||
|
locals
|
||||||
|
buff db 4 dup(?) ; for test cd
|
||||||
|
endl
|
||||||
mov eax,[OS_BASE+0x10000+bx_from_load]
|
mov eax,[OS_BASE+0x10000+bx_from_load]
|
||||||
mov ecx,sysdir_path
|
mov ecx,sysdir_path
|
||||||
mov [ecx-64],dword 'sys'
|
mov [ecx-64],dword 'sys'
|
||||||
@ -37,6 +40,27 @@ Parser_params:
|
|||||||
mov [ecx+3],byte ah
|
mov [ecx+3],byte ah
|
||||||
mov [ecx+4],byte 0
|
mov [ecx+4],byte 0
|
||||||
ret
|
ret
|
||||||
|
@@:
|
||||||
|
cmp al,'m' ; if ram disk
|
||||||
|
jnz @f
|
||||||
|
mov [ecx],dword 'CD?/' ; if cd disk {m}
|
||||||
|
mov [ecx+4],byte '1'
|
||||||
|
mov [ecx+5],dword '/KOL'
|
||||||
|
mov [ecx+9],dword 'IBRI'
|
||||||
|
mov [ecx+13],byte 0
|
||||||
|
.next_cd:
|
||||||
|
mov [ecx+2],byte ah
|
||||||
|
inc ah
|
||||||
|
cmp ah,'5'
|
||||||
|
je .not_found_cd
|
||||||
|
lea edx,[buff]
|
||||||
|
pushad
|
||||||
|
stdcall read_file,read_firstapp,edx,0,4
|
||||||
|
popad
|
||||||
|
cmp [edx],dword 'MENU'
|
||||||
|
jne .next_cd
|
||||||
|
jmp .ok
|
||||||
|
|
||||||
@@:
|
@@:
|
||||||
sub al,49
|
sub al,49
|
||||||
mov [ecx],dword 'HD?/' ; if hard disk
|
mov [ecx],dword 'HD?/' ; if hard disk
|
||||||
@ -45,7 +69,10 @@ Parser_params:
|
|||||||
mov [ecx+5],dword '/KOL'
|
mov [ecx+5],dword '/KOL'
|
||||||
mov [ecx+9],dword 'IBRI'
|
mov [ecx+9],dword 'IBRI'
|
||||||
mov [ecx+13],byte 0
|
mov [ecx+13],byte 0
|
||||||
|
.ok:
|
||||||
|
.not_found_cd:
|
||||||
ret
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
proc load_file_parse_table
|
proc load_file_parse_table
|
||||||
stdcall kernel_alloc,0x1000
|
stdcall kernel_alloc,0x1000
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
;; Iliya Mihailov (Ghost)
|
;; Iliya Mihailov (Ghost)
|
||||||
;; Sergey Semyonov (Serge)
|
;; Sergey Semyonov (Serge)
|
||||||
;; Johnny_B
|
;; Johnny_B
|
||||||
|
;; SPraid (simba)
|
||||||
;;
|
;;
|
||||||
;; Data in this file was originally part of MenuetOS project which is
|
;; Data in this file was originally part of MenuetOS project which is
|
||||||
;; distributed under the terms of GNU GPL. It is modified and redistributed as
|
;; distributed under the terms of GNU GPL. It is modified and redistributed as
|
||||||
|
Loading…
Reference in New Issue
Block a user