diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-01-22 14:52:47 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-01-22 14:52:47 -0800 |
commit | e9efa3b65caa4a52b8b42b59f5faa1d14572f29d (patch) | |
tree | d9a3c42c45a66fb40b01ac243aa8bde007fca6e7 | |
parent | 913349589c4071a1096dbfd18600ded56d53d709 (diff) | |
download | syslinux-e9efa3b65caa4a52b8b42b59f5faa1d14572f29d.tar.gz |
mbr: save another 5 bytes by terminating error on newlinesyslinux-3.61-pre4
Save another 5 bytes by making the newline character do double duty as
newline and string terminator.
-rw-r--r-- | mbr/mbr.S | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -109,7 +109,6 @@ next: missing_os: call error .ascii "Missing operating system.\r\n" - .byte 0 /* * read_sector: read a single sector pointed to by %eax to 0x7c00. @@ -249,7 +248,6 @@ scan_partition_table: too_many_active: call error .ascii "Multiple active partitions.\r\n" - .byte 0 /* * boot: invoke the actual bootstrap. (%si) points to the partition @@ -273,7 +271,6 @@ boot: disk_error: call error .ascii "Operating system load error.\r\n" - .byte 0 /* * Print error messages. This is invoked with "call", with the @@ -283,14 +280,13 @@ error: popw %si 2: lodsb - andb %al, %al - jz 3f movb $0x0e, %ah movb (BIOS_page), %bh movb $0x07, %bl - int $0x10 - jmp 2b -3: + int $0x10 /* May destroy %bp */ + cmpb $10, %al /* Newline? */ + jne 2b + int $0x18 /* Boot failure */ die: hlt |