<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>http://wiki.foofun.cn//index.php?action=history&amp;feed=atom&amp;title=NE</id>
	<title>NE - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.foofun.cn//index.php?action=history&amp;feed=atom&amp;title=NE"/>
	<link rel="alternate" type="text/html" href="http://wiki.foofun.cn//index.php?title=NE&amp;action=history"/>
	<updated>2026-06-01T16:18:41Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.foofun.cn//index.php?title=NE&amp;diff=706&amp;oldid=prev</id>
		<title>Zhang3：创建页面，内容为“{{Stub}} {{File formats}} =NE= ==导言== WIN-NE可执行格式，专为Windows 3.x设计、 称为“NE”或“New Executable”格式。同样是16位格式，它去除了MZ格式的最大大小限制。  ==Support== 使用它的操作系统：Windows 1.01到3.xx。 该格式'''can'''在以后的32位windows系统（在VDM中）上运行，但不是本机格式&lt;br/&gt; 由于v8086缺少64位，因此放弃了对64位windows的支持。  =深入NE文件= ==…”</title>
		<link rel="alternate" type="text/html" href="http://wiki.foofun.cn//index.php?title=NE&amp;diff=706&amp;oldid=prev"/>
		<updated>2022-03-03T02:19:35Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“{{Stub}} {{File formats}} =NE= ==导言== WIN-NE可执行格式，专为Windows 3.x设计、 称为“NE”或“New Executable”格式。同样是16位格式，它去除了&lt;a href=&quot;/index.php?title=MZ&quot; title=&quot;MZ&quot;&gt;MZ&lt;/a&gt;格式的最大大小限制。  ==Support== 使用它的操作系统：Windows 1.01到3.xx。 该格式&amp;#039;&amp;#039;&amp;#039;can&amp;#039;&amp;#039;&amp;#039;在以后的32位windows系统（在VDM中）上运行，但不是本机格式&amp;lt;br/&amp;gt; 由于v8086缺少64位，因此放弃了对64位windows的支持。  =深入NE文件= ==…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Stub}}&lt;br /&gt;
{{File formats}}&lt;br /&gt;
=NE=&lt;br /&gt;
==导言==&lt;br /&gt;
WIN-NE可执行格式，专为Windows 3.x设计、 称为“NE”或“New Executable”格式。同样是16位格式，它去除了[[MZ]]格式的最大大小限制。&lt;br /&gt;
&lt;br /&gt;
==Support==&lt;br /&gt;
使用它的操作系统：Windows 1.01到3.xx。&lt;br /&gt;
该格式'''can'''在以后的32位windows系统（在VDM中）上运行，但不是本机格式&amp;lt;br/&amp;gt;&lt;br /&gt;
由于v8086缺少64位，因此放弃了对64位windows的支持。&lt;br /&gt;
&lt;br /&gt;
=深入NE文件=&lt;br /&gt;
==概述==&lt;br /&gt;
===DOS存根===&lt;br /&gt;
DOS存根是有效的[[MZ]]exe。 这使开发者能够打包MS-DOS和Win16版本的程序，但只打印“此程序需要Microsoft Windows”。 e_lfanew字段（偏移量0x3C）指向NE报头。&lt;br /&gt;
&lt;br /&gt;
===NE文件头===&lt;br /&gt;
NE报头是一个具有多个特征的相对较大的结构。 由于格式年代久远，有些项目的含义不清楚。 结构如下（有些注释可能是错误的）。 If so please change):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct NE_header {&lt;br /&gt;
    char sig[2];                 //&amp;quot;NE&amp;quot;&lt;br /&gt;
    uint8_t MajLinkerVersion;    //The major linker version&lt;br /&gt;
    uint8_t MinLinkerVersion;    //The minor linker version&lt;br /&gt;
    uint16_t EntryTableOffset;   //Offset of entry table, see below&lt;br /&gt;
    uint16_t EntryTableLength;   //Length of entry table in bytes&lt;br /&gt;
    uint32_t FileLoadCRC;        //32-bit CRC of entire contents of file&lt;br /&gt;
    uint8_t ProgFlags;           //Program flags, bitmapped&lt;br /&gt;
    uint8_t ApplFlags;           //Application flags, bitmapped&lt;br /&gt;
    uint16_t AutoDataSegIndex;   //The automatic data segment index&lt;br /&gt;
    uint16_t InitHeapSize;       //The intial local heap size&lt;br /&gt;
    uint16_t InitStackSize;      //The inital stack size&lt;br /&gt;
    uint32_t EntryPoint;         //CS:IP entry point, CS is index into segment table&lt;br /&gt;
    uint32_t InitStack;          //SS:SP inital stack pointer, SS is index into segment table&lt;br /&gt;
    uint16_t SegCount;           //Number of segments in segment table&lt;br /&gt;
    uint16_t ModRefs;            //Number of module references (DLLs)&lt;br /&gt;
    uint16_t NoResNamesTabSiz;   //Size of non-resident names table, in bytes (Please clarify non-resident names table)&lt;br /&gt;
    uint16_t SegTableOffset;     //Offset of Segment table&lt;br /&gt;
    uint16_t ResTableOffset;     //Offset of resources table&lt;br /&gt;
    uint16_t ResidNamTable;      //Offset of resident names table&lt;br /&gt;
    uint16_t ModRefTable;        //Offset of module reference table&lt;br /&gt;
    uint16_t ImportNameTable;    //Offset of imported names table (array of counted strings, terminated with string of length 00h)&lt;br /&gt;
    uint32_t OffStartNonResTab;  //Offset from start of file to non-resident names table&lt;br /&gt;
    uint16_t MovEntryCount;      //Count of moveable entry point listed in entry table&lt;br /&gt;
    uint16_t FileAlnSzShftCnt;   //File alligbment size shift count (0=9(default 512 byte pages))&lt;br /&gt;
    uint16_t nResTabEntries;     //Number of resource table entries&lt;br /&gt;
    uint8_t targOS;              //Target OS&lt;br /&gt;
    uint8_t OS2EXEFlags;         //Other OS/2 flags&lt;br /&gt;
    uint16_t retThunkOffset;     //Offset to return thunks or start of gangload area - what is gangload?&lt;br /&gt;
    uint16_t segrefthunksoff;    //Offset to segment reference thunks or size of gangload area&lt;br /&gt;
    uint16_t mincodeswap;        //Minimum code swap area size&lt;br /&gt;
    uint8_t expctwinver[2];      //Expected windows version (minor first)&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
//Program flags&lt;br /&gt;
//DGroup type (what is this?)&lt;br /&gt;
enum dgrouptype {&lt;br /&gt;
    none,         //None&lt;br /&gt;
    sinshared,    //single shared&lt;br /&gt;
    multiple,     //Multiple&lt;br /&gt;
    null          //(null)&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#define GLOBINIT 1&amp;lt;&amp;lt;2     //global initialization&lt;br /&gt;
#define PMODEONLY 1&amp;lt;&amp;lt;3    //Protetced mode only&lt;br /&gt;
#define INSTRUC86 1&amp;lt;&amp;lt;4    //8086 instructions&lt;br /&gt;
#define INSTRU286 1&amp;lt;&amp;lt;5    //80286 instructions&lt;br /&gt;
#define INSTRU386 1&amp;lt;&amp;lt;6    //80386 instructions&lt;br /&gt;
#define INSTRUx87 1&amp;lt;&amp;lt;7    //80x87 (FPU) instructions&lt;br /&gt;
&lt;br /&gt;
//Application flags&lt;br /&gt;
//Application type&lt;br /&gt;
enum apptype {&lt;br /&gt;
    none,&lt;br /&gt;
    fullscreeen,    //fullscreen (not aware of Windows/P.M. API)&lt;br /&gt;
    winpmcompat,    //compatible with Windows/P.M. API&lt;br /&gt;
    winpmuses       //uses Windows/P.M. API&lt;br /&gt;
};&lt;br /&gt;
#define OS2APP 1&amp;lt;&amp;lt;3    //OS/2 family application&lt;br /&gt;
//bit 4 reserved?&lt;br /&gt;
#define IMAGEERROR 1&amp;lt;&amp;lt;5    //errors in image/executable&lt;br /&gt;
#define NONCONFORM 1&amp;lt;&amp;lt;6    //non-conforming program?&lt;br /&gt;
#define DLL        1&amp;lt;&amp;lt;7    //DLL or driver (SS:SP invalid, CS:IP-&amp;gt;Far INIT routine AX=HMODULE,returns AX==0 success, AX!=0 fail)&lt;br /&gt;
&lt;br /&gt;
//Target Operating System&lt;br /&gt;
enum targetos {&lt;br /&gt;
    unknown,    //Obvious ;)&lt;br /&gt;
    os2,        //OS/2 (as if you hadn't worked that out!)&lt;br /&gt;
    win,        //Windows (Win16)&lt;br /&gt;
    dos4,       //European DOS  4.x&lt;br /&gt;
    win386,     //Windows for the 80386 (Win32s). 32 bit code.&lt;br /&gt;
    BOSS        //The boss, a.k.a Borland Operating System Services&lt;br /&gt;
};&lt;br /&gt;
//Other OS/2 flags&lt;br /&gt;
#define LFN 1        //OS/2 Long File Names (finally, no more 8.3 conversion :) )&lt;br /&gt;
#define PMODE 1&amp;lt;&amp;lt;1   //OS/2 2.x Protected Mode executable&lt;br /&gt;
#define PFONT 1&amp;lt;&amp;lt;2   //OS/2 2.x Proportional Fonts&lt;br /&gt;
#define GANGL 1&amp;lt;&amp;lt;3   //OS/2 Gangload area&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==另见==&lt;br /&gt;
===NE===&lt;br /&gt;
*[http://bytepointer.com/resources/win16_ne_exe_format_win3.0.htm]&lt;br /&gt;
*[http://www.nondot.org/sabre/os/files/Executables/EXE-3.1.txt OSRC]&lt;br /&gt;
*[http://www.fileformat.info/format/exe/corion-ne.htm fileformat.info]&lt;br /&gt;
===可执行文件===&lt;br /&gt;
*[[MZ]]&lt;br /&gt;
*[[PE]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Executable Formats]]&lt;/div&gt;</summary>
		<author><name>Zhang3</name></author>
	</entry>
</feed>