aboutsummaryrefslogtreecommitdiffstats
path: root/mbr
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-07-11 17:44:18 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-07-11 17:44:18 -0700
commit6bfbea466b2304fb8ad4c1d718f9c73635ead1c5 (patch)
treef7197de2ad200c70794e5b5adc8b162880c277b9 /mbr
parent3d7c434a87c512c64c78df32f1b548cd502b61f3 (diff)
downloadsyslinux-elf-6bfbea466b2304fb8ad4c1d718f9c73635ead1c5.tar.gz
syslinux-elf-6bfbea466b2304fb8ad4c1d718f9c73635ead1c5.tar.xz
syslinux-elf-6bfbea466b2304fb8ad4c1d718f9c73635ead1c5.zip
MBR: shave off another byte
Shave off another byte by using the not-frequently-used jmpw *%sp instruction!
Diffstat (limited to 'mbr')
-rw-r--r--mbr/mbr.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbr/mbr.S b/mbr/mbr.S
index d2e7d0f0..0822b53f 100644
--- a/mbr/mbr.S
+++ b/mbr/mbr.S
@@ -262,12 +262,12 @@ boot:
jc disk_error
cmpw $0xaa55, (bootsec+510)
jne missing_os /* Not a valid boot sector */
- movw $driveno, %sp
+ movw $driveno, %sp /* driveno == bootsec-6 */
popw %dx /* dl -> drive number */
popw %di /* es:di -> $PnP vector */
popw %es
cli
- jmp bootsec
+ jmpw *%sp /* %sp == bootsec */
disk_error:
call error