1 ;; -----------------------------------------------------------------------
3 ;; Copyright 1994-2009 H. Peter Anvin - All Rights Reserved
4 ;; Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin
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 ;; Boston 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 file into high memory
23 ; load_high: loads (the remainder of) a file into high memory.
27 ; Inputs: SI = file handle/cluster pointer
28 ; EDI = target address in high memory
29 ; EAX = maximum number of bytes to load
30 ; DX = zero-padding mask (e.g. 0003h for pad to dword)
31 ; BX = subroutine to call at the top of each loop
32 ; (to print status and check for abort)
33 ; [MyHighMemSize] = maximum load address
35 ; Outputs: SI = file handle/cluster pointer
36 ; EBX = first untouched address (not including padding)
37 ; EDI = first untouched address (including padding)
43 mov ebp,[MyHighMemSize]
49 .overflow: mov si,err_nohighmem
53 err_nohighmem db CR, LF
54 db 'Not enough memory to load specified image.', CR, LF, 0