mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:52:57 +00:00
Boot sector for regression tests: Do always boot hdd if there is a MDR, otherwise always start the installation.
svn path=/trunk/; revision=25287
This commit is contained in:
parent
863cdcf393
commit
5d34a990dc
1 changed files with 10 additions and 43 deletions
|
@ -41,8 +41,6 @@
|
||||||
; Note: The Makefile builds one version with DEBUG_MESSAGES automatically.
|
; Note: The Makefile builds one version with DEBUG_MESSAGES automatically.
|
||||||
;%define DEBUG_MESSAGES ; Uncomment to get debugging messages
|
;%define DEBUG_MESSAGES ; Uncomment to get debugging messages
|
||||||
|
|
||||||
%define WAIT_FOR_KEY
|
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; BEGIN THE BIOS/CODE/DATA SEGMENT
|
; BEGIN THE BIOS/CODE/DATA SEGMENT
|
||||||
|
@ -137,47 +135,22 @@ relocate:
|
||||||
call writestr
|
call writestr
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
; check if there is a mbr on the hdd if so boot from it
|
||||||
|
|
||||||
; Make sure the keyboard buffer is empty
|
|
||||||
%ifdef WAIT_FOR_KEY
|
|
||||||
.kbd_buffer_test:
|
|
||||||
call pollchar
|
|
||||||
jz .kbd_buffer_empty
|
|
||||||
call getchar
|
|
||||||
jmp .kbd_buffer_test
|
|
||||||
.kbd_buffer_empty:
|
|
||||||
|
|
||||||
; Check if there is harddisk
|
|
||||||
pusha
|
pusha
|
||||||
mov ax, 0800h
|
mov ax, 0201h
|
||||||
mov dx, 0080h
|
mov dx, 0080h
|
||||||
|
mov cx, 0001h
|
||||||
|
mov bx, trackbuf
|
||||||
int 13h
|
int 13h
|
||||||
popa
|
popa
|
||||||
jmp .boot_cdrom
|
jc .boot_cdrom ; could not read hdd
|
||||||
|
|
||||||
; Display the 'Press key' message and wait for a maximum of 5 seconds
|
push ax
|
||||||
call crlf
|
mov ax, word [trackbuf+510]
|
||||||
mov si, presskey_msg ; si points to 'Press key' message
|
cmp ax, 0
|
||||||
call writestr ; display the message
|
je .boot_cdrom ; no boot sector found (hopefully there are no weird bootsectors which begin with 0)
|
||||||
|
pop ax
|
||||||
mov byte [TimeoutCount], 5
|
|
||||||
.next_second:
|
|
||||||
mov eax, [BIOS_timer] ; load current tick counter
|
|
||||||
add eax, 19 ;
|
|
||||||
|
|
||||||
.poll_again:
|
|
||||||
call pollchar
|
|
||||||
jnz .boot_cdrom
|
|
||||||
|
|
||||||
mov ebx, [BIOS_timer]
|
|
||||||
cmp eax, ebx
|
|
||||||
jnz .poll_again
|
|
||||||
|
|
||||||
mov si, dot_msg ; print '.'
|
|
||||||
call writestr
|
|
||||||
dec byte [TimeoutCount] ; decrement timeout counter
|
|
||||||
jz .boot_harddisk
|
|
||||||
jmp .next_second
|
|
||||||
|
|
||||||
.boot_harddisk:
|
.boot_harddisk:
|
||||||
call crlf
|
call crlf
|
||||||
|
@ -199,14 +172,8 @@ relocate:
|
||||||
mov dx, 0080h
|
mov dx, 0080h
|
||||||
|
|
||||||
jmp 0:0x7C00
|
jmp 0:0x7C00
|
||||||
%endif
|
|
||||||
|
|
||||||
.boot_cdrom:
|
.boot_cdrom:
|
||||||
%ifdef WAIT_FOR_KEY
|
|
||||||
call crlf
|
|
||||||
call crlf
|
|
||||||
%endif
|
|
||||||
|
|
||||||
; Save and display the boot drive number
|
; Save and display the boot drive number
|
||||||
mov [DriveNo], dl
|
mov [DriveNo], dl
|
||||||
%ifdef DEBUG_MESSAGES
|
%ifdef DEBUG_MESSAGES
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue