Author: tkreuzer
Date: Sat Oct 15 13:42:43 2011
New Revision: 54145
URL:
http://svn.reactos.org/svn/reactos?rev=54145&view=rev
Log:
[ISOBTRT]
call it 13h with es set to 0, instead of the transfer buffer segment, that we loaded it
with. Fixes KVM boot.
Modified:
trunk/reactos/boot/freeldr/bootsect/isoboot.S
Modified: trunk/reactos/boot/freeldr/bootsect/isoboot.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/isob…
==============================================================================
--- trunk/reactos/boot/freeldr/bootsect/isoboot.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/bootsect/isoboot.S [iso-8859-1] Sat Oct 15 13:42:43 2011
@@ -144,7 +144,11 @@
jc .boot_cdrom // could not read hdd
push ax
+#ifdef ROS_REGTEST // this change is taken from the original isobtrt.asm
+ mov ax, word ptr ds:[trackbuf+510]
+#else
mov ax, word ptr ds:[trackbuf]
+#endif
cmp ax, 0
je .boot_cdrom // no boot sector found (hopefully there are no weird bootsectors
which begin with 0)
pop ax
@@ -810,10 +814,14 @@
// BP - Sector count
//
getlinsec:
+ push es // save es, we reset it later to 0
+
mov si, offset dapa // Load up the DAPA
mov word ptr ds:[si+4], bx
mov bx, es
mov word ptr ds:[si+6], bx
+ xor bx, bx // reset es to 0, some bioses (KVM) require that
+ mov es, bx
mov dword ptr ds:[si+8], eax
.loop2:
push bp // Sectors left
@@ -836,6 +844,8 @@
and bp, bp
jnz .loop2
mov eax, dword ptr ds:[si+8] // Next sector
+
+ pop es
ret
// INT 13h with retry