Skip to content

Commit

Permalink
Initial work on parsing NE (16-bit) executables.
Browse files Browse the repository at this point in the history
This is just lx_dump for now, but if some work proves out, we can load these
with lx_loader, too, and bridge the 16-bit APIs to 32-bits the same as we
do anyhow, giving us access to 16-bit OS/2 binaries.
  • Loading branch information
icculus committed Mar 7, 2018
1 parent c4ba0aa commit 8e2c144
Show file tree
Hide file tree
Showing 2 changed files with 376 additions and 28 deletions.
41 changes: 41 additions & 0 deletions lib2ine.h
Expand Up @@ -137,6 +137,47 @@ typedef struct LxResourceTableEntry
uint32 offset;
} LxResourceTableEntry;

typedef struct NeHeader
{
uint8 magic_n;
uint8 magic_e;
uint8 linker_version;
uint8 linker_revision;
uint16 entry_table_offset;
uint16 entry_table_size;
uint32 crc32;
uint16 module_flags;
uint16 auto_data_segment;
uint16 dynamic_heap_size;
uint16 stack_size;
uint16 reg_ip;
uint16 reg_cs;
uint16 reg_sp;
uint16 reg_ss;
uint16 num_segment_table_entries;
uint16 num_module_ref_table_entries;
uint16 non_resident_name_table_size;
uint16 segment_table_offset;
uint16 resource_table_offset;
uint16 resident_name_table_offset;
uint16 module_reference_table_offset;
uint16 imported_names_table_offset;
uint32 non_resident_name_table_offset;
uint16 num_movable_entries;
uint16 sector_alignment_shift_count;
uint16 num_resource_entries;
uint8 exe_type;
uint8 reserved[9];
} NeHeader;

typedef struct NeSegmentTableEntry
{
uint16 offset;
uint16 size;
uint16 segment_flags;
uint16 minimum_allocation;
} NeSegmentTableEntry;

#pragma pack(pop)


Expand Down

0 comments on commit 8e2c144

Please sign in to comment.