From 303d00101fe01c3da23e9d99d9cc15532e43a698 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 25 Feb 2008 15:02:04 -0800 Subject: gptmbr: move advancing %bx into read_sector Move the advancing of %bx into read_sector, saving 3 bytes. --- mbr/gptmbr.S | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mbr') diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S index 7b5fb97a..b042cbf3 100644 --- a/mbr/gptmbr.S +++ b/mbr/gptmbr.S @@ -35,10 +35,10 @@ sectors = (stack-8) secpercyl = (stack-12) /* Partition table header here */ -phdr = _start + 512 +phdr = 0x7e00 /* Above the boot sector and stack */ /* Partition table sector here */ /* To handle > 32K we need to play segment tricks... */ -psec = 0x8000 /* Above the boot sector and stack */ +psec = _phdr + 512 /* BootGUID */ bootguid = _start + 0x1a8 @@ -135,11 +135,9 @@ next: movl (phdr+0x72),%eax movl (phdr+0x76),%edx - movw $psec,%bx pushw %bx get_ptab: call read_sector - addw $512,%bx call inc64 loopw get_ptab @@ -258,6 +256,7 @@ read_common: addw $16, %sp /* Drop DAPA */ popal jc disk_error + addw $512, %bx /* POint to the next buffer */ ret disk_error: -- cgit v1.2.1