00001 /* 00002 * HT Editor 00003 * mzstruct.h 00004 * 00005 * Copyright (C) 1999-2002 Stefan Weyergraf (stefan@weyergraf.de) 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License version 2 as 00009 * published by the Free Software Foundation. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 */ 00020 00021 #ifndef __MZSTRUCT_H_ 00022 #define __MZSTRUCT_H_ 00023 00024 #include "global.h" 00025 #include "tools.h" 00026 00027 #define IMAGE_MZ_MAGIC0 'M' 00028 #define IMAGE_MZ_MAGIC1 'Z' 00029 00030 struct IMAGE_MZ_HEADER { 00031 word magic HTPACKED; 00032 word sizelp HTPACKED; 00033 word sizep HTPACKED; 00034 word reloc_count HTPACKED; 00035 word header_size HTPACKED; 00036 word minalloc HTPACKED; 00037 word maxalloc HTPACKED; 00038 word ss HTPACKED; 00039 word sp HTPACKED; 00040 word checksum HTPACKED; 00041 word ip HTPACKED; 00042 word cs HTPACKED; 00043 word reloc_ofs HTPACKED; 00044 word overlay_num HTPACKED; 00045 word res[4] HTPACKED; 00046 word oemid HTPACKED; 00047 word oeminfo HTPACKED; 00048 word res2[10] HTPACKED; 00049 dword newexe_ofs HTPACKED; 00050 }; 00051 00052 extern byte MZ_HEADER_struct[]; 00053 00054 #endif /* __MZSTRUCT_H_ */