Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

readexe version 0.1 (Announce)

posted by segin Homepage E-mail, Springfield, MO, USA, 08.08.2023, 18:08

Hello DOS ain't dead forums!

I'm a hobbyist that started his computer experience as toddler on Windows 3.1 and MS-DOS 6.22 (because those were the bleeding edge at the time.)

I'm writing a diagnostic/system/developer tool that inspects executable files. It's called readexe and it's licensed under the ISC license, an Open Source Initiative approved open source license. It's legally equivalent to the MIT license, except it says the exact same thing in fewer words, and thus I prefer it for that efficiency.

readexe is capable of displaying the values of the MZ/ZM DOS EXE header. I'm aware that some very early DOS assemblers ran on big-endian Unix minicomputers and used a hex value that was meant for little-endian PC linkers and emit EXEs with "ZM" magic - MS-DOS 2.0 and 2.11 recognize and accept this alternative magic value as the "old" magic, and their source code on GitHub confirms this.

readexe is also capable of recognizing and dumping header information for NE "New Executable" images. It has OS values for OS/2, Windows, the European multitasking MS-DOS 4.00/4.10, special Windows/386 NE images, Borland's DOS extender, both 16-bit and 32-bit DPMI values used by HX (the 16-bit value is shared with Borland), plus the two values I've been told were used by the Phar-Lap 286 extender for both OS/2 and Win16 programs. It can read out NE segment tables as well.

readexe is very much in development, as indicated by it's 0.1 release version. It currently builds for all modern Unix, real-mode PC-DOS using both gcc-ia16 and OpenWatcom 2.0; DOS32 using OpenWatcom 2.0; OS/2 1.x using OpenWatcom 2.0; Win32 using OpenWatcom and gcc; Win64 using gcc.

Binaries are provided for OS/2, DOS, and Windows. Unix users are expected to run ./autogen.sh, then ./configure, then make. Unixes without autotools can use Makefile.unix, setting CC to point to your local C compiler as appropriate. Those building for real-mode DOS with gcc-ia16 can use Makefile.dos.

Pull requests are accepted as long as they follow the general style of the existing code. Header definitions should each go in their own separate header, but support code for any new formats should go into readexe.c. Importantly, the classical C way of handling bitfields by OR/XOR/ANDing together preprocessor macros onto a single integer value holding all the flags is NOT allowed; C99 is the rule and bitfields are how we do. Any code using preprocessor macros with hex values to be OR/XOR/ANDed to a raw integer shall be rejected for this reason. Use C99 bitfields if you want to contribute.

You may find readexe on GitHub at http://github.com/segin/readexe.

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 448 users online (0 registered, 448 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum