summaryrefslogtreecommitdiff
path: root/mbr
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-12-23 12:02:52 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-12-23 12:02:52 -0800
commitd0f275981c9289dc4b8df64e72cd9902bf85aebe (patch)
treebc74101d6bcc73ae88c6183f46cefae585a9e52e /mbr
parent8255c94785532b1c6fc4937d710379d4c9f679c4 (diff)
downloadsyslinux-d0f275981c9289dc4b8df64e72cd9902bf85aebe.tar.gz
mbr: Make sure the MBR code starts with the byte 0x33
Apparently some BIOSes (including some Acer Travelmate machines) require an MBR to start with 0x33; apparently Micro$oft MBRs start with 33 C0, an alternate coding of the "xorw %ax,%ax" instruction. As such, follow suit to work on these braindead BIOSes. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'mbr')
-rw-r--r--mbr/altmbr.S2
-rw-r--r--mbr/gptmbr.S2
-rw-r--r--mbr/isohdpfx.S3
-rw-r--r--mbr/mbr.S2
4 files changed, 4 insertions, 5 deletions
diff --git a/mbr/altmbr.S b/mbr/altmbr.S
index 794ab623..1b609051 100644
--- a/mbr/altmbr.S
+++ b/mbr/altmbr.S
@@ -49,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
diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S
index 8ed4cf48..ae0549f0 100644
--- a/mbr/gptmbr.S
+++ b/mbr/gptmbr.S
@@ -55,8 +55,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
diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S
index 0bf807e9..2784fb80 100644
--- a/mbr/isohdpfx.S
+++ b/mbr/isohdpfx.S
@@ -65,9 +65,8 @@ bootsec:
.text
.globl _start
_start:
-
+ .byte 0x33, 0xed /* xorw %bp, %bp */
cli
- xorw %bp, %bp
movw %bp, %ss
movw $stack, %sp
sti
diff --git a/mbr/mbr.S b/mbr/mbr.S
index 7caf4fc4..b71cfb7c 100644
--- a/mbr/mbr.S
+++ b/mbr/mbr.S
@@ -49,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