📄 newexe.h
字号:
* r Segment has relocations
* e Execute/read only
* p Preload segment
* P Pure segment
* m Movable segment
* i Iterated segment
* ttt Segment type
*/
#define NSTYPE 0x0007 /* Segment type mask */
#define NSCODE 0x0000 /* Code segment */
#define NSDATA 0x0001 /* Data segment */
#define NSITER 0x0008 /* Iterated segment flag */
#define NSMOVE 0x0010 /* Movable segment flag */
#define NSPURE 0x0020 /* Pure segment flag */
#define NSPRELOAD 0x0040 /* Preload segment flag */
#define NSEXRD 0x0080 /* Execute-only (code segment), or
* read-only (data segment)
*/
#define NSRELOC 0x0100 /* Segment has relocations */
#define NSDEBUG 0x0200 /* Segment has debug info */
#define NSDPL 0x0C00 /* 286 DPL bits */
#define NSDISCARD 0x1000 /* Discard bit for segment */
#define NSALIGN 9 /* Segment data aligned on 512 byte boundaries */
struct new_segdata /* Segment data */
{
union
{
struct
{
unsigned short ns_niter; /* number of iterations */
unsigned short ns_nbytes; /* number of bytes */
char ns_iterdata; /* iterated data bytes */
} ns_iter;
struct
{
char ns_data; /* data bytes */
} ns_noniter;
} ns_union;
};
struct new_rlcinfo /* Relocation info */
{
unsigned short nr_nreloc; /* number of relocation items that */
}; /* follow */
struct new_rlc /* Relocation item */
{
char nr_stype; /* Source type */
char nr_flags; /* Flag byte */
unsigned short nr_soff; /* Source offset */
union
{
struct
{
char nr_segno; /* Target segment number */
char nr_res; /* Reserved */
unsigned short nr_entry; /* Target Entry Table offset */
} nr_intref; /* Internal reference */
struct
{
unsigned short nr_mod; /* Index into Module Reference Table */
unsigned short nr_proc; /* Procedure ordinal or name offset */
} nr_import; /* Import */
} nr_union; /* Union */
};
#define NR_STYPE(x) (x).nr_stype
#define NR_FLAGS(x) (x).nr_flags
#define NR_SOFF(x) (x).nr_soff
#define NR_SEGNO(x) (x).nr_union.nr_intref.nr_segno
#define NR_RES(x) (x).nr_union.nr_intref.nr_res
#define NR_ENTRY(x) (x).nr_union.nr_intref.nr_entry
#define NR_MOD(x) (x).nr_union.nr_import.nr_mod
#define NR_PROC(x) (x).nr_union.nr_import.nr_proc
/*
* Format of NR_STYPE(x):
*
* xxxxx Unused
* sss Source type
*/
#define NRSTYP 0x07 /* Source type mask */
#define NRSSEG 0x02 /* 16-bit segment */
#define NRSPTR 0x03 /* 32-bit pointer */
#define NRSOFF 0x05 /* 16-bit offset */
/*
* Format of NR_FLAGS(x):
*
* xxxxx Unused
* a Additive fixup
* rr Reference type
*/
#define NRADD 0x04 /* Additive fixup */
#define NRRTYP 0x03 /* Reference type mask */
#define NRRINT 0x00 /* Internal reference */
#define NRRORD 0x01 /* Import by ordinal */
#define NRRNAM 0x02 /* Import by name */
#define OSFIXUP 0x03 /* Floating point fixup */
/* Resource type or name string */
struct rsrc_string
{
char rs_len; /* number of bytes in string */
char rs_string[ 1 ]; /* text of string */
};
#define RS_LEN( x ) (x).rs_len
#define RS_STRING( x ) (x).rs_string
/* Resource type information block */
struct rsrc_typeinfo
{
unsigned short rt_id;
unsigned short rt_nres;
long rt_proc;
};
#define RT_ID( x ) (x).rt_id
#define RT_NRES( x ) (x).rt_nres
#define RT_PROC( x ) (x).rt_proc
/* Resource name information block */
struct rsrc_nameinfo
{
/* The following two fields must be shifted left by the value of */
/* the rs_align field to compute their actual value. This allows */
/* resources to be larger than 64k, but they do not need to be */
/* aligned on 512 byte boundaries, the way segments are */
unsigned short rn_offset; /* file offset to resource data */
unsigned short rn_length; /* length of resource data */
unsigned short rn_flags; /* resource flags */
unsigned short rn_id; /* resource name id */
unsigned short rn_handle; /* If loaded, then global handle */
unsigned short rn_usage; /* Initially zero. Number of times */
/* the handle for this resource has */
/* been given out */
};
#define RN_OFFSET( x ) (x).rn_offset
#define RN_LENGTH( x ) (x).rn_length
#define RN_FLAGS( x ) (x).rn_flags
#define RN_ID( x ) (x).rn_id
#define RN_HANDLE( x ) (x).rn_handle
#define RN_USAGE( x ) (x).rn_usage
#define RSORDID 0x8000 /* if high bit of ID set then integer id */
/* otherwise ID is offset of string from
the beginning of the resource table */
/* Ideally these are the same as the */
/* corresponding segment flags */
#define RNMOVE 0x0010 /* Moveable resource */
#define RNPURE 0x0020 /* Pure (read-only) resource */
#define RNPRELOAD 0x0040 /* Preloaded resource */
#define RNDISCARD 0x1000 /* Discard bit for resource */
#define RNLOADED 0x0004 /* True if handler proc return handle */
#define RNCOMPR 0x0200 /* Resource is compressed in ROM */
/* Resource table */
struct new_rsrc
{
unsigned short rs_align; /* alignment shift count for resources */
struct rsrc_typeinfo rs_typeinfo;
};
#define RS_ALIGN( x ) (x).rs_align
/* Target operating systems: Possible values of ne_exetyp field */
#define NE_UNKNOWN 0 /* Unknown (any "new-format" OS) */
#define NE_OS2 1 /* Microsoft/IBM OS/2 (default) */
#define NE_WINDOWS 2 /* Microsoft Windows */
#define NE_DOS4 3 /* Microsoft MS-DOS 4.x */
#define NE_DEV386 4 /* Microsoft Windows 386 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -