mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
Added support for .lst files. Thanks to Art Yerkes.
svn path=/trunk/; revision=2788
This commit is contained in:
parent
29e7f88439
commit
fabd313f2a
4 changed files with 104 additions and 37 deletions
|
@ -1 +1 @@
|
||||||
loadros system32\ntoskrnl.exe system32\hal.dll system32\drivers\ide.sys system32\drivers\vfatfs.sys system32\config\system.hiv
|
loadros system32\ntoskrnl.exe system32\hal.dll bootc.lst
|
8
reactos/bootc.lst
Normal file
8
reactos/bootc.lst
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
system32\drivers\scsiport.sys
|
||||||
|
system32\drivers\atapi.sys
|
||||||
|
system32\drivers\class2.sys
|
||||||
|
system32\drivers\disk.sys
|
||||||
|
system32\drivers\cdrom.sys
|
||||||
|
system32\drivers\vfatfs.sys
|
||||||
|
system32\config\system.hiv
|
||||||
|
*
|
|
@ -18,6 +18,7 @@ md %ROS_INSTALL%\system32\drivers
|
||||||
md %ROS_INSTALL%\media
|
md %ROS_INSTALL%\media
|
||||||
md %ROS_INSTALL%\media\fonts
|
md %ROS_INSTALL%\media\fonts
|
||||||
copy boot.bat %ROS_INSTALL%
|
copy boot.bat %ROS_INSTALL%
|
||||||
|
copy bootc.lst %ROS_INSTALL%
|
||||||
copy aboot.bat %ROS_INSTALL%
|
copy aboot.bat %ROS_INSTALL%
|
||||||
copy system.hiv %ROS_INSTALL%\system32\config
|
copy system.hiv %ROS_INSTALL%\system32\config
|
||||||
copy loaders\dos\loadros.com %ROS_INSTALL%
|
copy loaders\dos\loadros.com %ROS_INSTALL%
|
||||||
|
|
|
@ -249,17 +249,72 @@ entry:
|
||||||
.checkForHive:
|
.checkForHive:
|
||||||
; Check if it is a symbol file
|
; Check if it is a symbol file
|
||||||
cmp byte [bx-5],'.'
|
cmp byte [bx-5],'.'
|
||||||
jne .pe_copy
|
jne .lst_copy
|
||||||
cmp byte [bx-4],'h'
|
cmp byte [bx-4],'h'
|
||||||
jne .pe_copy
|
jne .lst_copy
|
||||||
cmp byte [bx-3],'i'
|
cmp byte [bx-3],'i'
|
||||||
jne .pe_copy
|
jne .lst_copy
|
||||||
cmp byte [bx-2],'v'
|
cmp byte [bx-2],'v'
|
||||||
jne .pe_copy
|
jne .lst_copy
|
||||||
|
|
||||||
call sym_load_module
|
call sym_load_module
|
||||||
jmp .after_copy
|
jmp .after_copy
|
||||||
|
|
||||||
|
.lst_copy:
|
||||||
|
;; Check for a module list file
|
||||||
|
cmp byte [bx-5],'.'
|
||||||
|
jne .pe_copy
|
||||||
|
cmp byte [bx-4],'l'
|
||||||
|
jne .pe_copy
|
||||||
|
cmp byte [bx-3],'s'
|
||||||
|
jne .pe_copy
|
||||||
|
cmp byte [bx-2],'t'
|
||||||
|
jne .pe_copy
|
||||||
|
|
||||||
|
call sym_load_module
|
||||||
|
|
||||||
|
push es
|
||||||
|
mov bx,0x9000
|
||||||
|
push bx
|
||||||
|
pop es
|
||||||
|
xor edi,edi
|
||||||
|
|
||||||
|
.lst_copy_bytes:
|
||||||
|
mov bx,_lst_name_local
|
||||||
|
|
||||||
|
.lst_byte:
|
||||||
|
mov al,[es:di]
|
||||||
|
inc di
|
||||||
|
cmp al,' '
|
||||||
|
jg .lst_not_space
|
||||||
|
mov byte [bx],0
|
||||||
|
inc bx
|
||||||
|
.lst_space:
|
||||||
|
mov al,[es:di]
|
||||||
|
inc di
|
||||||
|
cmp al,' '
|
||||||
|
jle .lst_space
|
||||||
|
.lst_not_space:
|
||||||
|
cmp al,'*'
|
||||||
|
je .lst_end
|
||||||
|
mov [bx],al
|
||||||
|
inc bx
|
||||||
|
jmp .lst_byte
|
||||||
|
|
||||||
|
.lst_end:
|
||||||
|
;; We are here because the terminator was encountered
|
||||||
|
mov byte [bx],0 ; Zero terminate
|
||||||
|
inc bx
|
||||||
|
mov byte [bx],0
|
||||||
|
mov [end_cmd_line],bx ; Put in cmd_line_length
|
||||||
|
mov dx,_lst_name_local; Put this address in di
|
||||||
|
mov di,dx ; This, too, at the start of the
|
||||||
|
; string
|
||||||
|
|
||||||
|
pop es
|
||||||
|
|
||||||
|
jmp .start_loading
|
||||||
|
|
||||||
.pe_copy:
|
.pe_copy:
|
||||||
call pe_load_module
|
call pe_load_module
|
||||||
|
|
||||||
|
@ -291,7 +346,7 @@ entry:
|
||||||
mov dx, di
|
mov dx, di
|
||||||
jmp .start_loading
|
jmp .start_loading
|
||||||
|
|
||||||
.done_loading:
|
.done_loading
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Initialize the multiboot information
|
;; Initialize the multiboot information
|
||||||
|
@ -376,40 +431,40 @@ entry:
|
||||||
|
|
||||||
.done_mem:
|
.done_mem:
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Retrieve BIOS memory map if available
|
;; Retrieve BIOS memory map if available
|
||||||
;;
|
;;
|
||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov edi, _multiboot_address_ranges
|
mov edi, _multiboot_address_ranges
|
||||||
|
|
||||||
.mmap_next:
|
.mmap_next:
|
||||||
|
|
||||||
mov edx, 'PAMS'
|
mov edx, 'PAMS'
|
||||||
mov ecx, multiboot_address_range_size
|
mov ecx, multiboot_address_range_size
|
||||||
mov eax, 0E820h
|
mov eax, 0E820h
|
||||||
int 15h
|
int 15h
|
||||||
jc .done_mmap
|
jc .done_mmap
|
||||||
|
|
||||||
cmp eax, 'PAMS'
|
cmp eax, 'PAMS'
|
||||||
jne .done_mmap
|
jne .done_mmap
|
||||||
|
|
||||||
add edi, multiboot_address_range_size
|
add edi, multiboot_address_range_size
|
||||||
|
|
||||||
cmp ebx, 0
|
cmp ebx, 0
|
||||||
jne .mmap_next
|
jne .mmap_next
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Prepare multiboot memory map structures
|
;; Prepare multiboot memory map structures
|
||||||
;;
|
;;
|
||||||
|
|
||||||
;; Fill in the address descriptor size field
|
;; Fill in the address descriptor size field
|
||||||
mov dword [_multiboot_address_range_descriptor_size], multiboot_address_range_size
|
mov dword [_multiboot_address_range_descriptor_size], multiboot_address_range_size
|
||||||
|
|
||||||
;; Set flag and base address and length of memory map
|
;; Set flag and base address and length of memory map
|
||||||
or dword [_multiboot_flags], 40h
|
or dword [_multiboot_flags], 40h
|
||||||
mov eax, edi
|
mov eax, edi
|
||||||
sub eax, _multiboot_address_ranges
|
sub eax, _multiboot_address_ranges
|
||||||
mov dword [_multiboot_mmap_length], eax
|
mov dword [_multiboot_mmap_length], eax
|
||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov ax, ds
|
mov ax, ds
|
||||||
|
@ -713,7 +768,10 @@ _current_size:
|
||||||
dd 0
|
dd 0
|
||||||
_current_file_size:
|
_current_file_size:
|
||||||
dd 0
|
dd 0
|
||||||
|
|
||||||
|
_lst_name_local:
|
||||||
|
times 2048 db 0
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Load a SYM file
|
;; Load a SYM file
|
||||||
;; DS:DX = Filename
|
;; DS:DX = Filename
|
||||||
|
@ -809,9 +867,9 @@ pe_load_module:
|
||||||
mov dword [_mb_bss_end_addr], 0
|
mov dword [_mb_bss_end_addr], 0
|
||||||
.first:
|
.first:
|
||||||
|
|
||||||
call load_module2
|
call load_module2
|
||||||
call load_module3
|
call load_module3
|
||||||
ret
|
ret
|
||||||
|
|
||||||
load_module1:
|
load_module1:
|
||||||
;;
|
;;
|
||||||
|
@ -848,7 +906,7 @@ load_module1:
|
||||||
mov dx, error_file_seek_failed
|
mov dx, error_file_seek_failed
|
||||||
jmp error
|
jmp error
|
||||||
.seek_start:
|
.seek_start:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
load_module2:
|
load_module2:
|
||||||
;;
|
;;
|
||||||
|
@ -979,7 +1037,7 @@ load_module2:
|
||||||
and di, 0xf000
|
and di, 0xf000
|
||||||
add edi, 0x1000
|
add edi, 0x1000
|
||||||
.no_round:
|
.no_round:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
load_module3:
|
load_module3:
|
||||||
mov bx, [_multiboot_mods_count]
|
mov bx, [_multiboot_mods_count]
|
||||||
|
|
Loading…
Reference in a new issue