NEWS: document changes in 4.07
[profile/ivi/syslinux.git] / mbr / mbr.S
index 2407663..b71cfb7 100644 (file)
--- a/mbr/mbr.S
+++ b/mbr/mbr.S
@@ -26,6 +26,8 @@
  *
  * ----------------------------------------------------------------------- */
 
+#include "adjust.h"
+
        .code16
        .text
 
@@ -37,7 +39,7 @@ secpercyl     = (stack-12)
 
 BIOS_kbdflags  = 0x417
 BIOS_page      = 0x462
-       
+
        /* gas/ld has issues with doing this as absolute addresses... */
        .section ".bootsec", "a", @nobits
        .globl  bootsec
@@ -47,8 +49,8 @@ bootsec:
        .text
        .globl  _start
 _start:
+       .byte   0x33, 0xc0      /* xorw %ax, %ax */
        cli
-       xorw    %ax, %ax
        movw    %ax, %ds
        movw    %ax, %ss
        movw    $stack, %sp
@@ -66,12 +68,8 @@ _start:
 
        ljmpw   $0, $next
 next:
-       
-       /* Escape for the user: if Ctrl is pressed, assume drive hd0 */
-       testb   $0x04, BIOS_kbdflags    /* Ctrl pressed */
-       jz      1f
-       movb    $0x80, %dl
-1:
+
+       ADJUST_DRIVE
        pushw   %dx             /* dl -> drive number */
 
        /* Check to see if we have EBIOS */