2 ;; -----------------------------------------------------------------------
4 ;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
6 ;; This program is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 ;; Bostom MA 02111-1307, USA; either version 2 of the License, or
10 ;; (at your option) any later version; incorporated herein by reference.
12 ;; -----------------------------------------------------------------------
17 ;; Load a boot sector (or other bootstrap program.)
19 ;; Unlike previous versions of this software, this doesn't require that
20 ;; the length is 512 bytes. This allows PXE bootstraps and WinNT
21 ;; "CD boot sectors" to be invoked.
31 jmp short load_bootsec
33 ; Transfer the superblock
40 xchg dx,ax ; Now EAX = file length
50 push edi ; Save length
55 ; For a BSS boot sector we have to patch.
57 mov edi,100000h+(superblock-bootsec)
64 ; Prepare for shutting down
70 mov dl,[bsDriveNumber]
73 mov di,800h-18 ; Put partition info here
77 pop si ; DS:SI points to partition info
81 ; Close the UDP stack so the PXE stack is in a known state for
86 pop ecx ; Byte count to copy
93 lss sp,[InitStack] ; Reset stack to PXE original
104 mov esi,100000h ; Copy from...
105 mov edi,7C00h ; Copy to...