projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d7c434
)
MBR: shave off another byte
author
H. Peter Anvin
<hpa@zytor.com>
Thu, 12 Jul 2007 00:44:18 +0000
(17:44 -0700)
committer
H. Peter Anvin
<hpa@zytor.com>
Thu, 12 Jul 2007 00:44:18 +0000
(17:44 -0700)
Shave off another byte by using the not-frequently-used jmpw *%sp
instruction!
mbr/mbr.S
patch
|
blob
|
history
diff --git
a/mbr/mbr.S
b/mbr/mbr.S
index
d2e7d0f
..
0822b53
100644
(file)
--- 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
+ jmp
w *%sp /* %sp == bootsec */
disk_error:
call error