1N/A/*
1N/A * GRUB -- GRand Unified Bootloader
1N/A * Copyright (C) 2000 Free Software Foundation, Inc.
1N/A *
1N/A * This program is free software; you can redistribute it and/or modify
1N/A * it under the terms of the GNU General Public License as published by
1N/A * the Free Software Foundation; either version 2 of the License, or
1N/A * (at your option) any later version.
1N/A *
1N/A * This program is distributed in the hope that it will be useful,
1N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of
1N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1N/A * GNU General Public License for more details.
1N/A *
1N/A * You should have received a copy of the GNU General Public License
1N/A * along with this program; if not, write to the Free Software
1N/A * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1N/A */
1N/A
1N/A .file "pxeloader.S"
1N/A .text
1N/A
1N/A /* Start with the prehistoric environment... */
1N/A .code16
1N/A
1N/A /* Let's go */
1N/A.globl _start; _start:
1N/A movw %sp, %bp
1N/A movw %ss:4(%bp), %ax
1N/A pushw %ax
1N/A movw %ss:6(%bp), %ax
1N/A pushw %ax
1N/A call 1f
1N/A1: popw %bx
1N/A
1N/A /* Save !PXE address */
1N/A popw %ax
1N/A movw %ax, %cs:(pxeseg-1b)(%bx)
1N/A popw %ax
1N/A movw %ax, %cs:(pxeoff-1b)(%bx)
1N/A movw %ax, %bx
1N/A
1N/A /* Jump to the real world */
1N/A ljmp $0, $0x8200
1N/A
1N/A . = _start + 0x7C80 - 0x7C00
1N/Apxeseg: .word 0
1N/Apxeoff: .word 0
1N/A
1N/A /* This region is a junk. Do you say that this is wasteful?
1N/A But I like that the memory layout of the body is consistent
1N/A among different stage2s rather than scamping just for 1.5KB. */
1N/A . = _start + 0x8200 - 0x7C00 - 1
1N/A .byte 0