summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-07-11 16:41:52 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-07-11 16:41:52 -0700
commitd9139b2f937aac9b6ee08cc79da35afde4d832b4 (patch)
treef28761077835a5a066c8ccf36f991ad6573cf795
parent6723c3226ef2394c2fc52b8b2754181ca578cf33 (diff)
downloadsyslinux-d9139b2f937aac9b6ee08cc79da35afde4d832b4.tar.gz
MBR: Handle the stack in read_sector correctly...
-rw-r--r--mbr/mbr.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/mbr/mbr.S b/mbr/mbr.S
index 50e038ad..43b29830 100644
--- a/mbr/mbr.S
+++ b/mbr/mbr.S
@@ -111,7 +111,7 @@ next:
*/
read_sector:
pushal
- movw %sp, %si
+ movw %sp, %bp
xorl %edx, %edx
movw $bootsec, %bx
read_sector_cbios:
@@ -133,11 +133,12 @@ read_sector_ebios:
pushw %bx /* Buffer offset */
pushw $1 /* Sector count */
pushw $16 /* Size of packet */
+ movw %sp, %si
movb $0x42, %ah
read_common:
movb (driveno), %dl
int $0x13
- movw %si, %sp
+ movw %bp, %sp
popal
ret