This is the third in a series of patches that removes a bug and some glitches from GRUB stage 1. This is against grub-0.94 (alpha), my first two patches applied. Submitted by Wolf Lammen, ookami1gmxde I looked through the complete code of stage 1 and found some oddities. This patch addresses one: removal of a pointless instruction, presumely a leftover from some earlier reworking. Impact: A clean up, saving 4 bytes of code. Details: When entering the code path for lba_mode, memory is accessed using registers DS:SI, without initializing SI. These registers were last set by the message routine, when printing out the notification string (unless a buggy BIOS clobbered this register while executing INT 13, function 41). Thus DS:SI should point to the terminating \0 of the notification string. Using the PC emulator bochs, I verified that "ead\0" from the Read_Error_String was actually loaded into ECX, only to be soon after overwritten by either INT 13, function 8, or by a counter in the copy_buffer path. This patch removes this instruction. --- stage1.S 2004-02-08 19:39:52.000000000 +0100 +++ stage1.new 2004-02-08 19:38:07.000000000 +0100 @@ -176,9 +176,6 @@ jz chs_mode lba_mode: - /* save the total number of sectors */ - movl 0x10(%si), %ecx - /* set %si to the disk address packet */ movw $ABS(disk_address_packet), %si