diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-07-11 16:38:30 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-07-11 16:38:30 -0700 |
commit | ea75b2912f47ccfd922a2399fe8a7dfdb793f26a (patch) | |
tree | 0cca0ccbb0f7d56d3a36fc2d0c019826800b025f /mbr | |
parent | 9137770dd9710f802dd4ace76d85e8b976dc791b (diff) | |
download | syslinux-ea75b2912f47ccfd922a2399fe8a7dfdb793f26a.tar.gz |
Another 12 bytes shaved off the MBR...
Diffstat (limited to 'mbr')
-rw-r--r-- | mbr/mbr.S | 30 |
1 files changed, 12 insertions, 18 deletions
@@ -111,28 +111,33 @@ next: */ read_sector: pushal -read_sector_cbios: + movw %sp, %si xorl %edx, %edx + movw $bootsec, %bx +read_sector_cbios: divl (secpercyl) - rorb %ah - rorb %ah + shlb $6, %ah movb %ah, %cl movb %al, %ch - movw %dx, %ax + xchgw %dx, %ax divb (sectors) movb %al, %dh incb %ah orb %ah, %cl - movw $bootsec, %bx movw $0x0201, %ax jmp read_common read_sector_ebios: - movw $dapa, %si - movl %eax, 8(%si) + pushl %edx /* MSW of LBA */ + pushl %eax /* LSW of LBA */ + pushw %es /* Buffer segment */ + pushw %bx /* Buffer offset */ + pushw $1 /* Sector count */ + pushw $16 /* Size of packet */ movb $0x42, %ah read_common: movb (driveno), %dl int $0x13 + movw %si, %sp popal ret @@ -286,14 +291,3 @@ disk_error_msg: too_many_active_msg: .ascii "Multiple active partitions." .byte 0 - -#ifndef NO_ALIGN - .balign 4 -#endif -dapa: - .short 16 /* Size of packet */ - .short 1 /* Sector count */ - .short 0x7c00 /* Buffer offset */ - .short 0 /* Buffer segment */ - .long 0 /* LSW of LBA */ - .long 0 /* MSW of LBA */ |