2 * GRUB Utilities -- Utilities for GRUB Legacy, GRUB2 and GRUB for DOS
3 * Copyright (C) 2007 Bean (bean123@126.com)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <grub/machine/kernel.h>
34 // Move itself to 0x800:0
49 ljmp $0, $(jump_start-start+0x8000)
52 // Move data from 0x2040:0 to 0x820:0
59 movb %dh, (GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE + 2)
60 movl GRUB_DECOMPRESSOR_MACHINE_COMPRESSED_SIZE, %eax
61 addl $GRUB_DECOMPRESSOR_I386_PC_MAX_DECOMPRESSOR_SIZE, %eax
94 ljmp $0, $(0x8000 + 0x200)
96 . = _start + 0x200 - 2