Author: mbosma
Date: Thu Jan 4 00:46:46 2007
New Revision: 25287
URL:
http://svn.reactos.org/svn/reactos?rev=25287&view=rev
Log:
Boot sector for regression tests: Do always boot hdd if there is a MDR, otherwise always
start the installation.
Modified:
trunk/reactos/boot/freeldr/bootsect/isobtrt.asm
Modified: trunk/reactos/boot/freeldr/bootsect/isobtrt.asm
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/isob…
==============================================================================
--- trunk/reactos/boot/freeldr/bootsect/isobtrt.asm (original)
+++ trunk/reactos/boot/freeldr/bootsect/isobtrt.asm Thu Jan 4 00:46:46 2007
@@ -40,8 +40,6 @@
; Note: The Makefile builds one version with DEBUG_MESSAGES automatically.
;%define DEBUG_MESSAGES ; Uncomment to get debugging messages
-
-%define WAIT_FOR_KEY
; ---------------------------------------------------------------------------
@@ -137,47 +135,22 @@
call writestr
%endif
-
- ; 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
+; check if there is a mbr on the hdd if so boot from it
+
pusha
- mov ax, 0800h
+ mov ax, 0201h
mov dx, 0080h
+ mov cx, 0001h
+ mov bx, trackbuf
int 13h
popa
- jmp .boot_cdrom
-
- ; Display the 'Press key' message and wait for a maximum of 5 seconds
- call crlf
- mov si, presskey_msg ; si points to 'Press key' message
- call writestr ; display the message
-
- 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
+ jc .boot_cdrom ; could not read hdd
+
+ push ax
+ mov ax, word [trackbuf+510]
+ cmp ax, 0
+ je .boot_cdrom ; no boot sector found (hopefully there are no weird bootsectors which
begin with 0)
+ pop ax
.boot_harddisk:
call crlf
@@ -199,14 +172,8 @@
mov dx, 0080h
jmp 0:0x7C00
-%endif
.boot_cdrom:
-%ifdef WAIT_FOR_KEY
- call crlf
- call crlf
-%endif
-
; Save and display the boot drive number
mov [DriveNo], dl
%ifdef DEBUG_MESSAGES