summaryrefslogtreecommitdiff
path: root/mbr
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-25 15:02:04 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-25 15:02:04 -0800
commit303d00101fe01c3da23e9d99d9cc15532e43a698 (patch)
treebde26b5230de62f8f6cb163812a65e3859e25178 /mbr
parentf88d07e8da591b285a164b770d5bd1373556d3d2 (diff)
downloadsyslinux-303d00101fe01c3da23e9d99d9cc15532e43a698.tar.gz
gptmbr: move advancing %bx into read_sector
Move the advancing of %bx into read_sector, saving 3 bytes.
Diffstat (limited to 'mbr')
-rw-r--r--mbr/gptmbr.S7
1 files changed, 3 insertions, 4 deletions
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: