From 6879e4565b2ed27de10e7a22bba568503012ef1a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 8 Sep 2008 17:30:55 -0700 Subject: mbr, gptmbr, isohdpfx: don't lose the carry flag Using addw to restore the stack pointer clobbers CF. Use leaw instead, even though this relies on the BIOS not clobbering %si. Worst case we can add a mov %sp, %si or similar. Signed-off-by: H. Peter Anvin --- mbr/gptmbr.S | 2 +- mbr/isohdpfx.S | 2 +- mbr/mbr.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mbr') diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S index 77408b75..385afe74 100644 --- a/mbr/gptmbr.S +++ b/mbr/gptmbr.S @@ -257,7 +257,7 @@ read_sector_cbios: read_common: movb (%bp), %dl /* driveno */ int $0x13 - addw $16, %sp /* Drop DAPA */ + leaw 16(%si), %sp /* Drop DAPA */ popal jc disk_error addb $2, %bh /* bx += 512: point to the next buffer */ diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S index ece37a76..9a97a5ee 100644 --- a/mbr/isohdpfx.S +++ b/mbr/isohdpfx.S @@ -182,7 +182,7 @@ read_sector_cbios: read_common: movb (driveno), %dl int $0x13 - addw $16, %sp /* Drop DAPA */ + leaw 16(%si), %sp /* Drop DAPA */ popal ret diff --git a/mbr/mbr.S b/mbr/mbr.S index e0d42d6e..722d90db 100644 --- a/mbr/mbr.S +++ b/mbr/mbr.S @@ -144,7 +144,7 @@ read_sector_cbios: read_common: movb (driveno), %dl int $0x13 - addw $16, %sp /* Drop DAPA */ + leaw 16(%si), %sp /* Drop DAPA */ popal ret -- cgit v1.2.3