Skip to content

Commit

Permalink
lx_dump: report OS/2 EXE flags for NE modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 13, 2018
1 parent 37c3cc5 commit ab60f82
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib2ine.h
Expand Up @@ -167,7 +167,8 @@ typedef struct NeHeader
uint16 sector_alignment_shift_count;
uint16 num_resource_entries;
uint8 exe_type;
uint8 reserved[9];
uint8 os2_exe_flags;
uint8 reserved[8];
} NeHeader;

typedef struct NeSegmentTableEntry
Expand Down
11 changes: 11 additions & 0 deletions lx_dump.c
Expand Up @@ -575,6 +575,17 @@ static int parseNeExe(const uint8 *origexe, const uint8 *exe)
printf("Sector alignment shift count: %u\n", (uint) ne->sector_alignment_shift_count);
printf("Number of resource entries: %u\n", (uint) ne->num_resource_entries);
printf("Executable type: %u\n", (uint) ne->exe_type);

printf("OS/2 flags:");
if (ne->os2_exe_flags == 0) {
printf(" (none)");
} else {
if (ne->os2_exe_flags & (1 << 0)) printf(" LONGFILENAMES");
if (ne->os2_exe_flags & (1 << 1)) printf(" PROTECTEDMODE");
if (ne->os2_exe_flags & (1 << 2)) printf(" PROPORTIONALFONTS");
if (ne->os2_exe_flags & (1 << 3)) printf(" GANGLOADAREA");
}
printf("\n");
printf("\n");

const uint32 sector_shift = ne->sector_alignment_shift_count;
Expand Down

0 comments on commit ab60f82

Please sign in to comment.